2

I've been trying to add a TMS layer in QGIS using a GDAL_WMS xml configuration file.

I added UserPwd to the xml and this seems to provide the authentication required by GeoServer but I'm struggling to get it to display correctly and in the correct place.

The map mostly loads as black but occasionally I can find the odd area that displays bits that look a bit like a map however I've yet to get it to load even close to correctly in QGIS.

Does anyone have a specific example of how they successfully added a GeoServer TMS layer using this method?

Example XML

<GDAL_WMS>
<Service name="TMS">  <ServerUrl>http://wms.domain.com/gwc/service/tms/1.0.0/workspace%3Alayername/${z}/${x}/${y}.png</ServerUrl>
</Service>
<DataWindow>
    <UpperLeftX>-20037508.34</UpperLeftX>
    <UpperLeftY>20037508.34</UpperLeftY>
    <LowerRightX>20037508.34</LowerRightX>
    <LowerRightY>-20037508.34</LowerRightY>
    <TileLevel>22</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 />
<OfflineMode>false</OfflineMode>
<UserPwd>user:password</UserPwd>
<ZeroBlockHttpCodes>204,303,400,404,500,501</ZeroBlockHttpCodes>
<ZeroBlockOnServerException>true</ZeroBlockOnServerException>

2
  • 1
    Add your xml configuration file to your question. You can use fake WMS server address and username/password.
    – user30184
    Commented Mar 1, 2016 at 13:09
  • I have edited the original post to show an example configuration file Commented Mar 1, 2016 at 14:15

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.