vectools.drop_z_if_zero()
Remove the Z coordinate from all geometries in a GeoDataFrame if all Z coordinates are zero.
Usage
vectools.drop_z_if_zero(gdf)Parameters
gdf: geopandas.GeoDataFrame- GeoDataFrame containing geometries with potential Z coordinates.
Returns
geopandas.GeoDataFrame- GeoDataFrame with Z coordinates removed if they are all zero.
Raises
ValueError-
If the geometry does not have a Z axis.
TypeError- If the geometry type is unknown.