scenic.core.geometry
Utility functions for geometric computation.
Summary of Module Members
Functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Triangulate the given Shapely polygon. |
|
|
|
|
Exceptions
Signals that the installed triangulation libraries are insufficient. |
Member Details
- exception TriangulationError[source]
Bases:
RuntimeError
Signals that the installed triangulation libraries are insufficient.
- triangulatePolygon(polygon)[source]
Triangulate the given Shapely polygon.
Note that we can’t use
shapely.ops.triangulate
since it triangulates point sets, not polygons (i.e., it doesn’t respect edges). We need an algorithm for triangulation of polygons with holes (it doesn’t need to be a Delaunay triangulation).- Parameters:
polygon (shapely.geometry.Polygon) – Polygon to triangulate.
- Returns:
A list of disjoint (except for edges) triangles whose union is the original polygon.