<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p><font face="Arial" color="#ffffff"> Hi,<br>
</font></p>
<div class="moz-forward-container">
<p
style="margin-top:0pt;margin-bottom:10pt;border:none;mso-border-left-alt:none;mso-border-top-alt:none;mso-border-right-alt:none;mso-border-bottom-alt:none;mso-border-between:none"
class="docData;DOCY;v5;2646;BQiAAgAAEYQCAAAGiAIAAAO9CQAABcsJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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wAZQAgAHQAbwAgAHMAdQBwAHAAbwByAHQAIABHAEQAQQBMAD8ABQoAAAABAAAAAAgAAAAABQ0AAAABAwAAAAwBAAgAAAAAAKwAAAABGwAAAAEGAAAAAAkGAAAAABoGAwAAAAwBABsGAAAAAAKHAAAABV4AAAABAwAAAAwBAAhRAAAAAEwAAABDAHUAcgByAGUAbgB0AGwAeQAgAEkAIAB1AHMAZQAgAHQAaABlACAAZgBvAGwAbABvAHcAaQBuAGcAIABvAHAAdABpAG8AbgBzADoABQ0AAAABAwAAAAwBAAgAAAAABQ0AAAABAwAAAAwBAAgAAAAACgAAAAAAAAAAEQAAAACHAAAAAC0AAAABBgAAAAAJBhsAAAAnBBQBAAALAQEcAQAoBAAAAAAdAQApBMgAAAAbBgAAAAABSwAAACgBBykBByoBBysBBRMBAQgEFgAAABYEFgAAABkGCgAAAGUAbgAtAFUAUwAaBgoAAABhAHIALQBTAEEAGwYKAAAAZQBuAC0AVQBTAAIAAAAA"><font
face="Arial" color="#ffffff"><span style="font-size: 11pt;">I
want to process JP2 data via vsicurl. Which works so far. <br>
Unfortunately hundreds of requests are sent, even if only
the data of one tile is required. <br>
I understand that due to the structure of a JP2 file
multiple requests are necessary. But it lo</span><span
style="font-size: 11pt;">oks like GDAL is searching every
single tile (resulting in ~120 requests).</span></font></p>
<p
style="margin-top:0pt;margin-bottom:10pt;border:none;mso-border-left-alt:none;mso-border-top-alt:none;mso-border-right-alt:none;mso-border-bottom-alt:none;mso-border-between:none"
class="docData;DOCY;v5;2646;BQiAAgAAEYQCAAAGiAIAAAO9CQAABcsJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAGUAbgAtAFUAUwAaBgoAAABhAHIALQBTAEEAGwYKAAAAZQBuAC0AVQBTAAIAAAAA"><font
face="Arial" color="#ffffff"><span style="font-size: 11pt;">Is
there a way to reduce the number of requests?<br>
</span></font></p>
<font face="Arial" color="#ffffff"> </font>
<p
style="margin-top:0pt;margin-bottom:10pt;border:none;mso-border-left-alt:none;mso-border-top-alt:none;mso-border-right-alt:none;mso-border-bottom-alt:none;mso-border-between:none"><font
face="Arial" color="#ffffff"><span style="font-size: 11pt;">I
have already tried the JP2ECW-ERDAS driver, same result.</span></font></p>
<font face="Arial" color="#ffffff"></font>
<p
style="margin-top:0pt;margin-bottom:10pt;border:none;mso-border-left-alt:none;mso-border-top-alt:none;mso-border-right-alt:none;mso-border-bottom-alt:none;mso-border-between:none"><font
face="Arial" color="#ffffff"><span style="font-size: 11pt;">Do
I have to configure GDAL in a certain way?</span></font></p>
<font face="Arial" color="#ffffff"> </font>
<p
style="margin-top:0pt;margin-bottom:10pt;border:none;mso-border-left-alt:none;mso-border-top-alt:none;mso-border-right-alt:none;mso-border-bottom-alt:none;mso-border-between:none"><font
face="Arial" color="#ffffff"><span style="font-size: 11pt;">cmd
for request:</span></font></p>
<font face="Arial" color="#ffffff"> </font>
<p><font face="Arial" color="#ffffff"> #!/bin/bash<br>
</font> <font face="Arial" color="#ffffff"><br>
export GDAL_DISABLE_READDIR_ON_OPEN="YES"<br>
export CPL_VSIL_CURL_ALLOWED_EXTENSIONS="jp2"<br>
export CPL_CURL_VERBOSE="YES"<br>
export GDAL_HTTP_MERGE_CONSECUTIVE_RANGES="YES"<br>
</font> <font face="Arial" color="#ffffff"><br>
gdal_translate --debug ON -srcwin 0 0 256 256
/vsicurl/<a class="moz-txt-link-freetext" href="http://localhost:8083/T33UWP_20220515T100031_TCI_10m_J2Lmin.jp2">http://localhost:8083/T33UWP_20220515T100031_TCI_10m_J2Lmin.jp2</a>
./out_subWin.tif<br>
</font> </p>
<font face="Arial" color="#ffffff"> </font>
<p
style="margin-top:0pt;margin-bottom:10pt;border:none;mso-border-left-alt:none;mso-border-top-alt:none;mso-border-right-alt:none;mso-border-bottom-alt:none;mso-border-between:none"><font
face="Arial" color="#ffffff"><span style="font-size: 11pt;">What
options do I need to specify when creating the JP2 file to
support GDAL?</span></font></p>
<font face="Arial" color="#ffffff"> </font>
<p
style="margin-top:0pt;margin-bottom:10pt;border:none;border-left:none;border-top:none;border-right:none;border-bottom:none;mso-border-between:none"><font
face="Arial" color="#ffffff"><span style="font-size: 11pt;">Currently
I use the following options:</span></font></p>
<font face="Arial" color="#ffffff"> </font>
<p
style="margin-top:0pt;margin-bottom:10pt;border:none;border-left:none;border-top:none;border-right:none;border-bottom:none;mso-border-between:none"><span
style="font-family:'Arial';font-size:11pt;color:#000000;mso-style-textfill-fill-color:#000000"><font
face="Arial" color="#ffffff"> #!/bin/bash<br>
<br>
gdal_translate \<br>
-of JP2OpenJPEG \<br>
-co QUALITY=100 \<br>
-co TLM=YES \<br>
-co PLT=YES \<br>
-co PROGRESSION=LRCP \<br>
-co WRITE_METADATA=YES \<br>
../test_data/T33UWP_20220515T100031_TCI_10m.tif \<br>
./T33UWP_20220515T100031_TCI_10m_J2Lmin.jp2</font></span></p>
<p
style="margin-top:0pt;margin-bottom:10pt;border:none;border-left:none;border-top:none;border-right:none;border-bottom:none;mso-border-between:none"><span
style="font-family:'Arial';font-size:11pt;color:#000000;mso-style-textfill-fill-color:#000000"><font
face="Arial" color="#ffffff">Some logs:</font></span></p>
<p
style="margin-top:0pt;margin-bottom:10pt;border:none;border-left:none;border-top:none;border-right:none;border-bottom:none;mso-border-between:none"><span
style="font-family:'Arial';font-size:11pt;color:#000000;mso-style-textfill-fill-color:#000000"><font
face="Arial" color="#ffffff">[gdal degug
output](<a class="moz-txt-link-freetext" href="https://pastebin.com/vTf7tjLJ">https://pastebin.com/vTf7tjLJ</a>)<br>
[nginx logs](<a class="moz-txt-link-freetext" href="https://pastebin.com/8bWW15Tp">https://pastebin.com/8bWW15Tp</a>)<br>
[gdalinfo](<a class="moz-txt-link-freetext" href="https://pastebin.com/HWSmypEQ">https://pastebin.com/HWSmypEQ</a>)<br>
</font></span><span
style="font-family:'Arial';font-size:11pt;color:#000000;mso-style-textfill-fill-color:#000000"><font
face="Arial" color="#ffffff">[opj_dump](<a class="moz-txt-link-freetext" href="https://pastebin.com/rdYbHEnY">https://pastebin.com/rdYbHEnY</a>)<br>
</font></span><span
style="font-family:'Arial';font-size:11pt;color:#000000;mso-style-textfill-fill-color:#000000"><font
face="Arial" color="#ffffff">[kdu_jp2info](<a class="moz-txt-link-freetext" href="https://pastebin.com/atVUfeVx">https://pastebin.com/atVUfeVx</a>)</font></span><br>
<span
style="font-family:'Arial';font-size:11pt;color:#000000;mso-style-textfill-fill-color:#000000"></span></p>
</div>
</body>
</html>