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
func
to geometries.For each feature, the geometry is deserialized to a shapely geom,
func
is applied, and its output is serialized to a new feature.func
must 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.