NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi,

I'd like to be able to use a custom WMTS (served through a dockerized QGIS server; https://hub.docker.com/r/camptocamp/qgis-server) as background aerial imagery on the ID editor.

When I try to set this up, the example given is like that:

Example : https://{switch:a,b,c}.tile.openstreetmap.org/{zoom}/{x}/{y}.png

But this doesn't look like a WMTS URL.

This is the plain http (no https) URL I actually have for a random tile:

http://baseurl/?SERVICE=WMTS&VERSION=1.3.0&REQUEST=GetTile&LAYER=my_custom_layer&STYLE=default&TileMatrixSet=EPSG:3857&TileMatrix=17&TileRow=45220&TileCol=65950&format=image/png

How can I use it?

I already tried to replace the values of TileMatrix, TileRow and TileCol by {z}, {y} and {x} but it doesn't work (I also cannot see any requests arriving on the tile server).

Notice;
the URL is working perfectly well in a web browser (Fig. 1) and in JOSM.

tile sample

Fig. 1: A tile sample when I browse the previous given URL using Firefox 78.0.1 (64-bit).

Thanks.

asked 03 Jul '20, 17:28

s-k's gravatar image

s-k
466710
accept rate: 0%

edited 05 Jul '20, 13:10

1

Do the values of "TileMatrix=", "TileCol=" and "TileRow=" correspond to {zoom},{x} and {y}?

(03 Jul '20, 18:47) InsertUser

Yes, I think it is standardized by the OGC; I've look at the tiles numbers for some regions and it's matching the OSM tiling scheme. I also tried to replace these values in my long WMTS URL but it doesn't work.

(04 Jul '20, 19:23) s-k

Indeed;

sample

In Firefox 78.0.1 (64-bit).

And I see the same when using JOSM. (But JOSM uses the GetCapabilities to let the user chose the layer before displaying it. Maybe ID should do the same?)

(05 Jul '20, 08:34) s-k
1

Do you use the WMTS host through SSL (https) or plain HTTP?

(05 Jul '20, 11:20) Spiekerooger

standard http, as in the URL given in the main post.

(05 Jul '20, 12:53) s-k
1

So your browser may not show the tiles as of a mixed content warning. See for any errors in the dev console of your browser.

(05 Jul '20, 14:30) Spiekerooger

Oh,..! Actually ID itself is trying, by default, to get the tile using https, that's why it doesn't work. Any idea if I can switch ID in a standard "http" mode for querying those background imagery tiles? Otherwise I will have to check for my server to use SSL I guess...

(05 Jul '20, 17:50) s-k

So I would recommend to add SSL to your server. You can use Let's Encrypt to do this without buying a certificate anywhere.

(05 Jul '20, 18:24) Spiekerooger
showing 5 of 9 show 4 more comments

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×85
×55
×39
×5
×3

question asked: 03 Jul '20, 17:28

question was seen: 1,457 times

last updated: 05 Jul '20, 18:24

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum