[gdal-dev] Problems with WMS minidriver

Andre Vautour andre.vautour at caris.com
Tue Apr 28 07:47:16 PDT 2015


On 2015-04-28 11:19, Federico wrote:
> Hi guys, i'm trying to get a wmts layer but i'm getting an error. I think
> that i'm doing something wrong but i don't what's wrong.
>
> URL: http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts
> GetCapabilities:
> http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?service=WMTS&request=GetCapabilities
> Tile from WMTS:
> http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=matrikkel_bakgrunn&STYLE=default&FORMAT=image/png&TILEMATRIXSET=EPSG:4326&TILEMATRIX=EPSG:4326:1&TILEROW=0&TILECOL=2
>
> *My XML file*
> <GDAL_WMS>
> 	<Service name="TMS">
> 		<Version>1.0.0</Version>
> 	
> <ServerUrl>http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts/lyrs=matrikkel_bakgrunn&x=${x}&y=${y}&z=${z}</ServerUrl>
> 	</Service>

Using the TMS mini driver for WMS should work for WMTS as long as the 
following holds true:
* Every tile matrix has the same top-left corner
* Scale denominators increase as powers of 2
* Tile matrix identifiers can be modeled a a prefix with an incremented 
identifier as seems to be the case in this instance: EPSG:4326:1, 
EPSG:4326:2, EPSG:4326:3

Basically, the WMTS tile matrix set needs to be a quad tree.

That being said, I'd expect the server URL to be something like:
http://opencache.statkart.no/gatekeeper/gk/gk.open_wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=matrikkel_bakgrunn&STYLE=default&FORMAT=image/png&TILEMATRIXSET=EPSG:4326&TILEMATRIX=EPSG:4326:${z}&TILEROW=${y}&TILECOL=${x}

André



More information about the gdal-dev mailing list