Skip to content

Instantly share code, notes, and snippets.

@prakharcode
Created February 12, 2019 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prakharcode/98de17c60f8e6231215f5416d364cf11 to your computer and use it in GitHub Desktop.
Save prakharcode/98de17c60f8e6231215f5416d364cf11 to your computer and use it in GitHub Desktop.
Poly Z to Poly
import geopandas as gpd
from shapely.geometry import Polygon
df = gpd.read_file('/path/to/file')
df.geometry = df.geometry.apply(lambda x: Polygon([[i[0], i[1]] for i in x.exterior.coords]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment