Created
February 12, 2019 05:34
-
-
Save prakharcode/98de17c60f8e6231215f5416d364cf11 to your computer and use it in GitHub Desktop.
Poly Z to Poly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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