Exemplo n.º 1
0
 def check_intersections(self):
     checks_done = MultiLineString()
     for subpath, elem in self.get_line_strings():
         line = subpath.as_linestring()
         if not line.is_simple:
             # TODO: find location of self-intersection and introduce some
             # tolerance
             # checks_done = checks_done.union(line)
             yield CheckerResult("self-intersection found", elem)
             # continue
         if checks_done.intersects(line):
             intersection = checks_done.intersection(line)
             yield CheckerResult("intersection found", elem, extra={"intersection": intersection})
         checks_done = checks_done.union(line)
Exemplo n.º 2
0
 def check_intersections(self):
     checks_done = MultiLineString()
     for subpath, elem in self.get_line_strings():
         line = subpath.as_linestring()
         if not line.is_simple:
             # TODO: find location of self-intersection and introduce some
             # tolerance
             # checks_done = checks_done.union(line)
             yield CheckerResult("self-intersection found", elem)
             # continue
         if checks_done.intersects(line):
             intersection = checks_done.intersection(line)
             yield CheckerResult("intersection found", elem, extra={"intersection": intersection})
         checks_done = checks_done.union(line)