Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#5279 closed defect (fixed)

All JPEG2000 drivers should read georeferencing similarly

Reported by: Jukka Rahkonen Owned by: warmerdam
Priority: normal Milestone: 1.11.0
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

JPEG2000 file can have information about georeferencing stored into several places: internal GeoTIFF box, internal GML box, worldfile, or GDAL specific .aux.xml file. Georeferencing information in different places may be ambiguous and especially .aux.xml file usually exists just because updated or more accurate data could not be stored inside the file itself.

For now all JPEG2000 drivers do not read georeferencing data in a consistent way. For example JP2KAK and JP2ECW drivers use the data from .aux.xml file if it exists while JP2OPENJPEG driver continues to use the data from GeoTIFF box. This means that different JP2 drivers may show different georeferencing for the very same image. For GDAL users this may cause several troubles.

Change History (5)

comment:1 Changed 3 years ago by Even Rouault

Milestone: 2.0
Resolution: fixed
Status: newclosed

trunk r26571 "Add GDALGeorefPamDataset and GDALJP2AbstractDataset classes and use them in JP2KAK, JP2ECW, JP2OpenJPEG and JPEG2000 drivers so that PAM georeferencing consistently overrides internal georeferencing; improve JP2OPENJPEG to be able to encode GCPs in a GeoJP2 box (#5279)"

comment:2 Changed 3 years ago by Jukka Rahkonen

How about JP2MrSID?

comment:3 Changed 3 years ago by Even Rouault

No change in JP2MrSID. I've realized that I can no longer compile it since apparently the LizardTech? SDK v8 no longer include support for it (no liblt_kakadu.a that was found in SDK v7). And the code of JP2MrSID is quite different from other JPEG2000 drivers concerning georeferencing.

comment:4 Changed 3 years ago by Even Rouault

Forget my previous comment about SDK v8 not supporting JPEG2000. This was plain wrong. Actually there was a test in Unix configure that prevented both Kakadu and JP2MrSID, but this is now obsolete and has been removed in r26610

r26611 "MrSID: use GDALJP2AbstractDataset class to have consistant behaviour with other JPEG2000 drivers regarding internal georeferencing vs PAM georeferencing priority (#5279)"

comment:5 Changed 3 years ago by Even Rouault

Milestone: 2.01.11.0
Note: See TracTickets for help on using tickets.