pub fn simplify_polygon(
polygon: &Polygon,
tolerance: f64,
method: SimplifyMethod,
) -> Result<Polygon>Expand description
Simplifies a polygon using the specified algorithm
§Arguments
polygon- Input polygon to simplifytolerance- Simplification tolerancemethod- Simplification algorithm to use
§Returns
Simplified polygon with exterior and interior rings simplified
§Errors
Returns error if:
- Polygon is invalid
- Tolerance is negative
- Simplified polygon would have fewer than 4 points