Basemap.at WMTS Layer in QGis

QuantumGIS as it is now has no specific entry in its menu to add a WMTS layer. But with the gaining availability of web maps that are offered as tiled maps this becomes increasingly important.

The states of Austria work together to provide a commonly designed map of the whole country offered under the CC-BY 3.0 AT licence. This initiative is called basemap.at and is accessible by the WMTS protocol.

Despite of the absence of an easily accessible manner to add such a layer to QuantumGIS, it is still possible to do so by rerouting the WMTS management directly to the GDAL driver used by QGis to manage raster layers. Since version 1.7 GDAL itself supports WMTS layers. Michael Douchin describes in his blog post OpenStreetMap Tiles in QGIS how to create an XML file containing parameters to connect to the OpenStreetMap WMTS server. The specification of the GDAL-WMTS driver can be viewed on its web page. This XML file can be opened in QGis as a raster source and, given the projection is set right, works without any further modification.

The contents of the XML file needed to specify the connection to the basemap.at WMTS server are:

<GDAL_WMS>
 <Service name="TMS">
  <ServerUrl>http://maps.wien.gv.at/basemap/geolandbasemap/normal/google3857/${z}/${y}/${x}.jpeg</ServerUrl>
 </Service>
 <DataWindow>
  <UpperLeftX>-20037508.34</UpperLeftX>
  <UpperLeftY>20037508.34</UpperLeftY>
  <LowerRightX>20037508.34</LowerRightX>
  <LowerRightY>-20037508.34</LowerRightY>
  <TileLevel>18</TileLevel>
  <TileCountX>1</TileCountX>
  <TileCountY>1</TileCountY>
  <YOrigin>top</YOrigin>
 </DataWindow>
 <Projection>EPSG:3857</Projection>
 <BlockSizeX>256</BlockSizeX>
 <BlockSizeY>256</BlockSizeY>
 <BandsCount>3</BandsCount>
 <Cache />
</GDAL_WMS>

The values within “DataWindow” need further optimization. When I find the time I will take a closer look at the driver specifications and post a corrected version of this file, but this one already works even though Vorarlberg is clipped.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.