[gdal-dev] GDAL 1.10 JP2000 Problem/Crash

Dennis Gocke dengo at gmx.net
Thu May 23 08:51:59 PDT 2013


Thanks guys for the info and advise.


I was able to skip the JP2ECW driver and successfully open the file with
the JP2OpenJPEG driver. But the driver is quite slow, in some cases up to
20x slower than the JP2ECW driver loading the same amount of pixels on a
raster where both drivers work. Skipping the JP2OpenJPEG driver leads do no
driver available for opening jp2, so Tamas’ build seems to not include the
other drivers, e.g. JP2MrSID, which is strange, as I’m able to open *.sid
files!?!


It was mentioned that the newer ECW SDK does not have this problem, the
reason for not including it is licensing issues?

Cheers,
Dennis


On Wed, May 22, 2013 at 7:46 PM, Even Rouault
<even.rouault at mines-paris.org>wrote:

> Le mercredi 22 mai 2013 19:22:09, Frank Warmerdam a écrit :
> > Dennis,
> >
> > Ah.  In my experience the ECW SDK 3.3 JPEG2000 support is buggy and I was
> > never really able to trace down the issues.  I would encourage you to
> > consider alternatives - one possibility is the MrSID SDK's JPEG2000
> > support.  If Tamas's build includes MrSID support then all you need to do
> > is set the GDAL_SKIP environment variable to JP2ECW which would make GDAL
> > skip the ECW based driver.   If Tamas hasn't built with MrSID then it
> falls
> > to you to build GDAL which can be somewhat complicated.
>
> I can replicate the crash with the JP2ECW driver with ECW SDK 3.3. It
> occurs
> actually in the SDK itself, not in GDAL, so nothing that we can really do
> about that (except using GDAL API Proxy, see below). Newer versions of the
> SDK
> don't produce this crash.
>
> Frank's above suggestions are the way to go. Tamas' builds do include MrSID
> support as a plugin (XXXX-mrsid.msi packages). But they also include the
> OpenJPEG driver, which can successfully open this file and should be the
> next
> driver used after skipping JP2ECW :
>
> $ gdalinfo --config GDAL_SKIP JP2ECW
> IMG_PHR1A_MS_201202250025599_SEN_PRG_FC_5847-002_R1C1.JP2
>
> Driver: JP2OpenJPEG/JPEG-2000 driver based on OpenJPEG library
> Files: IMG_PHR1A_MS_201202250025599_SEN_PRG_FC_5847-002_R1C1.JP2
>         IMG_PHR1A_MS_201202250025599_SEN_PRG_FC_5847-002_R1C1.JP2.aux.xml
> Size is 10000, 6191
> Coordinate System is `'
> GeoTransform =
>   144.8407819720184, 2.303727068124578e-05, -3.011809327220197e-09
>   -37.76248166104331, -9.154071614724073e-09, -1.808332187648097e-05
> Image Structure Metadata:
>   INTERLEAVE=PIXEL
> Corner Coordinates:
> Upper Left  ( 144.8407820, -37.7624817)
> Lower Left  ( 144.8407633, -37.8744355)
> Upper Right ( 145.0711547, -37.7625732)
> Lower Right ( 145.0711360, -37.8745270)
> Center      ( 144.9559590, -37.8185044)
> Band 1 Block=2048x2048 Type=UInt16, ColorInterp=Red
>   Overviews: 5000x3095, 2500x1547, 1250x773, 625x386, 312x193
>   Overviews: arbitrary
>   Image Structure Metadata:
>     NBITS=12
> Band 2 Block=2048x2048 Type=UInt16, ColorInterp=Green
>   Overviews: 5000x3095, 2500x1547, 1250x773, 625x386, 312x193
>   Overviews: arbitrary
>   Image Structure Metadata:
>     NBITS=12
> Band 3 Block=2048x2048 Type=UInt16, ColorInterp=Blue
>   Overviews: 5000x3095, 2500x1547, 1250x773, 625x386, 312x193
>   Overviews: arbitrary
>   Image Structure Metadata:
>     NBITS=12
> Band 4 Block=2048x2048 Type=UInt16, ColorInterp=Alpha
>   Overviews: 5000x3095, 2500x1547, 1250x773, 625x386, 312x193
>   Overviews: arbitrary
>   Image Structure Metadata:
>     NBITS=12
>
> If you want to use the JP2MrSID driver, you need to set --config GDAL_SKIP
> "JP2ECW JPEG2000 JP2OPENJPEG"
>
> > Dennis,
> > I believe you can use Even's GDAL API Proxy to avoid crashes in third
> >party libraries.  See:
> > http://trac.osgeo.org/gdal/ticket/4979
>
> Indeed,
>
> $ gdalinfo  --config GDAL_API_PROXY YES
> IMG_PHR1A_MS_201202250025599_SEN_PRG_FC_5847-002_R1C1.JP2
> ERROR 1: Read from pipe failed
> gdalinfo failed - unable to open
>
> '/home/even/gdal/data/jpeg2000/FCGC600031035/IMG_PHR1A_MS_002/IMG_PHR1A_MS_201202250025599_SEN_PRG_FC_5847-002_R1C1.JP2'.
>
> But that's only band-aid and you need to use another driver in order to
> open
> the file successfully
>
> Best regards,
>
> Even
>
> --
> Geospatial professional services
> http://even.rouault.free.fr/services.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130523/09093b51/attachment-0001.html>


More information about the gdal-dev mailing list