buffer_geoms#

buffer_geoms(geojson: dict, geom_type: str, class_bufs: dict[int, float | None] = {}, default_buf: float | None = 1) dict[source]#

Buffer geometries.

Geometries in features without a class_id property will be ignored.

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

  • geom_type (str) – Shapely geometry type to apply the buffering to. Other types of geometries will not be affected.

  • class_bufs (dict[int, float | None]) – Optional mapping from class ID to buffer distance (in pixel units) for geom_type geometries.

  • default_buf (float | None) –

Returns:

FeatureCollection with buffered geometries.

Return type:

dict