import sys import geopandas as gpd shp = (sys.argv[1]) gdf = gpd.read_file(shp) union = gdf.unary_union env = union.envelope envgdf = gpd.GeoDataFrame() envgdf['geometry'] = env envgdf.geometry.name print(" GeoDataFrame : ", envgdf)