WMTS - Need TileLevel option Servers responding with bad capabilities

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

WMTS - Need TileLevel option Servers responding with bad capabilities

esacree

Question:  Is it possible to get a TileLevel option added to the new GDAL WMTS driver?

Reason:  WMTS servers at USGS and ESRI are returning XML Capabilities with TileLevel 18 (Google) or TileLevel 19 (default028mm).   The USGS help desk said that the tile servers are only serving up to Tile Level 15.  The new GDAL WMTS driver always request data from the max TileLevel in the Capabilities.  The mismatch between the WMTS XML capabilities and the actual maximum TileLevel are causing the GDAL WMTS driver requests to fail with Error 404 (not found).

I have requested that they correct the WMTS XML Capabilities documents.  

Suggestion:  Could a "TileLevel" parameter be added to the WMTS GDAL driver to limit the TileLevel to one that is available?   A TileLevel parameter would help work around this situation.

Thanks!

Elaine
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WMTS - Need TileLevel option Servers responding with bad capabilities

jratike80
esacree wrote
Question:  Is it possible to get a TileLevel option added to the new GDAL WMTS driver?

Reason:  WMTS servers at USGS and ESRI are returning XML Capabilities with TileLevel 18 (Google) or TileLevel 19 (default028mm).   The USGS help desk said that the tile servers are only serving up to Tile Level 15.  The new GDAL WMTS driver always request data from the max TileLevel in the Capabilities.  The mismatch between the WMTS XML capabilities and the actual maximum TileLevel are causing the GDAL WMTS driver requests to fail with Error 404 (not found).

I have requested that they correct the WMTS XML Capabilities documents.  

Suggestion:  Could a "TileLevel" parameter be added to the WMTS GDAL driver to limit the TileLevel to one that is available?   A TileLevel parameter would help work around this situation.

Thanks!

Elaine
Hi,

You can do what Even suggested in https://lists.osgeo.org/pipermail/gdal-dev/2016-November/045615.html: download and save GetCapabilities on the disk, edit, and read the edited GetCapabilities with GDAL.

-Jukka Rahkonen-
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WMTS - Need TileLevel option Servers responding with bad capabilities

Even Rouault-2
In reply to this post by esacree

On mercredi 30 novembre 2016 12:55:57 CET esacree wrote:

> Question: Is it possible to get a TileLevel option added to the new GDAL

> WMTS driver?

>

> Reason: WMTS servers at USGS and ESRI are returning XML Capabilities with

> TileLevel 18 (Google) or TileLevel 19 (default028mm). The USGS help desk

> said that the tile servers are only serving up to Tile Level 15. The new

> GDAL WMTS driver always request data from the max TileLevel in the

> Capabilities. The mismatch between the WMTS XML capabilities and the actual

> maximum TileLevel are causing the GDAL WMTS driver requests to fail with

> Error 404 (not found).

>

> I have requested that they correct the WMTS XML Capabilities documents.

>

> Suggestion: Could a "TileLevel" parameter be added to the WMTS GDAL driver

> to limit the TileLevel to one that is available? A TileLevel parameter

> would help work around this situation.

 

Hi,

 

I've just added in GDAL trunk TILEMATRIX / ZOOM_LEVEL open options and the corresponding <TileMatrix> / <ZoomLevel> elements as child of <GDAL_WMTS>

 

Examples:

 

gdalinfo WMTSCapabilities_arcgis_usgs.xml -oo tilematrix=14

gdalinfo WMTSCapabilities_arcgis_usgs.xml,tilematrix=14

gdalinfo WMTSCapabilities_arcgis_usgs.xml -oo zoom_level=14

gdalinfo WMTSCapabilities_arcgis_usgs.xml,zoom_level=14

 

 

<GDAL_WMTS>

<GetCapabilitiesUrl>/vsimem/nominal.xml</GetCapabilitiesUrl>

<Layer>lyr1</Layer>

<Style>style=auto</Style>

<TileMatrixSet>tms</TileMatrixSet>

<TileMatrix>tm_0</TileMatrix>

<!-- or --> <ZoomLevel>0</ZoomLevel>

<DataWindow>

<UpperLeftX>-20037508.3428</UpperLeftX>

<UpperLeftY>20037508.3428</UpperLeftY>

<LowerRightX>20037508.34278254</LowerRightX>

<LowerRightY>-20037508.34278254</LowerRightY>

</DataWindow>

<BandsCount>4</BandsCount>

<Cache />

<UnsafeSSL>true</UnsafeSSL>

<ZeroBlockHttpCodes>204,404</ZeroBlockHttpCodes>

<ZeroBlockOnServerException>true</ZeroBlockOnServerException>

</GDAL_WMTS>

 

 

The difference between TILEMATRIX and ZOOM_LEVEL is that the first is the value of the <ows:Identifier> of the <TileMatrix> in the WMTS GetCapabilities response, while the later is the index (starting with 0) of the <TileMatrix> to consider. Sometimes they are the same value (but sometimes the TileMatrix identifier is like EPSG:XXXX:zoom_level)

 

Even

 

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WMTS - Need TileLevel option Servers responding with bad capabilities

esacree
Even,

Thank you!  

Elaine
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WMTS - Need TileLevel option Servers responding with bad capabilities

esacree
In reply to this post by esacree

Even,

I tried the daily build from 9-Dec-2016.  The new ZoomLevel parameter is there and the value is extracted.  Unfortunately, GDAL is still using the maximum tile level from the capabilities document.

USGS hasn't responded to my request to fix their capabilities documents.  ESRI's world time zones WMTS server appears to have the same problem.  The capabilities advertises more zoom levels than are available.

Elaine
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WMTS - Need TileLevel option Servers responding with bad capabilities

Even Rouault-2

On vendredi 16 d├ęcembre 2016 13:14:37 CET esacree wrote:

> Even,

>

> I tried the daily build from 9-Dec-2016. The new ZoomLevel parameter is

> there and the value is extracted. Unfortunately, GDAL is still using the

> maximum tile level from the capabilities document.

 

That works fine for me. Could you share your .xml ?

 

Eve

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WMTS - Need TileLevel option Servers responding with bad capabilities

esacree
I've tried both the "TileLevel" and the "ZoomLevel" parameters both separately and together.  The URL still shows the maximum tile zoom level on the request.

<GDAL_WMTS>
        <GetCapabilitiesUrl>http://basemap.nationalmap.gov/arcgis/rest/services/USGSShadedReliefOnly/MapServer/WMTS/1.0.0/WMTSCapabilities.xml</GetCapabilitiesUrl>
        <Layer>USGSShadedReliefOnly</Layer>
        <Style>default</Style>        <TileMatrixSet>GoogleMapsCompatible</TileMatrixSet>
        <TileLevel>14</TileLevel>
        <ZoomLevel>14</ZoomLevel>
        <Format>image/jpg</Format>
    <DataWindow>
        <UpperLeftX>-9663275.545</UpperLeftX>
        <UpperLeftY>4328130.660</UpperLeftY>
        <LowerRightX>-9647573.528</LowerRightX>
        <LowerRightY>4319175.789</LowerRightY>
        </DataWindow>
    <BandsCount>4</BandsCount>
    <ExtendBeyondDateLine>TRUE</ExtendBeyondDateLine>
    <Cache>
    <Path>./GDALWMSCache</Path>
    <Depth>2</Depth>
    <Extension>.jpg</Extension>
    </Cache>
    <MaxConnections>5</MaxConnections>
    <UnsafeSSL>true</UnsafeSSL>
    <ZeroBlockHttpCodes>404</ZeroBlockHttpCodes>
    <ZeroBlockOnServerException>true</ZeroBlockOnServerException>
</GDAL_WMTS>

Elaine
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WMTS - Need TileLevel option Servers responding with bad capabilities

Even Rouault-2

> I've tried both the "TileLevel" and the "ZoomLevel" parameters both

> separately and together. The URL still shows the maximum tile zoom level on

> the request.

 

You are probably not using a trunk build or a recent enough trunk build. Your XML works fine for me and results in level 14 being fetched.

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: WMTS - Need TileLevel option Servers responding with bad capabilities

esacree
Even,

Ah!  You are correct.  I just loaded the 17-Dec-2016 daily stable branch.  Wrong one.

Thank you for checking the syntax for me.  WMTS should be good to go for the next release of GDAL.
I have 5 other map server types working correctly now.

Thanks for your help!

Elaine
Loading...