Opened 8 years ago
Closed 8 years ago
Last modified 7 years ago
#5941 closed defect (fixed)
Update default PDS offset shift
|Reported by:||thare||Owned by:||warmerdam|
|Severity:||normal||Keywords:||PDS pixel offset default|
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
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
Change History (6)
by , 8 years ago
comment:1 by , 8 years ago
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 by , 8 years ago
Too late for 1.11.3. Removing target
comment:3 by , 8 years ago
comment:4 by , 8 years ago
|Status:||new → closed|
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.