1

this is second part of How to convert VICAR data to TIFF.

I was able to get the VICAR data into TIFF form by using VICAR2isis to make a .cub then gdal to make a tiff. (Yes i eventually found out I could have just done it with gdal once but I didn't know yet, I'm new).

That worked, but now when I open the TIFF in ArcGIS Pro, it looks like the map is wrapped differently than other basemaps I have. For example, this is what it should look like: enter image description here

But it actually looks like this: enter image description here

As you can see the three volcanos in the shaded relief don't match the three volcanos in the lower image.

How can I fix this using ISIS, GDAL, python etc.?

I tried running this code but it didn't work:

gdalwarp -t_srs MarsMOLAEQC ti16.tif ti16_2.tif -wo SOURCE=EXTRA=1000 --config CENTER_LONG 0

2
  • gdalinfo gives me this: Size is 2880, 1440 Origin = (-180.000000000000000,90.000000000000000) Pixel Size = (0.125000000000000,-0.125000000000000) Image Structure Metadata: INTERLEAVE=BAND Corner Coordinates: Upper Left (-180.0000000, 90.0000000) Lower Left (-180.0000000, -90.0000000) Upper Right ( 180.0000000, 90.0000000) Lower Right ( 180.0000000, -90.0000000) Center ( 0.0000000, 0.0000000) Band 1 Block=2880x1 Type=Int32, ColorInterp=Gray Min=25.000 Max=602.000
    – GISGirl94
    Commented Aug 27, 2023 at 1:15
  • mars srs can be found here: spatialreference.org/ref/iau2000/49910
    – GISGirl94
    Commented Aug 27, 2023 at 1:31

1 Answer 1

2

I couldn't get --config center_long 0 to do anything. An alternative is to split, swap and merge.

E.g. ti16 is the orig VICAR data

gdal_translate -srcwin 0 0 1440 1440 -a_ullr 0 90 180 -90 ti16 ti16_right.vrt
gdal_translate -srcwin 1440 0 1440 1440 -a_ullr -180 90 0 -90 ti16 ti16_left.vrt
gdalbuildvrt ti16.vrt ti16_left.vrt ti16_right.vrt
gdal_translate ti16.vrt ti16.tif 

enter image description here

1
  • you have been so helpful! thank you, just tried it and it works :D
    – GISGirl94
    Commented Aug 27, 2023 at 22:04

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.