Skip to main content
added 1 character in body
Source Link
Kadir Şahbaz
  • 78k
  • 57
  • 257
  • 404

I was able to extract the correct Mollweide info by finding an example tif with the spatial reference I needed and extracting it.

examplefile = "C:Users\\lavendarfire\\files\\example.tiftif"
projtext=arcpy.Describe(examplefile).spatialReference.exporttostring()
print(projtext)

"PROJCS['World_Mollweide',GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Mollweide'],PARAMETER['False_Easting',0.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',0.0],UNIT['Meter',1.0]];-18040200 -9020200 249642444.505632;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision]]"

It did reproject my raster, but incorrectly since my input has no spatial reference. So figuring that out will be my next step.

I was able to extract the correct Mollweide info by finding an example tif with the spatial reference I needed and extracting it.

examplefile = "C:Users\\lavendarfire\\files\\example.tif
projtext=arcpy.Describe(examplefile).spatialReference.exporttostring()
print(projtext)

"PROJCS['World_Mollweide',GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Mollweide'],PARAMETER['False_Easting',0.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',0.0],UNIT['Meter',1.0]];-18040200 -9020200 249642444.505632;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision]]"

It did reproject my raster, but incorrectly since my input has no spatial reference. So figuring that out will be my next step.

I was able to extract the correct Mollweide info by finding an example tif with the spatial reference I needed and extracting it.

examplefile = "C:Users\\lavendarfire\\files\\example.tif"
projtext=arcpy.Describe(examplefile).spatialReference.exporttostring()
print(projtext)

"PROJCS['World_Mollweide',GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Mollweide'],PARAMETER['False_Easting',0.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',0.0],UNIT['Meter',1.0]];-18040200 -9020200 249642444.505632;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision]]"

It did reproject my raster, but incorrectly since my input has no spatial reference. So figuring that out will be my next step.

Source Link

I was able to extract the correct Mollweide info by finding an example tif with the spatial reference I needed and extracting it.

examplefile = "C:Users\\lavendarfire\\files\\example.tif
projtext=arcpy.Describe(examplefile).spatialReference.exporttostring()
print(projtext)

"PROJCS['World_Mollweide',GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',SPHEROID['WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Mollweide'],PARAMETER['False_Easting',0.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',0.0],UNIT['Meter',1.0]];-18040200 -9020200 249642444.505632;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision]]"

It did reproject my raster, but incorrectly since my input has no spatial reference. So figuring that out will be my next step.