I have a geotiff image from Paris metropolitan area I have generated from MODIS data in Google Earth Engine with the following projection

CRS.from_wkt('PROJCS["MODIS Sinusoidal",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Sinusoidal"],PARAMETER["longitude_of_center",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]')

enter image description here

Now I have the shapefile of Paris metropolitan area. I would like to set the right crs=myCrs for the shapefile but I do not know which one it is right.

# Get images from Paris 
gdf = gpd.read_file('paris.shp')     ## Paris metro area
gdf = gdf.to_crs(epsg=myCrs)

1 Answer 1


You should replace epsg=myCrs with 'PROJCS["MODIS Sinusoidal",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Sinusoidal"],PARAMETER["longitude_of_center",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH]]'

You could also use the rio CRS from your raster (see excerpt from below mentioning rio crs are compatible with Geopandas)

According to the Geopandas docs, https://geopandas.org/projections.html.

Other formats

Next to the EPSG code mentioned above, there are also other ways to specify the CRS: an actual pyproj.CRS object, a WKT string, a PROJ JSON string, etc. Anything that is accepted by pyproj.CRS.from_user_input can by specified to the crs keyword/attribute in GeoPandas.

Also compatible CRS objects, such as from the rasterio package, can be passed directly to GeoPandas.

In first example, I use the WKT

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.