1

I am using Geopandas to compute population per km2. However, I don't know if this transformation is using meters or kilometers.

gacs_df = gpd.GeoDataFrame(acs_df.merge(census_gdf2, on="geo_12", how="inner").drop_duplicates(subset='geo_12'), crs={'init': 'epsg:4326'})
gacs_df = gacs_df.to_crs({'init': 'epsg:3857'})
gacs_df["area"] = gacs_df['geometry'].area/ 10**6
gacs_df= gacs_df.to_crs({'init': 'epsg:32633'})
gacs_df["area"] = gacs_df['geometry'].area/ 10**6

I am replicating the code from Getting polygon areas using GeoPandas.

0

1 Answer 1

2

Both EPSG:3857 and EPSG:32633 have units in metres. If you divide the resulting area by 10^6 (=1,000,000), you get square kilometres (km²).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.