[gdal-dev] Reading JPEG2000 file related to drivers

Yves Jacolin yjacolin at free.fr
Tue Oct 13 04:23:05 PDT 2015


Even,

On Tuesday, October 13, 2015 11:25:47 Even Rouault wrote:
> > * is it possible to choose the driver used by gdal? For instance, in my
> > second test, my gdal install have two driver; ECW SDK and OpenJpeg.
> > Currently, I am building several gdal instance to test each driver :/
> 
> Yes, see https://trac.osgeo.org/gdal/wiki/ConfigOptions#GDAL_SKIP
> 
> For example if you want to exclude the JPEG2000 and JP2OpenJPEG drivers and 
> only use JP2ECW:
> 
> GDAL_SKIP="JPEG2000,JP2OpenJPEG" gdalinfo foo.jp2
It seems that GDAL_SKIP="JPEG2000,JP2OpenJPEG" is not working for gdal 1.11 I 
should use ' ' rather than ",".

Do you know any build issue on trunk or 1.10? I can't build this release from 
git repository.

Do you know any limitation on jp2OpenJpeg? I get a segmentation fault with 
this driver:

Here is the bt (from gdal 1.11, but get almost the same from trunk, line 
number is different):

#0  VSIFTellL (fp=0x0) at cpl_vsil.cpp:604
#1  0x00007ffff7453354 in JP2OpenJPEGDataset_Skip (nBytes=6412192, 
pUserData=0x0) at openjpegdataset.cpp:139
#2  0x00007ffff52ed7a0 in opj_stream_destroy () from 
/usr/local/lib/libopenjp2.so.7
#3  0x00007ffff74544e1 in JP2OpenJPEGDataset::Open (poOpenInfo=0x7fffffff37c0) at 
openjpegdataset.cpp:1079
#4  0x00007ffff7528608 in GDALOpenInternal (oOpenInfo=..., 
papszAllowedDrivers=papszAllowedDrivers at entry=0x0) at gdaldataset.cpp:2314
#5  0x00007ffff7528838 in GDALOpenInternal 
(pszFilename=pszFilename at entry=0x61fc00 
"/home/yjacolin/Documents/Projets/grandlyon_geosupport/01_working_papers/migration_jessie/Ortho_jpg2/UnKiloDeJP2000-
Ratio25-Pixel-10cm.jp2", eAccess=eAccess at entry=GA_ReadOnly, 
    papszAllowedDrivers=papszAllowedDrivers at entry=0x0) at gdaldataset.cpp:2263
#6  0x00007ffff7528877 in GDALOpen (pszFilename=pszFilename at entry=0x61fc00 
"/home/yjacolin/Documents/Projets/grandlyon_geosupport/01_working_papers/migration_jessie/Ortho_jpg2/UnKiloDeJP2000-
Ratio25-Pixel-10cm.jp2", eAccess=eAccess at entry=GA_ReadOnly)
    at gdaldataset.cpp:2254
#7  0x0000000000402da3 in main (argc=2, argv=0x62e1d0) at gdalinfo.c:183

Thanks again,

Y.


More information about the gdal-dev mailing list