simplify_polygons#

simplify_polygons(geojson: dict) dict[source]#

Simplify polygon geometries by applying .buffer(0).

For Polygon geometries, .buffer(0) can do the following:

  1. Sometimes break up a polygon with “bowties” into multiple polygons. (See https://github.com/shapely/shapely/issues/599.)

  2. Sometimes “simplify” polygons. See shapely documentation for BaseGeometry.buffer().

Parameters:

geojson (dict) – A GeoJSON-like mapping of a FeatureCollection.

Returns:

FeatureCollection with simplified geometries.

Return type:

dict