Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#4499 closed defect (fixed)

ISIS3 scale_factor wrongly defaulting to 0 for Polar Stereographic

Reported by: thare Owned by: warmerdam
Priority: normal Milestone: 1.9.1
Component: GDAL_Raster Version: 1.9.0
Severity: normal Keywords: ISIS3 Polar Scale Factor


ISIS3 does not explicitly define a scale_factor for the Polar Stereographic projection. During GDAL parsing, since nothing is found, the GDAL scale_factor is getting set to 0 (when it should default to 1).

I believe by adding ', "1.0" ' (I hope as a string) to the line below, it should correctly default to a scale_factor=1.0 when the keyword is not found in the label. Here is the corrected code which is about line 534 in isis3dataset.cpp

    /***********   Grab scaleFactor ************/
    scaleFactor = 
        atof(poDS->GetKeyword( "IsisCube.Mapping.scaleFactor", "1.0"));

Attached is thumbnail lunar image which can be used for testing. Simply running gdalinfo can be used to test to see if the scale_factor is correctly set to 1.

Lastly, it looks like the ISIS2 and PDS readers are already forcing the value correctly to 1 in the GDAL listed projection.

thanks, Trent

Attachments (1)

Moon_spole_grid8bit.cub.bz2 (835.3 KB) - added by thare 9 years ago.
ISIS3 file for polar testing

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by thare

Attachment: Moon_spole_grid8bit.cub.bz2 added

ISIS3 file for polar testing

comment:1 Changed 9 years ago by warmerdam

Resolution: fixed
Status: newclosed

Corrected as suggested in trunk (r23929) and 1.9 branch (r23930).

I haven't actually tested it other than to build it. Let me know if a problem persists.

comment:2 Changed 9 years ago by warmerdam

Component: defaultGDAL_Raster
Note: See TracTickets for help on using tickets.