Geopandas – How to Reproject to Global Equal Area Projection Using Proj4

coordinate systemepsggeopandas

I have a geoDataFrame with crs {'init': 'epsg:4326'} The data has a global extent and my goal is to calculate the area (in m2) per feature. Therefore I want to reproject the geoDataFrame using the

gdf.to_crs({'init':'epsg:xxxx'})

method. I looked into suitable global equal area projections and found Eckert IV. However I cannot find an EPSG code for this projection. Is there a way to

  1. use an ESRI code in geopandas (proj4 under the hood) e.g. ESRI:54012 ? or should I
  2. use another global equal area projection crs for which an epsg is available.

EDIT: using the proj4 definition string works. Make sure you click proj4 and not just copy the definition on top. (without the +ellps=WGS84 part).
Notebook

Best Answer

The to_crs method also accepts the full proj4 string specification (or in dictionary presentation), so you can do

gdf = gdf.to_crs("+proj=eck4 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs")

without the need for an EPSG code (proj4 definition from https://epsg.io/54012)

Related Question