<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    On 2015-07-07 15:34, Carl Godkin wrote:<br>
    <blockquote
cite="mid:CAE=8kmnHO7dnJRC_5sSG2qemoPNOVccJLJS2ACwf0J+9jS+0LQ@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div dir="ltr"><br>
        <div>Hi Andre,</div>
        <div><br>
        </div>
        <div>Thank you very much for the reply.  I hadn't thought of
          querying the levels as you suggest but I'll remember next time
          that it makes a good test.</div>
        <div><br>
        </div>
        <div>However, I'm not sure what I would do with the
          <TileLevel>7</TileLevel>  suggestion</div>
        <div>you make.  </div>
      </div>
    </blockquote>
    Even's response is definitely more accurate/relevant then mine.<br>
    <br>
    I originally thought that the tile set only had so many levels, but
    as Even indicated, it varies by region in this case, so you'd be
    better advised to handle 404 (not found) errors as transparent tiles
    as he suggested. As long as those land areas have data up to the
    TileLevel that is specified (20), that should be all that you need
    to do.<br>
    <br>
    <blockquote
cite="mid:CAE=8kmnHO7dnJRC_5sSG2qemoPNOVccJLJS2ACwf0J+9jS+0LQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>If I change my WMS control file to use that value,
          gdal_translate doesn't work at all so there must be something
          more to it than that.  (I've learned the hard way over the
          years that changing the WMS control file is not for amateurs.)</div>
      </div>
    </blockquote>
    Well, the problem is that srcwin is defined in pixel space, and
    changing the tile level means that the WMS raster is now coarser, so
    naturally has fewer pixels. You would have had to redo whatever
    google merc to pixel space conversion you had done previously as the
    pixel-space window would have changed.<br>
    <br>
    <blockquote
cite="mid:CAE=8kmnHO7dnJRC_5sSG2qemoPNOVccJLJS2ACwf0J+9jS+0LQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>If you could explain what you meant, I'd be very grateful.
          Thanks,</div>
        <div><br>
        </div>
        <div>carl</div>
      </div>
    </blockquote>
    Sorry for the confusion and do let me know if you want more
    clarification,<br>
    André<br>
    <br>
    <blockquote
cite="mid:CAE=8kmnHO7dnJRC_5sSG2qemoPNOVccJLJS2ACwf0J+9jS+0LQ@mail.gmail.com"
      type="cite">
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Jul 7, 2015 at 7:22 AM, Andre
          Vautour <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:andre.vautour@caris.com" target="_blank">andre.vautour@caris.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF"> Looks like that
              server only has 7 levels for that satellite layer:<br>
              <a moz-do-not-send="true"
                href="http://mt.google.com/vt/lyrs=s&x=0&y=0&z=7"
                target="_blank">http://mt.google.com/vt/lyrs=s&x=0&y=0&z=7</a><br>
              <a moz-do-not-send="true"
                href="http://mt.google.com/vt/lyrs=s&x=0&y=0&z=8"
                target="_blank">http://mt.google.com/vt/lyrs=s&x=0&y=0&z=8</a><br>
              <br>
              The terrain and map layers have 22 levels:<br>
              <a moz-do-not-send="true"
                href="http://mt.google.com/vt/lyrs=t&x=0&y=0&z=22"
                target="_blank">http://mt.google.com/vt/lyrs=t&x=0&y=0&z=22</a><br>
              <a moz-do-not-send="true"
                href="http://mt.google.com/vt/lyrs=t&x=0&y=0&z=23"
                target="_blank">http://mt.google.com/vt/lyrs=t&x=0&y=0&z=23</a><br>
              <a moz-do-not-send="true"
                href="http://mt.google.com/vt/lyrs=m&x=0&y=0&z=22"
                target="_blank">http://mt.google.com/vt/lyrs=m&x=0&y=0&z=22</a><br>
              <a moz-do-not-send="true"
                href="http://mt.google.com/vt/lyrs=m&x=0&y=0&z=23"
                target="_blank">http://mt.google.com/vt/lyrs=m&x=0&y=0&z=23</a><br>
              <br>
              So, you'd have to change the TileLevel element:<br>
              <TileLevel>7</TileLevel><br>
              <br>
              That smaller size probably ended up querying tile levels
              < 8 which is why it worked.<br>
              André
              <div>
                <div class="h5"><br>
                  <br>
                  <br>
                  <div>On 2015-07-07 11:02, Carl Godkin wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <div dir="ltr"><br>
                      <div>Hi,</div>
                      <div><br>
                      </div>
                      <div>I would like to know if there's a way to
                        determine if a GDAL WMS download</div>
                      <div>is going to work or not from the information
                        in the local description file.</div>
                      <div><br>
                      </div>
                      <div>I'm using C++ code to do this, but can
                        illustrate my question with a gdal_translate</div>
                      <div>command.  This command fails:</div>
                      <div><br>
                      </div>
                      <div>
                        <div>gdal_translate -outsize 6700 6700 \</div>
                        <div>     -srcwin 144884562 100729336 178000
                          178687 \</div>
                        <div>     frmt_wms_googlemaps_tms.xml \</div>
                        <div>     out.tif</div>
                      </div>
                      <div><br>
                      </div>
                      <div>
                        <div>Input file size is 268435456, 268435456</div>
                        <div>0...10...20...30...40...50...60...70ERROR
                          1: GDALWMS: Unable to download block 35372,
                          24624.</div>
                        <div>  URL: <a moz-do-not-send="true"
                            href="http://mt.google.com/vt/lyrs=s&x=35372&y=24624&z=16"
                            target="_blank">http://mt.google.com/vt/lyrs=s&x=35372&y=24624&z=16</a></div>
                        <div>  HTTP status code: 404, error: (null).</div>
                        <div>ERROR 1: frmt_wms_googlemaps_tms.xml, band
                          1: IReadBlock failed at X offset 35372, Y
                          offset 24624</div>
                      </div>
                      <div><br>
                      </div>
                      <div>but if I change the -outsize arguments to
                        6500 and 6500, it works fine.  </div>
                      <div><br>
                      </div>
                      <div>I am perfectly willing to accept the
                        limitations of what's available, but can I tell
                        where that limit will be?</div>
                      <div><br>
                      </div>
                      <div>The service file is from the frmts/wms
                        directory with the "Satellite" ServerURL line
                        active instead of the "Map" line.</div>
                      <div><br>
                      </div>
                      <div>Notes: </div>
                      <div>1. Curiously, the default "Map" ServerURL
                        works to much higher resolution (at least 15000)
                        which makes me</div>
                      <div>think that the answer to my question will be
                        "no" since the service description files are
                        otherwise identical!</div>
                      <div>2. The map area above is Italy, but I see the
                        same sort of behavior around the world.</div>
                      <div><br>
                      </div>
                      <div>I am using GDAL 1.11.2 on Windows7 x64, but
                        see the same behavior on Linux RHEL5 64-bit as
                        well.</div>
                      <div><br>
                      </div>
                      <div>Thank you very much for any insight,</div>
                      <div><br>
                      </div>
                      <div>carl</div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <pre>_______________________________________________
gdal-dev mailing list
<a moz-do-not-send="true" href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></pre>
              </blockquote>
            </div>
            <br>
            _______________________________________________<br>
            gdal-dev mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.osgeo.org/mailman/listinfo/gdal-dev"
              rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
  </body>
</html>