Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QGIS-server WMTS custom tilematrix set: mismatch between original data and wmts version #39040

Closed
rduivenvoorde opened this issue Sep 25, 2020 · 3 comments · Fixed by #43418
Closed
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Server Related to QGIS server

Comments

@rduivenvoorde
Copy link
Contributor

rduivenvoorde commented Sep 25, 2020

28992.zip

In that zip is data (a simple geopackage) AND a project file. Loading it in QGIS you should see:

Screenshot-20200925164508-1015x520

From the official document:
https://www.geonovum.nl/uploads/standards/downloads/nederlandse_richtlijn_tiling_-_versie_1.1.pdf
AND from our national service WMTS url:
https://geodata.nationaalgeoregister.nl/wmts?VERSION=1.0.0&request=GetCapabilities
I got the following properties for the WMTS (and edited those in the Grids table):
EPSG:28992
Top: 903402.00 (these are meters)
Left: -285401.92
Min.Scale: 12288000.00
Last level 14

Creating a QGIS server from this results in the right tilematrix:

<TileMatrixSet><ows:Identifier>EPSG:28992</ows:Identifier><ows:SupportedCRS>EPSG:28992</ows:SupportedCRS><TileMatrix><ows:Identifier>0</ows:Identifier><ScaleDenominator>12288000</ScaleDenominator><TopLeftCorner>-285401.92 903402</TopLeftCorner><TileWidth>256</TileWidth><TileHeight>256</TileHeight><MatrixWidth>1</MatrixWidth><MatrixHeight>1</MatrixHeight></TileMatrix>

as from the offical pdok service:

<TileMatrixSet><ows:Identifier>EPSG:28992</ows:Identifier><ows:SupportedCRS>urn:ogc:def:crs:EPSG::28992</ows:SupportedCRS><TileMatrix><ows:Identifier>00</ows:Identifier><ScaleDenominator>1.2288E7</ScaleDenominator><TopLeftCorner>-285401.92 903402.0</TopLeftCorner><TileWidth>256</TileWidth><TileHeight>256</TileHeight><MatrixWidth>1</MatrixWidth><MatrixHeight>1</MatrixHeight></TileMatrix>

So I think that is ok. Creating the WMTS now and requesting it in the WMS/WMTS dialog show the proper layer and tilesets:

Screenshot-20200925165334-479x362

But then loading the layer shows it is shifted:

Screenshot-20200925165438-861x434

To double check you can add the 'opentopo' layer from this public WMTS:

https://geodata.nationaalgeoregister.nl/wmts?VERSION=1.0.0&request=GetCapabilities

As you can see the wmts seems shifted:

Screenshot-20200925165624-1103x488

NOTE: we did have this kind of shifts earlier, when we used different proj params for EPSG:28992, and the default epsg params where not right yet in the official db...

But as you can see the data itself is exactly mapping the PDOK WMTS. and I would think the project/data and the server/data would use the same epsg:28992 definitions?

@rduivenvoorde rduivenvoorde added Bug Either a bug report, or a bug fix. Let's hope for the latter! Server Related to QGIS server labels Sep 25, 2020
@rldhont rldhont self-assigned this Sep 25, 2020
@rldhont
Copy link
Contributor

rldhont commented Sep 25, 2020

@rduivenvoorde can you provide data and project ?

@rduivenvoorde
Copy link
Contributor Author

yes yes, sorry. I'm busy, I accidently push the OK button... :-)

@rldhont
Copy link
Contributor

rldhont commented Sep 25, 2020

It was juste a reminder, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Server Related to QGIS server
Projects
None yet
2 participants