I have two files with the projection information

Image 1 'GEOGCS["Moon Spheroid",DATUM["Moon_Spheroid",SPHEROID["Moon Spheroid",1737400,833.3333]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]'

Image 2 'PROJCS["Polar StereoGraphic",GEOGCS["Moon Spheroid",DATUM["Moon_Spheroid",SPHEROID["Moon Spheroid",1737400,833.3333]],PRIMEM["Reference_Meridian",0],UNIT["degree",0.0174532925199433]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",90],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]]]'

I am trying to georeference image 1 into Image 2 projection format using gdal utility.

But after several tries, I am unable to do so.

Here, is the output of my Jupiter notebook.

 File "<ipython-input-31-14f3cc51b5be>", line 4
gdalwarp -t_srs 'EPSG:9001 +datum=Moon_Spheroid' -tr 25 25 -r cubic ch2_sar_ncxl_20191017t234531221_d_sli_xx_fp_hh_d18.tif ch2_sar_ncxl_20191017t234531221_d_sli_xx_fp_hh_d18.tif

SyntaxError: invalid syntax How can I fix this?

  • Does it make any sense to re-project data from Moon on WGS84 spheroid on Earth? Maybe it does, I am not familiar with such data.
    – user30184
    Commented Jan 31, 2022 at 11:44
  • It makes sense for Polar data. Commented Jan 31, 2022 at 11:46
  • 3
    Immediate error comes probably from the syntax. You could try double quotes around -t_srs but your target srs will not work. For example EPSG:9001 means metre. (note: question edited and my comment about WGS84 is no more valid).
    – user30184
    Commented Jan 31, 2022 at 12:03
  • 2
    Of course because this parameter -t_srs "EPSG:9001 +datum=WGS 84" is plain nonsense.
    – user30184
    Commented Jan 31, 2022 at 13:03
  • 2
    You must use a complete and correct projection definition with -t_srs. You can get such for example with gdalsrsinfo -o proj4 image2.tif. I am sorry but you must still learn some more basics, for example you seem to use the same filename for input and output in your gdalwarp command and that will fail. If you do not have a teacher to guide you find some GDAL tutorials from the web and follow them before starting to play with your own data.
    – user30184
    Commented Jan 31, 2022 at 13:58


Your Answer

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

Browse other questions tagged or ask your own question.