<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Le 28/08/2024 à 17:26, Michał Kowalczuk
      a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAP+FqQCNnxcoZ8pU00qJt6cPgJ9OVxVL8FgvBuddVUw_eVhcPg@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">First produces correct output
        <div><i>gdal_translate -srcwin 33492026 20550638 8019970 4412002
            -outsize 1576 867 "WMTS:<a
href="https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSImageryOnly,tilematrixset=GoogleMapsCompatible"
              moz-do-not-send="true" class="moz-txt-link-freetext">https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSImageryOnly,tilematrixset=GoogleMapsCompatible</a>"
            tile_ok.png<br>
          </i></div>
        <div><br>
        </div>
        <div>The following for higher level fails:</div>
        <div><i>gdal_translate -srcwin 36228140 21140450 191172 105168
            -outsize 1576 867 "WMTS:<a
href="https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSImageryOnly,tilematrixset=GoogleMapsCompatible"
              moz-do-not-send="true" class="moz-txt-link-freetext">https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSImageryOnly,tilematrixset=GoogleMapsCompatible</a>"
            tile_error.png</i></div>
      </div>
    </blockquote>
    <p><i>yes, and ? gdal_translate returns in error as expected due to
        the missing tiles. If you want HTTP 400 to be silently ignored,
        you can do:</i></p>
    <p><i>gdal_translate  
"WMTS:<a class="moz-txt-link-freetext" href="https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSImageryOnly,tilematrixset=GoogleMapsCompatible">https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml,layer=USGSImageryOnly,tilematrixset=GoogleMapsCompatible</a>"
        tmp.wmts -of wmts</i></p>
    <p><i>and edit tmp.wtms to add 400 in <ZeroBlockHttpCodes><br>
      </i></p>
    <blockquote type="cite"
cite="mid:CAP+FqQCNnxcoZ8pU00qJt6cPgJ9OVxVL8FgvBuddVUw_eVhcPg@mail.gmail.com">
      <div dir="ltr">
        <div><br>
          <br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">śr., 28 sie 2024 o 17:07 Even
          Rouault <<a href="mailto:even.rouault@spatialys.com"
            moz-do-not-send="true" class="moz-txt-link-freetext">even.rouault@spatialys.com</a>>
          napisał(a):<br>
        </div>
        <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div>
            <p>If you could provide a gdal_translate command line
              reproducing the issue (likely using -srcwin + -outsize or
              -srcwin + -ovr to select the appropriate tile), that would
              make investigation easier<br>
            </p>
            <div>Le 28/08/2024 à 16:52, Michał Kowalczuk via gdal-dev a
              écrit :<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">Dear GDAL friends,
                <div>any thoughts on this issue?</div>
                <div><br>
                </div>
                <div>Regards,</div>
                <div>Michał</div>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">wt., 27 sie 2024 o
                  17:40 Michał Kowalczuk <<a
                    href="mailto:michkowalczuk@gmail.com"
                    target="_blank" moz-do-not-send="true"
                    class="moz-txt-link-freetext">michkowalczuk@gmail.com</a>>
                  napisał(a):<br>
                </div>
                <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                  <div dir="ltr">
                    <div>Hi!</div>
                    I'm wondering if the last issue 10348 was fully
                    solved.
                    <div>Try use the following WMTS server and to zoom
                      to level 9-10, e.g. small island in the
                      Mediterranean
                      <div>
                        <p style="margin:0px"><a
href="https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml"
                            target="_blank" moz-do-not-send="true"><span
style="font-family:arial,"sans-serif";color:rgb(114,159,207)">https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml</span></a></p>
                        <p style="margin:0px">For a sample tile </p>
                        <p style="margin:0px"><a
href="https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/tile/1.0.0/USGSImageryOnly/default/GoogleMapsCompatible/10/392/514"
                            target="_blank" moz-do-not-send="true"
                            class="moz-txt-link-freetext">https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS/tile/1.0.0/USGSImageryOnly/default/GoogleMapsCompatible/10/392/514</a></p>
                        <p style="margin:0px">arcgis server returns
                          error code 400.</p>
                        <p style="margin:0px"><br>
                        </p>
                        <p style="margin:0px">GDALRasterIO passes so I
                          do not know if there was an error inside. Only
                          logger gives some information, but how to
                          detect such a situation?</p>
                        <p style="margin:0px">A sample logger file
                          attached</p>
                        <br>
                        Kind regards,</div>
                    </div>
                    <div>Michał</div>
                  </div>
                </blockquote>
              </div>
              <br>
              <fieldset></fieldset>
              <pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank"
              moz-do-not-send="true" class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev"
              target="_blank" moz-do-not-send="true"
              class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
            </blockquote>
            <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank"
            moz-do-not-send="true" class="moz-txt-link-freetext">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>