Jump to content
PDS Geosciences Node Community

Convert 64-bit MRO RSS Digital Map in PDS IMG format to 32-bit GeoTiff with GDAL

June Wang

Recommended Posts

We were contacted by a user who are looking at the tectonics and gravity of the Tharsis Rise region of Mars. She mentioned that she has run into a problem analyzing some PDS data that I can't find a way around. After many days of trial and error (which was not aided by the fact that I have very little computer science experience), I was hoping you might be able to help. 

I'm trying to view and analyze the GMM-3 Mars gravity models, which are .IMG files (PDS listing). I don't have access to ENVI, so I've been trying alternatives, and have had the most success with the USGS's ISIS software. Now I'm stuck getting the IMG file into an image cube format that ISIS can display and analyze using qview. The pds2isis and raw2isis applications won't work because they can only process up to 32-bit images, and these are 64-bit (label file).  

So far I have tried, and not had any luck with,

  •  Converting the 64-bit IMG files to 32-bit files

  • Finding lower-quality versions of the data

  • Finding alternatives to ISIS that could process or display the IMG files

My main challenge is that I need to view the data with its original unit values in milligals. Programs like ImageJ and Photoshop can open the raw PDS image files, but it will lose the units of the raw data, replacing them with a standard grayscale with pixel values of 0-255 that are disassociated from the original data values in milligals. I had the same problem with the software NASAView

If it's relevant, what I want to do with the data is create maps and profile plots across a transect for gravity and elevation data that have the actual unit values so I will be able to include a map scale and real quantitative values on the plots.”

We suggested below to use GDAL for working with MRO RSS Digital Map conversion.

 “GDAL would help you to translate the img data to another format, but the original PDS label defined “MAP_SCALE  = "N/A" “ in the *.lbl file. GDAL probably didn’t like this and didn’t work for me in my first try. I manually changed that string to ‘’ MAP_SCALE                    = 3704.461337 <m/pixel>” as shown in the attached label, and run below gdal_translate commands. GDAL could read the PDS IMG data and output a Geotiff. The first command output a 64bit Geotiff, and the second command output a 32 bit Geotiff. You can read the page (https://gdal.org/programs/gdal_translate.html) to adjust the parameters for your application.

gdal_translate -of GTiff D:\test\data\mro\ggmro_120_anom_100.lbl D:\test\data\mro\ggmro_120_anom_100.tif

gdal_translate -ot Float32 -of GTiff D:\test\data\mro\ggmro_120_anom_100.lbl D:\test\data\mro\ggmro_120_anom_100_32.tif

GDAL can be downloaded from https://gdal.org/download.html . You can also find some tutorial on the web. I usually download GDAL for my windows computer from GISInternals (https://www.gisinternals.com/release.php). If you have a windows operating system, you can try the new version of “gdal-302-1928-x64-core.msi”near the middle of the page, https://www.gisinternals.com/query.html?content=filelist&file=release-1928-x64-gdal-3-2-1-mapserver-7-6-2.zip . Double click the *.msi, the installation window will pop-up and it is straightforward.”

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...