#4651 closed defect (fixed)
MrSID driver, JPEG2000 format files and world files
Reported by: | jnovak | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.10.0 |
Component: | default | Version: | 1.8.1 |
Severity: | normal | Keywords: | MrSID JPEG2000 |
Cc: |
Description
I have found that the existing MrSID gdal driver will ignore j2w files for geotransform information if present with JPEG2000 formatted files.
While symlinking the j2w files to sdw is an option, adding code to look for and use a j2w files is simple and seemingly useful.
To apply the attached patch, cd to the mrsid driver directory (frmts/mrsid) and run
patch mrsiddataset.cpp < mrsid.patch
Attachments (1)
Change History (7)
by , 12 years ago
Attachment: | mrsid.patch added |
---|
comment:1 by , 12 years ago
Milestone: | → 2.0.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:2 by , 12 years ago
comment:3 by , 12 years ago
comment:4 by , 10 years ago
Is the bug fixed? The ECW and MrSID drivers do ignore the j2w in 1.10.1! But NEWS of 1.10.0 tell that Multi driver changes:
- Add support for reading .j2w, .jp2w and .wld files for JP2ECW, JP2MrSID, JP2OPENJPEG and JPEG2000 drivers (#4651)
comment:5 by , 10 years ago
Can you demonstrate this with a sample ? The fix is tested in the autotest suite and I've just manually verified it works :
$ gdalinfo ../autotest/gdrivers/data/byte_without_geotransform.jp2 Driver: JP2ECW/ERDAS JPEG2000 (SDK 5.0) Files: ../autotest/gdrivers/data/byte_without_geotransform.jp2 ../autotest/gdrivers/data/byte_without_geotransform.j2w Size is 20, 20 Coordinate System is `' Origin = (440720.000000000000000,3751320.000000000000000) Pixel Size = (60.000000000000000,-60.000000000000000) Metadata: COLORSPACE=GREYSCALE COMPRESSION_RATE_TARGET=2 VERSION=1 Corner Coordinates: Upper Left ( 440720.000, 3751320.000) Lower Left ( 440720.000, 3750120.000) Upper Right ( 441920.000, 3751320.000) Lower Right ( 441920.000, 3750120.000) Center ( 441320.000, 3750720.000) Band 1 Block=256x256 Type=Byte, ColorInterp=Gray Description = Grayscale Overviews: arbitrary
$ GDAL_SKIP="JP2ECW JP2OPENJPEG JPEG2000" gdalinfo ../autotest/gdrivers/data/byte_without_geotransform.jp2 Driver: JP2MrSID/MrSID JPEG2000 Files: ../autotest/gdrivers/data/byte_without_geotransform.jp2 ../autotest/gdrivers/data/byte_without_geotransform.j2w Size is 20, 20 Coordinate System is `' Origin = (440720.000000000000000,3751320.000000000000000) Pixel Size = (60.000000000000000,-60.000000000000000) Corner Coordinates: Upper Left ( 440720.000, 3751320.000) Lower Left ( 440720.000, 3750120.000) Upper Right ( 441920.000, 3751320.000) Lower Right ( 441920.000, 3750120.000) Center ( 441320.000, 3750720.000) Band 1 Block=20x20 Type=Byte, ColorInterp=Gray Minimum=128.000, Maximum=240.000, Mean=130.600, StdDev=13.156 Metadata: STATISTICS_MAXIMUM=240 STATISTICS_MEAN=130.6 STATISTICS_MINIMUM=128 STATISTICS_STDDEV=13.155987230155
Patch to enable read of j2w files