geopfa.extrapolation.drop_z_from_geometry

drop_z_from_geometry(gdf, geom_col='geometry')[source]

Remove Z coordinates from 3D Point geometries in a GeoDataFrame, converting them into standard 2D Points.

Parameters:
  • gdf (geopandas.GeoDataFrame) – Input GeoDataFrame whose geometry column may contain 3D Points.

  • geom_col (str, optional) – Name of the geometry column containing shapely Point geometries.

Returns:

geopandas.GeoDataFrame – A new GeoDataFrame where all Point geometries are guaranteed to be 2D.

Notes

  • Rows with geometries that are already 2D are left unchanged.

  • Only Point geometries are supported; behavior for LineString/Polygon geometries is not modified from the original implementation.