Bug #2244: Pixel (Line/Sample) Projection Offset Issue
mimap2isis - Import PDS formatted Kaguya MI MAP file to ISIS3 cube format
Mentor: Trent Hare
As part of the pixel offset issue (import/export)
#6 Updated by Trent Hare almost 2 years ago
These are going to be preliminary numbers I'm not sure what the correct values should be!
(1) grab map projected Kaguya L35 data (please place in testing location):
(2) A bug was just fix and not in stable so first set isis. This fix correctly adjusts the incorrect PDS SAMPLE_PROJECTION_OFFSET
log into prog21 to run beta area
$ isis /work/projects/isis/latest/m02358/isis
(3) run conversion
$ mimap2isis from=MIA_3C5_03_02024S140E3586SC.img to=MIA_3C5_03_02024S140E3586SC_mimap.cub setnullrange=yes nullmin=-30000 nullmax=-30000
(4) test ProjectionOffset X,Y using maplab (in typical ISIS latest area)
maplab from=MIA_3C5_03_02024S140E3586SC_mimap.cub map=MIA_3C5_03_02024S140E3586SC_maplab.cub sample=0.5 line=0.5 coordinates=latlon lat=-13.73339844 lon=358.31103516
Now look at X,Y offsets in both ISIS cubes. They should be the same (but are not).
Just using the pure Simple Cylindrical map projections equation they should be
X = 10865191.07999640 (X = min_lon * PI/180.0 * 1737400) where min_lon = 358.3110352
Y = -416442.65341059 (Y = max_lat * PI/180.0 * 1737400) where max_lat=-13.73339844
ISIS sets them to these values (mimap.cub)
UpperLeftCornerX = -51207.65772 for a difference of 7.41497739
UpperLeftCornerY = -416449.95948 for a difference of 7.50025059
ISIS is apparently also wrapping the the min longitude 358.3110352 (min_Lon - 360) to -1.68896484 (which must be another issue in the label). Perhaps ISIS is running (min_lon - 360) for Longitudes above 180? Anyway, using this the map projection equation would be:
X = -51215.07269739 (X = -1.68896484 PI/180.0 * 1737400)
If ISIS is converting the Lons then it should be reflected in the ISIS output label. Currently they are still being reported as ~358 degrees.
X is wonky but seems correct but with a 1/2 pixel offset
Y seems correct but but with a 1/2 pixel offset
So products in PDS standard are suppose to apply a PIXEL_OFFSET by adding 0.5 pixels to get to the corner from the pixel center. For this label the offset should be 0.0.
#17 Updated by John Bonn over 1 year ago
The PDS updates resulted in the following change to the ISIS cube (tested by the mimap2isis default test):
UpperLeftCornerX = -970339.58436 <meters> UpperLeftCornerY = 1971009.91524 <meters> to UpperLeftCornerX = -970354.39068 <meters> UpperLeftCornerY = 1971024.72156 <meters>
this is consistent with the 1 pixel offset at a scale of
MAP_SCALE = 1.480632e-02 <km/pixel>^M