Opened 2 years ago

Closed 18 months ago

Last modified 16 months ago

#5941 closed defect (fixed)

Update default PDS offset shift

Reported by: thare Owned by: warmerdam
Priority: normal Milestone: 1.11.4
Component: default Version: svn-trunk
Severity: normal Keywords: PDS pixel offset default
Cc: konrad.willner@…, sebastian.walter@…

Description

We recently found, thanks to colleagues at TU-Berlin, FU-Berlin and others, that the defaults used in ISiS (and thus GDAL) for PDS Sample/Line? offset shifts are incorrect. The PDS image used to test the offset were faulty which help to propagate this issue (specifically the MOLA MEGDR labels http://pds-geosciences.wustl.edu/missions/mgs/megdr.html ).

This is related to tract ticket #3940 https://trac.osgeo.org/gdal/ticket/3940

Backgroud: Due to confusing and almost conflicting information in the PDS (version 3) spec, this issue continues to be a problem in the community. We are hoping to release a summary paper on the topic and as ticket 3940 alludes to, perhaps include in GDAL the ability to correct the "known" PDS archives which have these bad offsets. Currently in GDAL these corrections must be applied by the user (manually). ISIS3, using the table listed in ticket #3940, does try to correct for bad offsets in PDS archives (ingest only). This patch to GDAL will also be pushed into ISIS3 also.

The simple update to be made would be to set

double dfSampleOffset_Shift = 0.5; double dfLineOffset_Shift = 0.5;

from the original bad values of

double dfSampleOffset_Shift = -0.5; double dfLineOffset_Shift = -0.5;

To test whether this corrects the problem. The label from the LOLA DEMs can be used (e.g. ldem_4.lbl). When correct the center of image in the X,Y will be perfectly 0,0 as readout by gdalinfo

gdalinfo ldem_4.lbl

should report a center in meters of 0.0, 0.0

I have attached the label portion of the image (but not the image itself) which can be downloaded from: binary: http://pds-geosciences.wustl.edu/lro/lro-l-lola-3-rdr-v1/lrolol_1xxx/data/lola_gdr/cylindrical/img/ldem_4.img detached label: http://pds-geosciences.wustl.edu/lro/lro-l-lola-3-rdr-v1/lrolol_1xxx/data/lola_gdr/cylindrical/img/ldem_4.lbl parent link: http://pds-geosciences.wustl.edu/missions/lro/lola.htm

-Trent

Attachments (1)

ldec_4.lbl (3.7 KB) - added by thare 2 years ago.
Test label from a LOLA DEM. Once corrected gdalinfo should report an image center in X,Y meters perfectly at 0,0. This is just the label which can be used with out the binary portion for testing.

Download all attachments as: .zip

Change History (6)

Changed 2 years ago by thare

Attachment: ldec_4.lbl added

Test label from a LOLA DEM. Once corrected gdalinfo should report an image center in X,Y meters perfectly at 0,0. This is just the label which can be used with out the binary portion for testing.

comment:1 Changed 19 months ago by Even Rouault

Trent, I'm reviewing tickets target 1.11.3 as it is planned to be released in 2 weeks. I didn't exactly find the lines you mention, but I presume the changes you meant are :

Index: frmts/pds/pdsdataset.cpp
===================================================================
--- frmts/pds/pdsdataset.cpp	(revision 29939)
+++ frmts/pds/pdsdataset.cpp	(working copy)
@@ -358,10 +358,10 @@
     double   dfLineOffset_Mult;
 
     dfSampleOffset_Shift = 
-        CPLAtof(CPLGetConfigOption( "PDS_SampleProjOffset_Shift", "-0.5" ));
+        CPLAtof(CPLGetConfigOption( "PDS_SampleProjOffset_Shift", "0.5" ));
     
     dfLineOffset_Shift = 
-        CPLAtof(CPLGetConfigOption( "PDS_LineProjOffset_Shift", "-0.5" ));
+        CPLAtof(CPLGetConfigOption( "PDS_LineProjOffset_Shift", "0.5" ));
 
     dfSampleOffset_Mult =
         CPLAtof(CPLGetConfigOption( "PDS_SampleProjOffset_Mult", "-1.0") );

Is it worth like it or does the logic to detect old products where the original offset was used must also be implemented ? I guess that the frmt_pds.html page would need a paragraph to document the config option and the issue.

comment:2 Changed 18 months ago by Even Rouault

Milestone: 1.11.3

Too late for 1.11.3. Removing target

comment:3 Changed 18 months ago by Even Rouault

trunk r30708 "PDS: change default values of PDS_SampleProjOffset_Shift and PDS_LineProjOffset_Shift to 0.5 (patch by Trent Hare, #5941)"

comment:4 Changed 18 months ago by Even Rouault

Milestone: 1.11.4
Resolution: fixed
Status: newclosed

branches/2.0 r30712, branches/1.11 r30713 "PDS: change default values of PDS_SampleProjOffset_Shift and PDS_LineProjOffset_Shift to 0.5 (patch by Trent Hare, #5941)"

comment:5 Changed 16 months ago by Even Rouault

trunk r31756, branches/2.0 r31757 "VICAR: change PDS_SampleProjOffset_Shift and PDS_LineProjOffset_Shift default values to 0.5 (#5941, per request of Sebastian Walter)"

Note: See TracTickets for help on using tickets.