[gdal-dev] Problem reading JP2

Even Rouault even.rouault at spatialys.com
Tue Mar 6 12:29:39 PST 2018


Erik,

> 
> recently I downloaded a free 1:1000000 map of France from
> http://professionnels.ign.fr/. The map comes in tiles supposed to be in
> JPEG 2000 Part 1 format. "file" utility says "JPEG 2000 Part 1 (JP2)" and
> the file name ending is .jp2.
> 
> My GDAL (version 2.2.3) was compiled against a patched Jasper library
> (jasper-1.900.1.uuid) and pretends to be able to read .jp2.
> 
> When I try gdalinfo on one of this tiles, however, it says:
> 
>   terminate called after throwing an instance of 'std::length_error'
>     what():  basic_string::_S_create
>   Aborted
> 
> Is this a known issue?

Likely, Jasper can only handle images that fit entirely in RAM and has a number of limitations.

> Is there a solution?

Yes, use another Jpeg2000 driver. OpenJPEG should be able to handle such images. 
Otherwise there are the drivers based on the proprietary SDKs. See
http://gdal.org/formats_list.html

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/20180306/7649fb9a/attachment.html>


More information about the gdal-dev mailing list