deepof.utils.simplify_polygon
- deepof.utils.simplify_polygon(polygon: list, relative_tolerance: float = 0.05)
Simplify a polygon using the Ramer-Douglas-Peucker algorithm.
- Parameters:
polygon (list) – List of polygon coordinates.
relative_tolerance (float) – Relative tolerance for simplification. Defaults to 0.05.
- Returns:
List of simplified polygon coordinates.
- Return type:
simplified_poly (list)