[gdal-dev] Reading a JP2 file - obj_decode() failed

Even Rouault even.rouault at spatialys.com
Sun Aug 9 03:14:35 PDT 2020


Jonathan,

The GDAL build that comes with rasterio must have only JP2OpenJPEG enabled (the error 
with opj_decode() comes from that driver), whereas the GDAL build in QGIS has also JP2ECW, 
which is used in priority.

The file is large. It would be interesting to know if it is tiled. If you do "gdalinfo --format 
FILENAME.jp2 --config GDAL_SKIP JP2ECW", and look at the beginning of the output, you 
should see lines like

OPENJPEG: nTileW = XXXX
OPENJPEG: nTileH = XXXX

which values are reported ?

If it is tiled (values <= 2048 let's say), this should normally work. Openjpeg will have more 
difficulties with single-tile JPEG2000 files, although latest versions (2.3.1) have seen 
improvements in that regard

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200809/3061157e/attachment.html>


More information about the gdal-dev mailing list