[gdal-dev] Outside of Image Area Warnings gdal_translate
Even Rouault
even.rouault at mines-paris.org
Wed May 21 05:21:49 PDT 2014
Le mercredi 21 mai 2014 13:39:43, David Fawcett a écrit :
> I am running gdal_translate to composite image tiles in a vrt and reduce
> the output image size. I ran it at outsize 50% 50% and received no
> warnings. When I bumped the outsize up to 75%, I got quite a few warnings
> like the one below.
>
> Warning 1: Right position of the decoded area (region_x1=5120) is outside
> the image area (Xsiz=5000).
>
> This one gave no warnings:
> gdal_translate img_index.vrt mpls50.jp2 -outsize 50% 50% -of JP2OpenJPEG
> -co QUALITY=25 --config GDAL_MAX_DATASET_POOL_SIZE 10
>
> This one produced warnings
> gdal_translate img_index.vrt mpls7575.jp2 -outsize 75% 75% -of JP2OpenJPEG
> -co QUALITY=75 --config GDAL_MAX_DATASET_POOL_SIZE 10
>
> GDAL version is 1.10
>
> Any suggestions on how to avoid the warnings?
The warning come from the openjpeg library and suggests that the GDAL driver
issue an invalid query extending over the right of an image. Which is indeed
the case. I've just fixed it with http://trac.osgeo.org/gdal/ticket/5480
Looking at the openjpeg code, it looks like it should properly adjust the
request to what expects the GDAL driver, so the end result should be OK.
The fact that you get the warning at some subsampling ratio and not at others
come from the fact that the overview dimensions are not the same and the GDAL
driver adjusts its strategy how to work with openjpeg API (there's a tile API
and a window API. The last one was the one that issued the warning)
Another thing I wanted to mention is that the fact you ran into this issue
reveals that your JPEG2000 images are mono-tile. Which is OK per se. The
OpenJPEG library just doesn't work very efficiently with such images (basically
even if you need one pixel, it will decode the whole image). Other JPEG2000
libraries are able to use other JPEG2000 mechanisms to operate more efficiently.
>
> Thanks,
>
> David.
--
Geospatial professional services
http://even.rouault.free.fr/services.html
More information about the gdal-dev
mailing list