spatialdata.models.force_2d#
- spatialdata.models.force_2d(gdf)#
Force the geometries of a shapes object GeoDataFrame to be 2D by modifying the geometries in place.
Geopandas introduced a method called
force_2d()
to drop the z dimension. Unfortunately, this feature, as of geopandas == 0.14.3, is still not released. Similarly, the recently released shapely >= 2.0.3 implementedforce_2d()
, but currently there are installation errors.A similar function has been developed in When
.force_2d()
- Parameters:
gdf (
GeoDataFrame
) – GeoDataFrame with 2D or 3D geometries- Return type:
None