0

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?. Thanks!!

1
  • 3
    Don't do any distance or area calculations in EPSG:3857, it is designed for web mapping (to fit most of the globe into 256x256 pixel tiles) and does not make any attempt to minimize distortion.
    – user2856
    May 22 '20 at 8:35
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, privacy policy and cookie policy

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