buildgraph: add support for escalator_up and escalator_down
This commit is contained in:
parent
d2e9e18c2a
commit
405c688eac
5 changed files with 100 additions and 18 deletions
|
@ -25,6 +25,8 @@ def assert_multipolygon(geometry):
|
|||
:param geometry: a Polygon or a MultiPolygon
|
||||
:return: a list of Polygons
|
||||
"""
|
||||
if geometry.is_empty:
|
||||
return []
|
||||
if isinstance(geometry, Polygon):
|
||||
return [geometry]
|
||||
return geometry.geoms
|
||||
|
@ -36,6 +38,8 @@ def assert_multilinestring(geometry):
|
|||
:param geometry: a Geometry or a GeometryCollection
|
||||
:return: a list of Geometries
|
||||
"""
|
||||
if geometry.is_empty:
|
||||
return []
|
||||
if isinstance(geometry, LineString):
|
||||
return [geometry]
|
||||
return geometry.geoms
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue