[gdal-dev] JPEG2000 via range request

Kurt Schwehr schwehr at gmail.com
Fri Aug 26 09:12:23 PDT 2022


It costs, but you could try this:

https://gdal.org/drivers/raster/jpipkak.html

I have kakadu, but I have never tried the jpip functionality so I can't say
how well it works.

On Fri, Aug 26, 2022, 5:03 AM Martin <e11904212 at student.tuwien.ac.at> wrote:

> Hi,
>
> I want to process JP2 data via vsicurl. Which works so far.
> Unfortunately hundreds of requests are sent, even if only the data of one
> tile is required.
> I understand that due to the structure of a JP2 file multiple requests are
> necessary. But it looks like GDAL is searching every single tile
> (resulting in ~120 requests).
>
> Is there a way to reduce the number of requests?
>
> I have already tried the JP2ECW-ERDAS driver, same result.
>
> Do I have to configure GDAL in a certain way?
>
> cmd for request:
>
>     #!/bin/bash
>
>     export GDAL_DISABLE_READDIR_ON_OPEN="YES"
>     export CPL_VSIL_CURL_ALLOWED_EXTENSIONS="jp2"
>     export CPL_CURL_VERBOSE="YES"
>     export GDAL_HTTP_MERGE_CONSECUTIVE_RANGES="YES"
>
>     gdal_translate --debug ON -srcwin 0 0 256 256 /vsicurl/
> http://localhost:8083/T33UWP_20220515T100031_TCI_10m_J2Lmin.jp2
> ./out_subWin.tif
>
> What options do I need to specify when creating the JP2 file to support
> GDAL?
>
> Currently I use the following options:
>
>     #!/bin/bash
>
>     gdal_translate \
>         -of JP2OpenJPEG \
>         -co QUALITY=100 \
>         -co TLM=YES \
>         -co PLT=YES \
>         -co PROGRESSION=LRCP \
>         -co WRITE_METADATA=YES \
>         ../test_data/T33UWP_20220515T100031_TCI_10m.tif \
>         ./T33UWP_20220515T100031_TCI_10m_J2Lmin.jp2
>
> Some logs:
>
> [gdal degug output](https://pastebin.com/vTf7tjLJ)
> [nginx logs](https://pastebin.com/8bWW15Tp)
> [gdalinfo](https://pastebin.com/HWSmypEQ)
> [opj_dump](https://pastebin.com/rdYbHEnY)
> [kdu_jp2info](https://pastebin.com/atVUfeVx)
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20220826/7a50bf70/attachment-0001.htm>


More information about the gdal-dev mailing list