trajectory_supervisor.helper_funcs.src.shapely_conversions module¶
- trajectory_supervisor.helper_funcs.src.shapely_conversions.extract_polygon_outline(shapely_geometry: <module 'shapely.geometry' from '/home/docs/checkouts/readthedocs.org/user_builds/trajectorysupervisor/envs/latest/lib/python3.7/site-packages/shapely/geometry/__init__.py'>) → numpy.ndarray[source]¶
Extract the key outline coordinates of a shapely shape (including multi-shapes like MultiPolygon). The following types ares supported:
Polygon: The outline of the polygon is returned
MultiPolygon: The outline of the largest polygon is returned
GeometryCollection: The largest polygon in the set is returned, if no polygon is present ‘None’ is returned
LineString: ‘None’ is returned, since the shape is a line and does not host volume information
For any other type, an error is raised.
- Parameters
shapely_geometry – shapely-geometry of interest
- Returns
polygon_outline - outline coordinates in form of a numpy array with columns x, y
- Authors
Tim Stahl <tim.stahl@tum.de>
- Created on
09.10.2020