# WMS, WMTS, TMS - Query

**URL:** <https://mapwindow.discourse.group/t/wms-wmts-tms-query/859>\
**Category:** MapWinGIS\
**Created:** [January 7, 2021, 5:35pm UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859 "2021-01-07T17:35:35Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![colleen](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@colleen](https://mapwindow.discourse.group/u/colleen)\
**Post date:** [January 7, 2021, 5:35pm UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/1 "2021-01-07T17:35:35Z")

</div>

Hi

I can load OpenStreetMaps with the following  
If providers.Add(providerID, “Custom TMS provider”, “https://{switch:a,b,c}.tile.openstreetmap.org/{zoom}/{x}/{y}.png”, tkTileProjection.SphericalMercator, 0, 18) = False Then

I now need to add the aerial photo provided by our organization. I think it is a WMTS server. Can this be accessed in the same manner as above. I have seen documentation saying that WMTS is not yet supported but that was over a year ago. Has this changed, if not is there another way to load the aerial photos in a speedy fashion. I also have access to the ECW files and the TIFF files.  
This will be a deal breaker for me and it will be a pity as I have been able to do everything else that I could previously do in MapObjects so far.

Regards

Colleen Crawford

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [January 7, 2021, 6:24pm UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/2 "2021-01-07T18:24:42Z")

</div>

Hello Colleen.

I don’t know anything about WMTS, and my initial review of the source code didn’t turn up any results.

We may have spoken about the ECW and/or TIFF files in the past. Both formats are supported, but they are assumed to be a single image as opposed to a set of tiled images. If they are tiled, then they would need to be organized in a directory structure similar to the web-based images (by zoom level and screen position).

Let me know if you need more clarification.

Regards,  
Jerry.

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [January 7, 2021, 8:12pm UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/3 "2021-01-07T20:12:08Z")

</div>

As an afterthought, it may well be that the provider of the WMTS imagery can provide something like a URL that you could try out.

---

<div class="post-metadata">

**Author:** ![colleen](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@colleen](https://mapwindow.discourse.group/u/colleen)\
**Post date:** [January 8, 2021, 11:07am UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/4 "2021-01-08T11:07:04Z")

</div>

From what I understand there is Tile Map Server - is this what Open Street Map is?, then Web Map Server - where you have to give the bounding box coords for 1 image at a time, and then Web Map Tile Server which seems to be similar to Tile Map Server. I was wondering if WMTS would work the same way as the OpenStreetMap.

I saw this  
**TMS** is a protocol created by OSGeo that allows tiles to be requested using integer indices. … **WMTS** is a protocol created by the OGC that allows tiles to be requested using integer indices. It also provides metadata **for** discovery and configuration.  
I was hoping this meant it would work in the same way as Open Street Maps

I have tried the following

If providers.Add(providerID, “[http://w8vmgis01.durban.gov.za/arcgis/rest/services/WebViewers/AerialPhotography2019/ImageServer/WMTS/1.0.0/WMTSCapabilities.xml/{zoom}/{x}/{y}.png](http://w8vmgis01.durban.gov.za/arcgis/rest/services/WebViewers/AerialPhotography2019/ImageServer/WMTS/1.0.0/WMTSCapabilities.xml/%7Bzoom%7D/%7Bx%7D/%7By%7D.png)”, tkTileProjection.SphericalMercator, 0, 18) = False Then

MsgBox “Cannot Load Aerial Photo”

MsgBox providers.ErrorMsg(providers.LastErrorCode)  
End If  
It just gives the error Invalid URL - I tried it without /{zoom}/{x}/{y}.png same error

From QGIS documentation it seems you have to find the path to the WMTSCapablilties.xml and then find the Open Data source icon - then add the path to the .xml and select the server.  
I am struggling with how to do this in MapWinGIS - from documentation it seems like it can be done but I can;t find what parameters to use

This is from the ESRI documentation

[http://map-image-vectorservice-url](http://map-image-vectorservice-url)\>/tilemap/////

The level, row, and column arguments select the level and the top-left tile location, while the width and height specifies the size of the requested area.

It is all very confusing to me. I will continue searching to see if I can find an example of how MapWINGIS opens the WMTSCapablilties.xml so that it displays the images.

There is also SOAP and JSON so not sure which one to use

Regards

Colleen Crawford

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [January 8, 2021, 11:56pm UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/5 "2021-01-08T23:56:13Z")

</div>

Hello Colleen.

Searching the MapWinGIS source code, I see nothing related to WMTS or WMTSCapabilities, etc. I don’t think it is supported. But as you say, you’ve come this far; so before throwing it all away, you might want to consider that since this is all open source, the functionality could be added. At this moment, I don’t know what it would take, and it may not be trivial, but we could look around to see how others are doing it.

---

<div class="post-metadata">

**Author:** ![colleen](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@colleen](https://mapwindow.discourse.group/u/colleen)\
**Post date:** [January 9, 2021, 10:29am UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/6 "2021-01-09T10:29:49Z")

</div>

Thanks for your help.

I will be able to ask the GIS section when they return so maybe I can access it some other way. I did see messages from P meems where they did seem to say that they had been able to access WMTS.  
See below

### **[palmerj](https://github.com/palmerj)** commented [on Jul 12, 2018](https://github.com/MapWindow/MapWinGIS/issues/112#issue-340501541)

Does anyway have any idea why adding and using this GDAL WMTS source as a raster layer is so slow? In QGIS the GDAL WMTS source loads for me in about 5secs, and each pan and zoom of the map on 1920x1200 screen takes about 3sec. But in the MapWinGIS control it’s take x4-5 longer.

[wmts.xml.zip](https://github.com/MapWindow/MapWinGIS/files/2187316/wmts.xml.zip)

[![@pmeems](https://global.discourse-cdn.com/free1/uploads/mapwindow1/original/1X/9208877a9ed812a9ab9d10008f90ebbddc5df5db.png)](https://github.com/pmeems)

Contributor

### **[pmeems](https://github.com/pmeems)** commented [on Jul 12, 2018](https://github.com/MapWindow/MapWinGIS/issues/112#issuecomment-404411781)

Hi Jeremy,

I can confirm the slow behavior. I’m not sure why this is. Probably because the cache is not (properly) used.  
We need to look into this.

We already have an JIRA issue about this: [[MWGIS-9] Support WMTS services - MapWindow5 - Issue tracker](https://mapwindow.atlassian.net/browse/MWGIS-9)  
Now we need a developer with time to work on this.  
Are you by any change a C++ developer or do you have some budget so we can allocate a developer to work on this?

My other option I thought was to load the coords of the images into my own database and then just load the tiff, ecw that is relevant for wherever I am zoomed into. Will have to see how this goes.

Regards

Colleen

---

<div class="post-metadata">

**Author:** ![jTati](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@jTati](https://mapwindow.discourse.group/u/jTati)\
**Post date:** [January 9, 2021, 1:06pm UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/7 "2021-01-09T13:06:23Z")

</div>

Hi Colleen,

do you know the ip-address of your wmts-Server?

when i do a simple

> nslookup w8vmgis01.durban.gov.za

i got an error telling me: non-existent domain.

cheers

---

<div class="post-metadata">

**Author:** ![colleen](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@colleen](https://mapwindow.discourse.group/u/colleen)\
**Post date:** [January 9, 2021, 2:04pm UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/8 "2021-01-09T14:04:54Z")

</div>

Not sure of the IP address, I can find it out, but I think it has something to do with permissions, as I can access it from my work machine, but not from my home machine.

Regards  
Colleen Crawford

---

<div class="post-metadata">

**Author:** ![colleen](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@colleen](https://mapwindow.discourse.group/u/colleen)\
**Post date:** [January 9, 2021, 3:24pm UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/9 "2021-01-09T15:24:36Z")

</div>

This is the error when I try and access it from my home machine  
**w8vmgis01.durban.gov.za** ’s server IP address could not be found.

- Search the web for [w8vmgis01 durban gov za](https://www.bing.com/search?form=ANLKDR&q=w8vmgis01%20durban%20gov%20za)

ERR\_NAME\_NOT\_RESOLVED

From my work machine I can access it but it redirects me to a the GIS Page

Regards

Colleen

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [January 10, 2021, 5:44am UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/10 "2021-01-10T05:44:42Z")

</div>

Hello Colleen.

So I feel a little sheepish. I realize now that although MWGIS doesn’t natively support WMTS, it didn’t occur to me that GDAL might support the format. Of course, as you said in an earlier comment, the trick is to figure out how to use it within the context of MWGIS.

Have you reviewed [this information](https://gdal.org/drivers/raster/wmts.html?highlight=wmts)? I’ve used the Vector drivers through GDAL, but never Raster drivers. I’ll see if there are any remnants in the MapWindow5 source code, or perhaps QGIS.

Jerry.

---

<div class="post-metadata">

**Author:** ![colleen](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@colleen](https://mapwindow.discourse.group/u/colleen)\
**Post date:** [January 10, 2021, 8:41am UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/11 "2021-01-10T08:41:40Z")

</div>

Hi Jerry

Thanks for the help, I looked at your info but not cled up on gdal at all.

It seems I am have the correct looking url - [http://w8vmgis01.durban.gov.za/arcgis/rest/services/WebViewers/AerialPhotography2019/ImageServer/WMTS/1.0.0/WMTSCapabilities.xml](http://w8vmgis01.durban.gov.za/arcgis/rest/services/WebViewers/AerialPhotography2019/ImageServer/WMTS/1.0.0/WMTSCapabilities.xml)  
I have tried it with WMTS: in front as well. It also returns Invalid URL from within the app until I add /{zoom}/{x}/{y}.png - in this case it appears to work but a blank area is displayed on the Map.

Also if I type the url straight into chrome it will take me to the xml data - if I add eg 20/1200/1200.png for the parameters it takes me to the following screen

 ![image.png](https://global.discourse-cdn.com/free1/uploads/mapwindow1/original/1X/e8c04559674f2fc18d66e4bc1d489b332a2e2d3b.png)

If I click on raster image I can see the image but can’t get it to display the image as I can for OpenStreetMaps

I will try and look at the MapWindow code and see if I can figure it out.

Here is some code from the .xml file

```xml
<Capabilities
    xmlns="[http://www.opengis.net/wmts/1.0](http://www.opengis.net/wmts/1.0)"
    xmlns:ows="[http://www.opengis.net/ows/1.1](http://www.opengis.net/ows/1.1)"
    xmlns:xlink="[http://www.w3.org/1999/xlink](http://www.w3.org/1999/xlink)"
    xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)"
    xmlns:gml="[http://www.opengis.net/gml](http://www.opengis.net/gml)" xsi:schemaLocation="[http://www.opengis.net/wmts/1.0](http://www.opengis.net/wmts/1.0) [http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd](http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd)" version="1.0.0">
    <!-- Service Identification -->
    <ows:ServiceIdentification>
        <ows:Title>WebViewers_AerialPhotography2019</ows:Title>
        <ows:ServiceType>OGC WMTS</ows:ServiceType>
        <ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
    </ows:ServiceIdentification>
    <!-- Operations Metadata -->
    <ows:OperationsMetadata>
        <ows:Operation name="GetCapabilities">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="[http://w8vmgis01.durban.gov.za/arcgis/rest/services/WebViewers/AerialPhotography2019/ImageServer/WMTS/1.0.0/WMTSCapabilities.xml](http://w8vmgis01.durban.gov.za/arcgis/rest/services/WebViewers/AerialPhotography2019/ImageServer/WMTS/1.0.0/WMTSCapabilities.xml)">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>RESTful</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                    <!-- add KVP binding in 10.1 -->
                    <ows:Get xlink:href="[http://w8vmgis01.durban.gov.za/arcgis/rest/services/WebViewers/AerialPhotography2019/ImageServer/WMTS](http://w8vmgis01.durban.gov.za/arcgis/rest/services/WebViewers/AerialPhotography2019/ImageServer/WMTS)?">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>KVP</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
        <ows:Operation name="GetTile">
            <ows:DCP>
                <ows:HTTP>
                    <ows:Get xlink:href="[http://w8vmgis01.durban.gov.za/arcgis/rest/services/WebViewers/AerialPhotography2019/ImageServer/WMTS/tile/1.0.0/](http://w8vmgis01.durban.gov.za/arcgis/rest/services/WebViewers/AerialPhotography2019/ImageServer/WMTS/tile/1.0.0/)">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>RESTful</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                    <ows:Get xlink:href="[http://w8vmgis01.durban.gov.za/arcgis/rest/services/WebViewers/AerialPhotography2019/ImageServer/WMTS](http://w8vmgis01.durban.gov.za/arcgis/rest/services/WebViewers/AerialPhotography2019/ImageServer/WMTS)?">
                        <ows:Constraint name="GetEncoding">
                            <ows:AllowedValues>
                                <ows:Value>KVP</ows:Value>
                            </ows:AllowedValues>
                        </ows:Constraint>
                    </ows:Get>
                </ows:HTTP>
            </ows:DCP>
        </ows:Operation>
    </ows:OperationsMetadata>
    <Contents>
        <!-- Layer -->
        <Layer>
            <ows:Title>WebViewers_AerialPhotography2019</ows:Title>
            <ows:Identifier>WebViewers_AerialPhotography2019</ows:Identifier>
            <ows:BoundingBox crs="urn:ogc:def:crs:EPSG::3857">
                <ows:LowerCorner>3383313.930740081 -3538173.791739587</ows:LowerCorner>
                <ows:UpperCorner>3471775.685582804 -3439418.9065914745</ows:UpperCorner>
            </ows:BoundingBox>
            <ows:WGS84BoundingBox crs="urn:ogc:def:crs:OGC:2:84">
                <ows:LowerCorner>30.392826149583104 -30.268995584591238</ows:LowerCorner>
                <ows:UpperCorner>31.187491613935627 -29.49983460541403</ows:UpperCorner>
            </ows:WGS84BoundingBox>
            <Style isDefault="true">
                <ows:Title>Default Style</ows:Title>
                <ows:Identifier>default</ows:Identifier>
            </Style>
            <Format>image/jpgpng</Format>
            <TileMatrixSetLink>
                <TileMatrixSet>default028mm</TileMatrixSet>
            </TileMatrixSetLink>
            <TileMatrixSetLink>
                <!-- Only show this TileMatrixSet if the tiling scheme is compliant to Google Maps (and that happens with tile width = 256 px) -->
                <TileMatrixSet>GoogleMapsCompatible</TileMatrixSet>
            </TileMatrixSetLink>
            <ResourceURL format="image/jpgpng" resourceType="tile" template="[http://w8vmgis01.durban.gov.za/arcgis/rest/services/WebViewers/AerialPhotography2019/ImageServer/WMTS/tile/1.0.0/WebViewers_AerialPhotography2019/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}](http://w8vmgis01.durban.gov.za/arcgis/rest/services/WebViewers/AerialPhotography2019/ImageServer/WMTS/tile/1.0.0/WebViewers_AerialPhotography2019/{Style}/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol})"/>
        </Layer>
        <!-- TileMatrixSet -->
        <TileMatrixSet>
            <ows:Title>TileMatrix using 0.28mm</ows:Title>
            <ows:Abstract>The tile matrix set that has scale values calculated based on the dpi defined by OGC specification (dpi assumes 0.28mm as the physical distance of a pixel).</ows:Abstract>
            <ows:Identifier>default028mm</ows:Identifier>
            <ows:SupportedCRS>urn:ogc:def:crs:EPSG::3857</ows:SupportedCRS>
            <TileMatrix>
                <ows:Identifier>0</ows:Identifier>
                <ScaleDenominator>5.59082264028501E8</ScaleDenominator>
                <TopLeftCorner>-2.0037508342787E7 2.0037508342787E7</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>1</MatrixWidth>
                <MatrixHeight>1</MatrixHeight>
            </TileMatrix>
            <TileMatrix>
                <ows:Identifier>1</ows:Identifier>
                <ScaleDenominator>2.7954113201425016E8</ScaleDenominator>
                <TopLeftCorner>-2.0037508342787E7 2.0037508342787E7</TopLeftCorner>
                <TileWidth>256</TileWidth>
                <TileHeight>256</TileHeight>
                <MatrixWidth>2</MatrixWidth>
                <MatrixHeight>2</MatrixHeight>
            </TileMatrix>

```

regards

Colleen Crawford

---

<div class="post-metadata">

**Author:** ![colleen](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@colleen](https://mapwindow.discourse.group/u/colleen)\
**Post date:** [January 10, 2021, 6:40pm UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/12 "2021-01-10T18:40:23Z")

</div>

I have found the following and been trying them

Example 1 - Rest

''[https://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS/tile/1.0.0/WorldTimeZones/default/default028mm/1/0/0.png](https://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS/tile/1.0.0/WorldTimeZones/default/default028mm/1/0/0.png)

''[https://sampleserver6.arcgisonline.com/arcgis/rest/services/Toronto/ImageServer/WMTS/tile/1.0.0/Toronto/default/default028mm/13/2990/2289.png](https://sampleserver6.arcgisonline.com/arcgis/rest/services/Toronto/ImageServer/WMTS/tile/1.0.0/Toronto/default/default028mm/13/2990/2289.png)

My Code  
[http://w8vmgis01.durban.gov.za/arcgis/rest/services/WebViewers/AerialPhotography2019/ImageServer/WMTS/tile/1.0.0/WebViewers\_AerialPhotography2019/default/default028mm/1/0/0.png](http://w8vmgis01.durban.gov.za/arcgis/rest/services/WebViewers/AerialPhotography2019/ImageServer/WMTS/tile/1.0.0/WebViewers_AerialPhotography2019/default/default028mm/1/0/0.png)

Example 2 - KVP

''[https://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS?service=WMTS&version=1.0.0&request=GetTile&layer=WorldTimeZones&style=default&tileMatrixSet=default028mm&tileMatrix=1&TileRow=0&TileCol=0&format=image/png](https://sampleserver6.arcgisonline.com/arcgis/rest/services/WorldTimeZones/MapServer/WMTS?service=WMTS&version=1.0.0&request=GetTile&layer=WorldTimeZones&style=default&tileMatrixSet=default028mm&tileMatrix=1&TileRow=0&TileCol=0&format=image/png)

''[https://sampleserver6.arcgisonline.com/arcgis/rest/services/Toronto/ImageServer/WMTS?service=WMTS&version=1.0.0&request=gettile&layer=WorldTimeZones&style=default&tileMatrixSet=default028mm&tileMatrix=13&TileRow=2990&TileCol=2289&format=image/png](https://sampleserver6.arcgisonline.com/arcgis/rest/services/Toronto/ImageServer/WMTS?service=WMTS&version=1.0.0&request=gettile&layer=WorldTimeZones&style=default&tileMatrixSet=default028mm&tileMatrix=13&TileRow=2990&TileCol=2289&format=image/png)

My Code  
[http://w8vmgis01.durban.gov.za/arcgis/rest/services/WebViewers/AerialPhotography2019/ImageServer/WMTS?service=WMTS&version=1.0.0&request=GetTile&layer=](http://w8vmgis01.durban.gov.za/arcgis/rest/services/WebViewers/AerialPhotography2019/ImageServer/WMTS?service=WMTS&version=1.0.0&request=GetTile&layer=) WebViewers\_AerialPhotography2019&style=default&tileMatrixSet=default028mm&tileMatrix=1&TileRow=0&TileCol=0&format=image/png

By running the above examples in the browser I get the image,  
Up to Image Server the page from the samples and my page look very similar. When I go into the WMTS xml file they are very similar. I am not sure what to put as Layer name as the KVP sample for Toronto has WorldTimeZones as the name but if I change this to Toronto it also works. I tried to substitute what I thought was needed for our site but just get **Error:** Not Found  
**Code:** 404

I took the Layer Name from the WMTS xml code  
!-- Layer →

ows:TitleWebViewers\_AerialPhotography2019\</ows:Title\>

ows:IdentifierWebViewers\_AerialPhotography2019\</ows:Identifier\>

Does anyone know where I am going wrong here

Thanks

Colleen

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [January 11, 2021, 1:31am UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/13 "2021-01-11T01:31:12Z")

</div>

Hello Colleen.

If there’s not much response here, perhaps you could submit a question on the GDAL forum; you may get better information there…

---

<div class="post-metadata">

**Author:** ![colleen](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@colleen](https://mapwindow.discourse.group/u/colleen)\
**Post date:** [January 11, 2021, 4:42am UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/14 "2021-01-11T04:42:14Z")

</div>

Will do, thanks. If I ever sort this all out I will post the solution here

Regards

Colleen

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [January 11, 2021, 4:44am UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/15 "2021-01-11T04:44:05Z")

</div>

Thanks. It would be good to know.  
Kind Regards.

---

<div class="post-metadata">

**Author:** ![colleen](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@colleen](https://mapwindow.discourse.group/u/colleen)\
**Post date:** [January 13, 2021, 5:56am UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/16 "2021-01-13T05:56:46Z")

</div>

Hi Jerry

I found this that was a post from you in 2018.  
Map1.Tiles.providers.Add tkTileProvider.ProviderCustom, “ESRI”, “[https://services.arcgisonline.com/ArcGIS/rest/services/World\_Imagery/MapServer/tile/{zoom}/{y}/{x}.png](https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/%7Bzoom%7D/%7By%7D/%7Bx%7D.png)”, tkTileProjection.SphericalMercator, , , “Esri, DigitalGlobe, GeoEye, i-cubed, USDA FSA, USGS, AEX, Getmapping, Aerogrid, IGN, IGP, swisstopo, and the GIS User Community”  
Map1.Redraw3 tkRedrawType.RedrawSkipAllLayers, True

It loaded an aerial photo in exactly the right place. The only problem is that you cannot zoom in very close as it gets very blurry, hence I need to load our aerial photo.

I got the following path from our GIS section - [http://gis.durban.gov.za/arcgis/rest/services/WebViewers/MRF2019/ImageServer](http://gis.durban.gov.za/arcgis/rest/services/WebViewers/MRF2019/ImageServer) - you can view this as well as it allows me to view from my home machine. It looks similar to the ESRI one except it is an Image Server and not a Map Server - not quite sure what the difference is. Plus it does not have Layers. I can view it through their ARCGIS Java Viewer but when I use the above code it is just blank.

I am trying to make some sense out if this with our GIS dept.

Regards

Colleen

---

<div class="post-metadata">

**Author:** ![colleen](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@colleen](https://mapwindow.discourse.group/u/colleen)\
**Post date:** [January 14, 2021, 6:30am UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/17 "2021-01-14T06:30:14Z")

</div>

Hopefully I am getting somewhere. Our GIS dept has said that they would create a Map Server for me. Then it should work very easily as per the above code. So there is obviously a difference between Image Server and Map Server although they look very similar

Regards

Colleen

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [January 5, 2022, 1:57pm UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/18 "2022-01-05T13:57:49Z")

</div>

Did you ever get this working? I’ve seen more topics from you about this subject.  
If you have a folder of tiff-files you can also create a VRT-file and load that file as a layer.

More info:

1. [Utils.GDALBuildVrt()](https://mapwindow.org/documentation/mapwingis4.9/class_utils.html#a2a21f04f3f26e012f73920659fa3a2d2)
2. [gdalbuildvrt @gdal.org](https://gdal.org/programs/gdalbuildvrt.html)

---

<div class="post-metadata">

**Author:** ![colleen](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@colleen](https://mapwindow.discourse.group/u/colleen)\
**Post date:** [January 6, 2022, 7:24am UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/19 "2022-01-06T07:24:43Z")

</div>

Hi

I did manage to get it working as our GIS department set up a Web Map Server for me and it is working well.

I am still having a problem with loading large layers from the database - very , very slow compared to the same data from the shape file. I will look into this again when I get back to working on the Map, but maybe you have some ideas for me

Regards

Colleen Crawford

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [January 10, 2022, 9:20am UTC](https://mapwindow.discourse.group/t/wms-wmts-tms-query/859/20 "2022-01-10T09:20:26Z")

</div>

Hi @colleen  
You could look at the indexes of your layers in your database.  
Make sure the geospatial indexes are enabled and up-to-date.

Also, make sure your geometry is in the same projection as your map, and make sure your geometry has the correct SRID.

Creating a smaller dataset using (materialized) views might also help.
