Opened 11 years ago

Closed 11 years ago

Last modified 11 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 11 years ago.
ISIS3 file for polar testing

Download all attachments as: .zip

Change History (3)

by thare, 11 years ago

Attachment: Moon_spole_grid8bit.cub.bz2 added

ISIS3 file for polar testing

comment:1 by warmerdam, 11 years ago

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 by warmerdam, 11 years ago

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