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

Documentation: Build TMS file for wmts file #671

Open
arquox opened this issue Mar 22, 2024 · 3 comments
Open

Documentation: Build TMS file for wmts file #671

arquox opened this issue Mar 22, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@arquox
Copy link

arquox commented Mar 22, 2024

Describe the bug

I created a .tms file for a WMTS server as shown in the documentation with the TMS RESTful style. The URL is correct, but no map tiles are shown.

Resource URL:

function convert(z1,x1,y1)
{ return "https://wmtsod1.bayernwolke.de/wmts/by_amtl_karte/default/smerc/"+z1+"/"+y1+"/"+x1 }

What have you done to circle down the problem?

I started QMS with the -f parameter. The logfile shows:

2024-03-20 8:48:05.337 [debug] TMS: try to open "/path/Bayern1.tms"
2024-03-20 8:48:05.338 [debug] Create projection: "EPSG:3857" -> "EPSG:4326"
2024-03-20 8:48:05.338 [debug] tms: "EPSG:3857"
2024-03-20 8:48:05.344 [debug] Create projection: "EPSG:4326" -> "EPSG:4326"
2024-03-20 8:48:05.487 [debug] Create projection: "EPSG:4326" -> "EPSG:32661"
2024-03-20 8:48:05.487 [debug] Sanity test passed.
2024-03-20 8:48:28.489 [warning] QWidget::setMinimumSize: (/QTextBrowser) Negative sizes (300,-140) are not possible
2024-03-20 8:48:28.489 [warning] QWidget::setMaximumSize: (/QTextBrowser) Negative sizes (16777215,-140) are not possible
2024-03-20 8:48:28.489 [warning] QWidget::setMinimumSize: (/QTextBrowser) Negative sizes (300,-140) are not possible
2024-03-20 8:48:28.489 [warning] QWidget::setMaximumSize: (/QTextBrowser) Negative sizes (16777215,-140) are not possible
2024-03-20 8:48:28.489 [warning] QWidget::setMinimumSize: (/QTextBrowser) Negative sizes (300,-140) are not possible
...

If I use a static server URL in the .tms file, everything works:

<ServerUrl>https://wmtsod1.bayernwolke.de/wmts/by_amtl_karte/smerc/%1/%2/%3</ServerUrl>

Then I changed the position of the x1 and y1 parameter in the resource URL in the .tms file, same order like in the static server URL:

function convert(z1,x1,y1)
{ return "https://wmtsod1.bayernwolke.de/wmts/by_amtl_karte/default/smerc/"+z1+"/"+x1+"/"+y1 }

After reload of the maps in QMS the map tiles showed up as expected.

To Reproduce

Expected behavior

This is not a bug in QMS, only the documentation should be updated.

Screenshots

Attachments

Tracebacks

Desktop

  • OS: Debian 11
  • QMapShack Version: 1.17.1
  • Window Manager: KDE

Additional context

@arquox arquox added the bug Something isn't working label Mar 22, 2024
@wthaem
Copy link
Contributor

wthaem commented Mar 22, 2024

  • Are you sure that the default part in your URLs is correct?
  • Different map servers use different coordinate order in their WMTS/TMS URLs. This si not yet mentioned in the QMS documentation. In so far, the documentation is incomplete.

@arquox
Copy link
Author

arquox commented Mar 22, 2024

Yes, I tested it with this URL. The resource URL in the capabilities document is:

<ResourceURL format="image/png" resourceType="tile" template="https://wmtsod1.bayernwolke.de/wmts/by_amtl_karte/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}"/>

@mitxel-m
Copy link
Contributor

mitxel-m commented Mar 22, 2024

As @wthaem says not always x and y parameters come in the same order.
E.g. different order to @arquox template

template="https://idena.navarra.es/ogc/wmts/ortofoto2023/default/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.jpeg"/>

Maybe the point to add in documentation is that usually in such templates TileCol refers to x, TileRow to y, and TileMatrix to z, and not always in the same order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants