<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} p
        {margin-top:0;
        margin-bottom:0}--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi,</p>
<p><br>
</p>
<p>WMS and WMTS are different services. While Mapserver does support cascading WMS as documented in
<a href="http://mapserver.org/ogc/wms_client.html">http://mapserver.org/ogc/wms_client.html</a> it can't cascade WMTS which means that this will not work</p>
<p><br>
</p>
<p><font face="Arial" size="1"><span style="font-size:10pt">  CONNECTIONTYPE WMS<br>
  CONNECTION "<a href="https://maps.wien.gv.at/basemap/1.0.0/WMTSCapabilities.xml" target="_blank">https://maps.wien.gv.at/basemap/1.0.0/WMTSCapabilities.xml</a>"</span></font><br>
</p>
<p><br>
</p>
<p>It may be possible to cascade WMTS with GDAL connection through this driver </p>
<p><a href="http://gdal.org/frmt_wmts.html">http://gdal.org/frmt_wmts.html.</a> The Mapserver part could then be somehow similar than in this ticket
<a href="https://trac.osgeo.org/mapserver/ticket/3804">https://trac.osgeo.org/mapserver/ticket/3804</a> but I haven't tried anything like that and I could not find anything about how to cascade WMTS from the Mapserver documentation.</p>
<p><br>
</p>
<p><br>
</p>
<p>-Jukka Rahkonen-<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>Lähettäjä:</b> mapserver-users <mapserver-users-bounces@lists.osgeo.org> käyttäjän puolestaSusanne Kalliany <susanne.kalliany@tefis.at><br>
<b>Lähetetty:</b> 2. syyskuuta 2017 1:05<br>
<b>Vastaanottaja:</b> mapserver-users@lists.osgeo.org<br>
<b>Aihe:</b> [mapserver-users] problem with mapserver as wms client</font>
<div> </div>
</div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt"><font face="Arial" size="1"><span style="font-size:10pt">I have some problems adding a WMTS layer from an Austrian goverment
<br>
server ...<br>
<br>
<a href="https://basemap.at" target="_blank">https://basemap.at</a>  OR<br>
<a href="https://basemap.at/index_en.html" target="_blank">https://basemap.at/index_en.html</a><br>
<br>
... into an (yet for years !) reliable running mapserver-service.<br>
<br>
I am able to import the layer(s) offered there (various Versions of OSM<br>
and Austrian topo maps an - most of all - Orthophotos for whole of Austria<br>
at 20 cm GSD resolution) from basemap.at into openlayers.<br>
<br>
But I need to provide those data right now to my users !<br>
<br>
That is already before I will be able to replace the current Mapserver<br>
installation by a totally renewed version (with OpenLayers integrated).<br>
<br>
Thereforefore, right now I would need the appropriate WMTS-call<br>
intgrated in the current mapfile.<br>
<br>
I am pretty desperate, any help would be MUCH appreciated !<br>
<br>
thanks a lot,<br>
Susanne<br>
<br>
> MAP-File<br>
> ===========<br>
> <br>
> MAP<br>
> NAME mymap<br>
> STATUS ON<br>
> SIZE 1000 1000<br>
> <br>
> PROJECTION<br>
>    "init=epsg:3857"<br>
> END<br>
> <br>
> EXTENT 1673000 6024000 1683000 6034000<br>
> <br>
> WEB<br>
>     IMAGEPATH "/ms4w/tmp/ms_tmp/"<br>
>     IMAGEURL "/ms_tmp/"<br>
>      METADATA<br>
>         "wms_title"      "TEST"<br>
>         "wms_onlineresource" "<a href="http://localhost/cgi-bin/mapserv?" target="_blank">http://localhost/cgi-bin/mapserv?</a>"<br>
>                 "wms_srs" "EPSG:3857"<br>
>         "wms_enable_request" "*"<br>
>     END<br>
> END<br>
> <br>
> DEBUG 5<br>
> CONFIG "MS_ERRORFILE" "/ms4w/Apache/logs/myerror.log"<br>
> <br>
> LAYER<br>
>         NAME "bmaporthofoto30cm"<br>
>         TYPE RASTER<br>
>         DEBUG 5<br>
>         STATUS ON<br>
>         TEMPLATE "dummy.html"<br>
>         UNITS METERS<br>
> <br>
>     CONNECTIONTYPE WMS<br>
>     CONNECTION<br>
> "<a href="https://maps.wien.gv.at/basemap/1.0.0/WMTSCapabilities.xml" target="_blank">https://maps.wien.gv.at/basemap/1.0.0/WMTSCapabilities.xml</a>"<br>
> <br>
>         METADATA<br>
>             WMS_NAME  'bmaporthofoto30cm'<br>
>             wms_srs "EPSG:3857"<br>
>       wms_server_version "1.0.0"<br>
>       wms_format "image/jpeg"<br>
>         END  #Metadata<br>
>         PROJECTION<br>
>            "init=epsg:3857"<br>
>       END<br>
> END # LAYER<br>
> END<br>
> <br>
> Error<br>
> =====<br>
> [Fri Aug 25 03:53:50 2017].757000 msLoadMap(): 0.000s<br>
> [Fri Aug 25 03:53:50 2017].772000 msDrawMap(): rendering using<br>
> outputformat named png (AGG/PNG).<br>
> [Fri Aug 25 03:53:50 2017].772000 HTTP: Starting to prepare HTTP<br>
> requests.<br>
> [Fri Aug 25 03:53:50 2017].772000 Using<br>
> CURL_CA_BUNDLE=/ms4w/Apache/conf/ca-bundle/cacert.pem<br>
> [Fri Aug 25 03:53:50 2017].772000 HTTP request: id=0,<br>
> <a href="https://maps.wien.gv.at/basemap/1.0.0/WMTSCapabilities.xml?LAYERS=bmaporthofoto30cm&REQUEST=map&WMTVER=1.0.0&SERVICE=WMS&FORMAT=image/jpeg&STYLES=&HEIGHT=1200&QUERY_LAYERS=bmaporthofoto30cm&SRS=EPSG:3857&WIDTH=1600&BBOX=1671327.77314429,6023995.82985822,1684672.22685571,6034004.17014178&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_xml" target="_blank">
https://maps.wien.gv.at/basemap/1.0.0/WMTSCapabilities.xml?LAYERS=bmaporthofoto30cm&REQUEST=map&WMTVER=1.0.0&SERVICE=WMS&FORMAT=image/jpeg&STYLES=&HEIGHT=1200&QUERY_LAYERS=bmaporthofoto30cm&SRS=EPSG:3857&WIDTH=1600&BBOX=1671327.77314429,6023995.82985822,1684672.22685571,6034004.17014178&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_xml</a><br>
> [Fri Aug 25 03:53:50 2017].772000 HTTP: Before download loop<br>
> [Fri Aug 25 03:53:52 2017].7000 msHTTPWriteFct(id=0, 8131 bytes)<br>
> [Fri Aug 25 03:53:52 2017].7000 msHTTPWriteFct(id=0, 61 bytes)<br>
> [Fri Aug 25 03:53:52 2017].85000 msHTTPWriteFct(id=0, 7300 bytes)<br>
> [Fri Aug 25 03:53:52 2017].85000 msHTTPWriteFct(id=0, 892 bytes)<br>
> [Fri Aug 25 03:53:52 2017].85000 msHTTPWriteFct(id=0, 4228 bytes)<br>
> [Fri Aug 25 03:53:52 2017].85000 HTTP: After download loop<br>
> [Fri Aug 25 03:53:52 2017].85000 msHTTPExecuteRequests() timing<br>
> summary per layer (connect_time + time_to_first_packet + download_time<br>
> = total_time in seconds)<br>
> [Fri Aug 25 03:53:52 2017].85000 Layer 0: 0.094 + 1.141 + 0.172 =<br>
> 1.407s<br>
> [Fri Aug 25 03:53:52 2017].85000 msDrawMap(): WMS/WFS set-up and<br>
> query, 1.313s<br>
> [Fri Aug 25 03:53:52 2017].85000 WMS GetMap request got XML exception<br>
> for layer 'bmaporthofoto30cm': <?xml version="1.0" encoding="UTF-8"?><br>
</span></font>
<div><font face="Arial" size="1"><br>
</font>
<div style="font-size:13px"><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>