New answers tagged

0

The solution to extract the center point (latitude and longitude) from the polygon and multi-polygon. import geopandas as gpd df = gpd.read_file(path + 'df.geojson') #Find the center point df['Center_point'] = df['geometry'].centroid #Extract lat and lon from the centerpoint df["lat"] = df.Center_point.map(lambda p: p.x) df["long"] = df....


Top 50 recent answers are included