filter out non-polygons with assert_multipolygon
This commit is contained in:
parent
4257fc8a77
commit
f064e02f1d
3 changed files with 16 additions and 19 deletions
|
@ -29,7 +29,7 @@ def assert_multipolygon(geometry):
|
|||
return []
|
||||
if isinstance(geometry, Polygon):
|
||||
return [geometry]
|
||||
return geometry.geoms
|
||||
return [geom for geom in geometry.geoms if isinstance(geom, Polygon)]
|
||||
|
||||
|
||||
def assert_multilinestring(geometry):
|
||||
|
|
|
@ -133,6 +133,7 @@ class GraphRoom():
|
|||
points += self._add_ring(interior, want_left=True)
|
||||
|
||||
# points around steps
|
||||
print(self._built_isolated_areas)
|
||||
self.add_points_on_rings(self._built_isolated_areas)
|
||||
|
||||
def _add_ring(self, geom, want_left):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue