map_geoms#
- map_geoms(func: Callable[[BaseGeometry, dict], dict], geojson: dict, include_geom_types: Iterable[str] = [], progressbar_kw: dict | None = None) dict[source]#
Map GeoJSON features to new features by applying
functo geometries.For each feature, the geometry is deserialized to a shapely geom,
funcis applied, and its output is serialized to a new feature.funcmust be a function that takes a shapely geom and a keyword arg namedfeature(to which the feature dict will be passed) and returns a shapely geom.