<div dir="auto"><div>I wrote the original jpipkak driver years ago and it a driver I would suggest for deprecation but I am no longer involved in j2k development to know how much it is being used.<div dir="auto"><br></div><div dir="auto">You will need a jpip server to use the jpip client. Wavelets are different to cogs and you will get the benefits of progressive display.</div><div dir="auto"><br></div><div dir="auto">Norman</div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 26, 2022, 5:12 PM Kurt Schwehr <<a href="mailto:schwehr@gmail.com">schwehr@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">It costs, but you could try this:<div dir="auto"><br></div><div dir="auto"><a href="https://gdal.org/drivers/raster/jpipkak.html" target="_blank" rel="noreferrer">https://gdal.org/drivers/raster/jpipkak.html</a><br></div><div dir="auto"><br></div><div dir="auto">I have kakadu, but I have never tried the jpip functionality so I can't say how well it works.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 26, 2022, 5:03 AM Martin <<a href="mailto:e11904212@student.tuwien.ac.at" target="_blank" rel="noreferrer">e11904212@student.tuwien.ac.at</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  

    
  
  <div>
    <p><font face="Arial" color="#ffffff"> Hi,<br>
      </font></p>
    <div>
      <p style="margin-top:0pt;margin-bottom:10pt;border:none"><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"><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"><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"><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"><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 href="http://localhost:8083/T33UWP_20220515T100031_TCI_10m_J2Lmin.jp2" rel="noreferrer noreferrer" target="_blank">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"><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"><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"><span style="font-family:'Arial';font-size:11pt;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"><span style="font-family:'Arial';font-size:11pt;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"><span style="font-family:'Arial';font-size:11pt;color:#000000"><font face="Arial" color="#ffffff">[gdal degug
            output](<a href="https://pastebin.com/vTf7tjLJ" rel="noreferrer noreferrer" target="_blank">https://pastebin.com/vTf7tjLJ</a>)<br>
            [nginx logs](<a href="https://pastebin.com/8bWW15Tp" rel="noreferrer noreferrer" target="_blank">https://pastebin.com/8bWW15Tp</a>)<br>
            [gdalinfo](<a href="https://pastebin.com/HWSmypEQ" rel="noreferrer noreferrer" target="_blank">https://pastebin.com/HWSmypEQ</a>)<br>
          </font></span><span style="font-family:'Arial';font-size:11pt;color:#000000"><font face="Arial" color="#ffffff">[opj_dump](<a href="https://pastebin.com/rdYbHEnY" rel="noreferrer noreferrer" target="_blank">https://pastebin.com/rdYbHEnY</a>)<br>
          </font></span><span style="font-family:'Arial';font-size:11pt;color:#000000"><font face="Arial" color="#ffffff">[kdu_jp2info](<a href="https://pastebin.com/atVUfeVx" rel="noreferrer noreferrer" target="_blank">https://pastebin.com/atVUfeVx</a>)</font></span><br>
        <span style="font-family:'Arial';font-size:11pt;color:#000000"></span></p>
    </div>
  </div>

_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" rel="noreferrer noreferrer" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank" rel="noreferrer">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div></div></div>