[GRASS-user] r,in.gdal error when importing a jpeg2000 image

Daniel Victoria daniel.victoria at gmail.com
Wed Jul 18 04:54:13 PDT 2018


Did you try running gdalinfo on your image? Does it work?

The GDAL raster format page [1] lists that JPEG2000 support is not compiled
by default. So it could be that your gdal installation does not recognize
this file

[1] http://www.gdal.org/formats_list.html

On Wed, Jul 18, 2018 at 5:33 AM Paul Shapley <p.shapley at gmail.com> wrote:

> Hi Users,
>
> Trying to import an 8.7gb (jpeg2000) image into Grass 7.4.1 64 bit. I get
> the error below. Tested the image in another OS GIS package and it opens
> without issue. Not sure why Grass wont import it.
>
> Thanks everyone!
>
> Paul Shapley
>
>
> (Wed Jul 18 09:19:16 2018)
>
> r.in.gdal -o input=J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2
> output=aerial_25cm_master memory=3000
> Over-riding projection check
> Importing 3 raster bands...
> Importing raster map <aerial_25cm_master.red>...
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> ERROR 1: Marker is not compliant with its position
> ERROR 1: opj_decode() failed
> ERROR 1: J:\Spatial
> Data\Aerial\APGB_received_20180416\aerial_25cm.jp2, band 1:
> IReadBlock failed at X offset 0, Y offset 0
> ERROR 1: GetBlockRef failed at X block offset 0, Y block
> offset 0
> Please note that the data are left in inconsistent state and may be
> corrupted
> (Wed Jul 18 09:19:40 2018) Command aborted (24 sec)
>
>
>
> --
> *Paul J. Shapley *MSc CGeog (GIS) FRGS
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20180718/12d9bcee/attachment-0001.html>


More information about the grass-user mailing list