Config wmts

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Config wmts

Karl Magnus Jönsson

Hi!

Trying to add a wmts from GeoServer in my map. Is there an example of how to configure a wmts from GeoServer in themesConfig.json?

 

Karl-Magnus Jönsson | Gis-Utvecklare
Geografisk information
Miljö- och samhällsbyggnadsförvaltningen
Kristianstads kommun
Besöksadress: Västra Storgatan 12
Postadress: 291 80 Kristianstad
Telefon: 044-135416 | Mobil: 0733-135416

karl-magnus.jonsson@...

www.kristianstad.se

 

 


_______________________________________________
qgis-qwc2 mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-qwc2
Reply | Threaded
Open this post in threaded view
|

Re: Config wmts

Andreas Neumann-4

Hi,

Here are my configs - not sure if all parameters are really needed - but they don't hurt. It is compatible with MapProxy WMTS.

At the bottom of file https://github.com/qgis/qwc2-demo-app/blob/master/themesConfig.json you can also find a WMTS configuration.

---------------------------------------

    "backgroundLayers": [
      {
        "name": "zg.orthofoto",
        "title": "Orthofoto",
        "attribution": "Kanton Zug & Swisstopo",
        "attributionUrl": "https://www.swisstopo.ch/",
        "type": "wmts",
        "url": <a class="moz-txt-link-rfc2396E" href="https://services.geo.zg.ch/tc/wmts/1.0.0/zg.orthofoto/default/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png">"https://services.geo.zg.ch/tc/wmts/1.0.0/zg.orthofoto/default/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png",
        "tileMatrixSet": "zg",
        "tileMatrixPrefix": "",
        "thumbnail": "Orthofotos.jpg",
        "projection": "EPSG:2056",
        "resolutions": [26.45833332,19.84374999,13.22916666,10.583333328,7.937499996,6.61458333,5.291666664,3.968749998,3.307291665,2.6458333322,1.9843749999,1.3229166666,0.7937499996,0.6614583333,0.5291666667,0.3968749998,0.2645833333,0.1984374999,0.1322916667,0.0793749999,0.0661458333,0.0529166666,0.0396874999,0.0264583333,0.0132291667],
        "originX": 2670000.0,
        "originY": 1235000.0,
        "tileSize": [512,512]
      },
      {
        "name": "zg.grundbuchplan-grau",
        "title": "Grundbuchplan",
        "type": "wmts",
        "url": <a class="moz-txt-link-rfc2396E" href="https://services.geo.zg.ch/tc/wmts/1.0.0/zg.grundbuchplan-grau/default/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png">"https://services.geo.zg.ch/tc/wmts/1.0.0/zg.grundbuchplan-grau/default/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png",
        "tileMatrixSet": "zg",
        "tileMatrixPrefix": "",
        "thumbnail": "GrundbuchplanSW.png",
        "projection": "EPSG:2056",
        "resolutions": [26.45833332,19.84374999,13.22916666,10.583333328,7.937499996,6.61458333,5.291666664,3.968749998,3.307291665,2.6458333322,1.9843749999,1.3229166666,0.7937499996,0.6614583333,0.5291666667,0.3968749998,0.2645833333,0.1984374999,0.1322916667,0.0793749999,0.0661458333,0.0529166666,0.0396874999,0.0264583333,0.0132291667],
        "originX": 2670000.0,
        "originY": 1235000.0,
        "tileSize": [512,512]
      },
      {
        "name": "zg.basisplan-grau",
        "title": "Basisplan Graustufen",
        "type": "wmts",
        "url": <a class="moz-txt-link-rfc2396E" href="https://services.geo.zg.ch/tc/wmts/1.0.0/zg.basisplan-grau/default/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png">"https://services.geo.zg.ch/tc/wmts/1.0.0/zg.basisplan-grau/default/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.png",
        "tileMatrixSet": "zg",
        "tileMatrixPrefix": "",
        "thumbnail": "BasisplanSW.png",
        "projection": "EPSG:2056",
        "resolutions": [26.45833332,19.84374999,13.22916666,10.583333328,7.937499996,6.61458333,5.291666664,3.968749998,3.307291665,2.6458333322,1.9843749999,1.3229166666,0.7937499996,0.6614583333,0.5291666667,0.3968749998,0.2645833333,0.1984374999,0.1322916667,0.0793749999,0.0661458333,0.0529166666,0.0396874999,0.0264583333,0.0132291667],
        "originX": 2670000.0,
        "originY": 1235000.0,
        "tileSize": [512,512]
      }
    ]
  }

----------------------------------------

Hope it helps and greetings,
Andreas

On 20.04.2017 12:17, Karl Magnus Jönsson wrote:

Hi!

Trying to add a wmts from GeoServer in my map. Is there an example of how to configure a wmts from GeoServer in themesConfig.json?

 

Karl-Magnus Jönsson | Gis-Utvecklare
Geografisk information
Miljö- och samhällsbyggnadsförvaltningen
Kristianstads kommun
Besöksadress: Västra Storgatan 12
Postadress: 291 80 Kristianstad
Telefon: 044-135416 | Mobil: 0733-135416

karl-magnus.jonsson@...

www.kristianstad.se

 

 



_______________________________________________
qgis-qwc2 mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-qwc2


_______________________________________________
qgis-qwc2 mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-qwc2
Reply | Threaded
Open this post in threaded view
|

Re: Config wmts

Sandro Mani
In reply to this post by Karl Magnus Jönsson

Hi

There are some WMTS exaples here in the demo app [1], you'll need to look at the WMTS capabilities of the WMTS service you want to use to find out the various parameter values.

Sandro

[1] https://github.com/qgis/qwc2-demo-app/blob/master/themesConfig.json


On 20.04.2017 12:17, Karl Magnus Jönsson wrote:

Hi!

Trying to add a wmts from GeoServer in my map. Is there an example of how to configure a wmts from GeoServer in themesConfig.json?

 

Karl-Magnus Jönsson | Gis-Utvecklare
Geografisk information
Miljö- och samhällsbyggnadsförvaltningen
Kristianstads kommun
Besöksadress: Västra Storgatan 12
Postadress: 291 80 Kristianstad
Telefon: 044-135416 | Mobil: 0733-135416

karl-magnus.jonsson@...

www.kristianstad.se

 

 



_______________________________________________
qgis-qwc2 mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-qwc2


_______________________________________________
qgis-qwc2 mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-qwc2
Reply | Threaded
Open this post in threaded view
|

Re: Config wmts

Karl Magnus Jönsson

My requests from geoservers demo-page and QGIS against Geoserver (geowebcache) looks like this. Internal url:s. But they work.

QGIS:

http://sbkgeodata:8080/geoserver/gwc/service/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=geodata:turistkarta&STYLE=&FORMAT=image/png&TILEMATRIXSET=EPSG:3008ext&TILEMATRIX=EPSG:3008ext:2&TILEROW=12&TILECOL=19

Geoserver Demo:

http://sbkgeodata:8080/geoserver/gwc/service/wmts?layer=geodata%3Aturistkarta&style&tilematrixset=EPSG%3A3008ext&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng8&TileMatrix=EPSG%3A3008ext%3A2&TileCol=16&TileRow=6

 

QWC2 demo:

https://wmts20.geo.admin.ch/1.0.0/ch.swisstopo.pixelkarte-farbe/default/current/2056/18/16/8.jpeg

 

Is there different ways to request wmts tiles?

Karl-Magnus

 

Från: qgis-qwc2 [mailto:[hidden email]] För Sandro Mani
Skickat: den 20 april 2017 13:10
Till: [hidden email]
Ämne: Re: [qgis-qwc2] Config wmts

 

Hi

There are some WMTS exaples here in the demo app [1], you'll need to look at the WMTS capabilities of the WMTS service you want to use to find out the various parameter values.

Sandro

[1] https://github.com/qgis/qwc2-demo-app/blob/master/themesConfig.json

 

On 20.04.2017 12:17, Karl Magnus Jönsson wrote:

Hi!

Trying to add a wmts from GeoServer in my map. Is there an example of how to configure a wmts from GeoServer in themesConfig.json?

 

Karl-Magnus Jönsson | Gis-Utvecklare
Geografisk information
Miljö- och samhällsbyggnadsförvaltningen
Kristianstads kommun
Besöksadress: Västra Storgatan 12
Postadress: 291 80 Kristianstad
Telefon: 044-135416 | Mobil: 0733-135416

karl-magnus.jonsson@...

www.kristianstad.se

 

 




_______________________________________________
qgis-qwc2 mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-qwc2

 


_______________________________________________
qgis-qwc2 mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-qwc2
Reply | Threaded
Open this post in threaded view
|

Re: Config wmts

Karl Magnus Jönsson

Yes. Found out that geowebcache currently only supports KVP. I there a possibility to configure the background layer as a WMS with a specific extent, tilesizes and resolutions? I the case the bounds and size of WMS tile matches the gridset the tile is served as a cached tile though it is WMS. In Geoserver.

 

Karl-Magnus

 

Från: Andreas Neumann [mailto:[hidden email]]
Skickat: den 20 april 2017 19:02
Till: Karl Magnus Jönsson
Ämne: Re: [qgis-qwc2] Config wmts

 

Hi Karl-Magnus,

There are two ways to access WTMS: KVP (key value pairs) and RESTFul. See f.e. https://services.geo.zg.ch/tc/demo/

I was successful with the RESTFul way of accessing WMTS. Perhaps you tried with KVP?

Andreas

 

On 20.04.2017 13:47, Karl Magnus Jönsson wrote:

My requests from geoservers demo-page and QGIS against Geoserver (geowebcache) looks like this. Internal url:s. But they work.

QGIS:

http://sbkgeodata:8080/geoserver/gwc/service/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=geodata:turistkarta&STYLE=&FORMAT=image/png&TILEMATRIXSET=EPSG:3008ext&TILEMATRIX=EPSG:3008ext:2&TILEROW=12&TILECOL=19

Geoserver Demo:

http://sbkgeodata:8080/geoserver/gwc/service/wmts?layer=geodata%3Aturistkarta&style&tilematrixset=EPSG%3A3008ext&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng8&TileMatrix=EPSG%3A3008ext%3A2&TileCol=16&TileRow=6

 

QWC2 demo:

https://wmts20.geo.admin.ch/1.0.0/ch.swisstopo.pixelkarte-farbe/default/current/2056/18/16/8.jpeg

 

Is there different ways to request wmts tiles?

Karl-Magnus

 

Från: qgis-qwc2 [[hidden email]] För Sandro Mani
Skickat: den 20 april 2017 13:10
Till: [hidden email]
Ämne: Re: [qgis-qwc2] Config wmts

 

Hi

There are some WMTS exaples here in the demo app [1], you'll need to look at the WMTS capabilities of the WMTS service you want to use to find out the various parameter values.

Sandro

[1] https://github.com/qgis/qwc2-demo-app/blob/master/themesConfig.json

 

On 20.04.2017 12:17, Karl Magnus Jönsson wrote:

Hi!

Trying to add a wmts from GeoServer in my map. Is there an example of how to configure a wmts from GeoServer in themesConfig.json?

 

Karl-Magnus Jönsson | Gis-Utvecklare
Geografisk information
Miljö- och samhällsbyggnadsförvaltningen
Kristianstads kommun
Besöksadress: Västra Storgatan 12
Postadress: 291 80 Kristianstad
Telefon: 044-135416 | Mobil: 0733-135416

karl-magnus.jonsson@...

www.kristianstad.se

 

 





_______________________________________________
qgis-qwc2 mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-qwc2

 




_______________________________________________
qgis-qwc2 mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-qwc2

 


_______________________________________________
qgis-qwc2 mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/qgis-qwc2