I'm trying to use QGIS to view some images from the Mars Reconnaissance Orbiter Context Camera. I use ISIS3 to download the images and convert them to mapped .cub files, following the instructions here: http://isis.astrogeology.usgs.gov/IsisWorkshop/index.php/Working_with_Mars_Reconnaissance_Orbiter_CTX_Data
Now I'm trying to export these ISIS cube files to GTiff files, to view in QGIS, I can do this but the georeferencing doesn't seem to work. I've tried this in 3 different ways:
Use the ISIS command isis2std to generate tif (and tfw) files.
When I try to open the tif file in QGIS it asks me to choose a projection type (side question, is there a suitable projection for Mars? I always choose WGS 84, stupid I know but I don't know a more sensible option). Then once the raster is loaded it automatically displays as a grayscale image but my coordinates are not in degrees, they appear to be in pixels and have a range of 100s of thousands.
This method produces a tif image of ~100 Mb from an original .cub of close to 1 Gb.
Use gdal: gdal_translate -of GTiff input_mapped.cub output.tif.
This time I don't get asked to choose a projection type. The projection takes on 'USER:100002'. Hopefully this means that it is managing to read the appropriate Mars projection from the ISIS cub? The image displays as a solid grey box in grey scale this time, but I can see details by switching to a different colour mapping scheme. Again though my coordinates are not in degrees, they range in the hundreds of thousands again.
This method produces a GTiff with the same ~1 Gb size as the original .cub image.
Open the ISIS .cub file directly in QGIS.
Has basically the same effect as for method 2.
Because of the file sizes I'd prefer a variation of method 1, but with a suitable projection and georeferencing scheme for Mars.
Edit: Here is the georeference, and the output of gdalinfo on the original ISIS .cub file:
georeference (in python):
>>>import gdal >>>from gdalconst import * >>>fn = 'P01_001356_1747_XN_05S221W.map.cub' >>>ds = gdal.Open(fn, GA_ReadOnly) >>>gt = ds.GetGeoTransform() >>>gt (-22085.510544416, 5.1698292472885, 0.0, -234679.22885141, 0.0, -5.1698292472885)
gdalinfo (from terminal):
$gdalinfo file.cub Driver: ISIS3/USGS Astrogeology ISIS cube (Version 3) Files: P01_001356_1747_XN_05S221W.map.cub P01_001356_1747_XN_05S221W.map.cub.aux.xml Size is 8526, 30111 Coordinate System is: PROJCS["Sinusoidal Mars", GEOGCS["GCS_Mars", DATUM["D_Mars", SPHEROID["Mars",3396190,0]], PRIMEM["Reference_Meridian",0], UNIT["degree",0.0174532925199433]], PROJECTION["Sinusoidal"], PARAMETER["longitude_of_center",138.45730511261], PARAMETER["false_easting",0], PARAMETER["false_northing",0]] Origin = (-22085.510544415999902,-234679.228851410007337) Pixel Size = (5.169829247288500,-5.169829247288500) Corner Coordinates: Upper Left ( -22085.511, -234679.229) (138d 5' 1.74"E, 3d57'33.05"S) Lower Left ( -22085.511, -390347.957) (138d 4'56.04"E, 6d35' 7.46"S) Upper Right ( 21992.454, -234679.229) (138d49'45.19"E, 3d57'33.05"S) Lower Right ( 21992.454, -390347.957) (138d49'50.86"E, 6d35' 7.46"S) Center ( -46.528, -312513.593) (138d27'23.46"E, 5d16'20.26"S) Band 1 Block=406x128 Type=Float32, ColorInterp=Undefined Min=0.033 Max=0.150 Minimum=0.033, Maximum=0.150, Mean=0.080, StdDev=0.020 NoData Value=-3.40282265508890445e+38 Metadata: STATISTICS_MAXIMUM=0.15037615597248 STATISTICS_MEAN=0.080181184414784 STATISTICS_MINIMUM=0.033307410776615 STATISTICS_STDDEV=0.020299974127104