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

2020-08-10 Thread Even Rouault
On dimanche 9 août 2020 20:34:28 CEST Jonathan Moules wrote: > I guess this is what you want: > > 132000 > 248000 > > Which I'm assuming means it's not tile. Indeed. Do you know which libopenjp2 version is used ? Do you read a subset of the file ? Does the file appear immediate

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

2020-08-09 Thread Jonathan Moules
I guess this is what you want:     132000     248000 Which I'm assuming means it's not tile. On 2020-08-09 15:46, Even Rouault wrote: On dimanche 9 août 2020 15:30:12 CEST Jonathan Moules wrote: > Hi Even, > > Ah, it's comma delimited. I tried spaces. > > Here's the response, wit

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

2020-08-09 Thread Even Rouault
On dimanche 9 août 2020 15:30:12 CEST Jonathan Moules wrote: > Hi Even, > > Ah, it's comma delimited. I tried spaces. > > Here's the response, with with light editing to get rid of duplicate > info (The bands are all the same). Nothing in the output with the string > "tile". Ah, sorry, I now see

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

2020-08-09 Thread Jonathan Moules
Hi Even, Ah, it's comma delimited. I tried spaces. Here's the response, with with light editing to get rid of duplicate info (The bands are all the same). Nothing in the output with the string "tile". Cheers, Jonathan OPENJPEG: info: Start to read j2k main header (0). OPENJPEG: info: Main

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

2020-08-09 Thread Even Rouault
On dimanche 9 août 2020 12:47:33 CEST Jonathan Moules wrote: > Hi Even, > Thanks for getting back to me. I'm a little rusty with GDAL; it has > probably been 5+ years since I last used it. > > I can confirm my QGIS install version (OSGEO4W) does have the JP2ECW > driver (`gdalinfo --formats`). >

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

2020-08-09 Thread Jonathan Moules
Hi Even, Thanks for getting back to me. I'm a little rusty with GDAL; it has probably been 5+ years since I last used it. I can confirm my QGIS install version (OSGEO4W) does have the JP2ECW driver (`gdalinfo --formats`). I'm using the Python GDAL build from https://www.lfd.uci.edu/~gohlke/

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

2020-08-09 Thread Even Rouault
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 "

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

2020-08-08 Thread Jonathan Moules
Hi List, I have a JP2 file I'm trying to process with Rasterio in Python. But I'm getting this error: rasterio.errors.RasterioIOError: Read or write failed. FILENAME.jp2, band 1: IReadBlock failed at X offset 40, Y offset 90: opj_decode() failed That error seems to come from GDAL. I've tried