I'm new in Geopandas and I try to creat my first script. I succeeded to open a shapefile and maked a union of all entity and an envelope. As it said in Geopandas doc, after these 2 geometric manipulations it returns Geoserie. But how can I convert my Geoserie to a Geodataframe to finally export it to a shapefile ?
I try this on point shapefile but my Geodataframe is empty...
import sys import geopandas as gpd shp = (sys.argv) gdf = gpd.read_file(shp) union = gdf.unary_union env = union.envelope envgdf = gpd.GeoDataFrame() envgdf['geometry'] = env envgdf.geometry.name print("\nGeoDataFrame :\n", envgdf)
GeoDataFrame : Empty GeoDataFrame Columns: [geometry] Index: