1

I have a street name I want to see on a rendered tile at zoom level 15, but not level 14. How do I figure out what my minimum/maxixum scales for the rule-based labeling need to be?

4

QGIS Map Scale for XYZ Tiles uses the Spherical Mercator Scale levels listed on the MapTiler website. Set your labels to have a scale-dependent visibility based on the zoom levels as shown:

Zoom 14- 1:36,111.98

Zoom 15- 1:18,055.99

1
  • This should be the accepted answer.
    – philologon
    May 24 at 1:06
3

On the bottom of your QGIS window, you have a small information-bar that shows the scale of your current zoom-level. Zoom to level 15: check scale-value, do the same for level 14.

4
  • How does, when my "small information-bar" only says e.g. 1:5000, "zoom to level 15" work?
    – user161704
    Apr 25 '20 at 5:07
  • 1
    What do you mean "level 15" - how do you define that? Can you elaborate on your project or add a screenshot?
    – Babel
    Apr 25 '20 at 9:08
  • I am exactly asking how scales, when working with a map, and zoom levels, when finally rendering tiles, relate to each other in QGIS. Generally there does not seem to be one definition: OSM, Google.
    – user161704
    Apr 25 '20 at 10:30
  • 1
    You should provide more details about your project, about what you've done up to know and at what point exactly you encounter problems. By the way: did you have a look at pre-defined project-sacales (to be found in menu project - properties)?
    – Babel
    Apr 25 '20 at 13:54
2

It's worth noting that the scale levels specified on various websites are true for CRS EPSG:3857. They are "correct" (i.e. match actual ground scale) at the equator.

If you use a different CRS, such as UTM or MTM-based, for your project/canvas (and generate XYZ or MBTiles etc as an ancillary output or export to use on other devices), these numbers need changing.

In particular, in this instance you should multiply the specified EPSG:3857 numbers by cos(latitude). So e.g. at latitude 45 (cos = 1/sqrt(2)), zoom 14 is at about 1:25,500 "actual scale". You don't need to get it exactly right, so e.g. at this latitude, a scale dependent visibility threshold at 1:20000 will work just as at the equator, but if you work at all in more polar regions and use mixed CRSes, this can throw you (as it has thrown me).

2

You can set the default scales matching the OpenStreetMap zoom levels when browsing using this post https://gisforthought.com/qgis-openstreetmap-scales/

I've also made a script to display the zoom level when zooming in/zooming out https://twitter.com/ThomasG77/status/1271610760779743238?s=20

You may prefer to install the plugin "Zoom Level" (search it in the plugins list to install)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy