1

I'm trying to understand how WMS scale denominators translate to tile zoom levels. (Specifically, Google Maps zoom levels.) I found this answer to What ratio scales do Google Maps zoom levels correspond to? and this OpenStreetMap reference, which are in the same ballpark but differ by about 10%.

Why are they different?

Does it depend on the projection used?

Does it depend on latitude?

The width and height of the WMS request?

Anything else?

Note that I am not interested in true scales here. Given the min and max scale denominators from the WMS capabilities XML, and using using this approach to calculate the size and position of tiles, I want to know what zoom levels I can expect the WMS endpoint to provide images for.

6
  • 4
    WMS doesn't provide tiles, it provides pictures. Do you mean TMS, or WMTS, or something else? The scale (obviously) varies by projection and can (usually does) vary by latitude. Are you always in Web Mercator? Also, we normally do one question per Question here, so maybe you can refine this down.
    – BradHards
    Aug 11, 2016 at 2:58
  • see also gis.stackexchange.com/a/107010/59 Aug 11, 2016 at 3:05
  • @BradHards Sure, but you can calculate the size and position of the picture to correspond to a tile, as described here. I've found that if I use that approach and zoom in or out too far, the WMS server starts returning errors or empty images. Aug 11, 2016 at 4:14
  • What kind of errors do you get? Real WMS is very flexible but perhaps you use GeoWebCacbe and error says that BBOX differs too much from the tile extents.
    – user30184
    Aug 11, 2016 at 4:43
  • You can't do tiles like that in general. You can do it for simple (spherical earth, mercator) approaches.
    – BradHards
    Aug 11, 2016 at 6:08

1 Answer 1

3

The most likely difference is the screen resolution assumed - the OGC SLD standard says:

The “standardized rendering pixel size” is defined to be 0.28mm × 0.28mm (millimeters). Frequently, the true pixel size of the final rendering device is unknown in the web environment, and 0.28mm is a common actual size for contemporary video displays. If the map-rendering software has information available about the actual pixel size of the final display device, then an extra processing step will be needed (if the actual pixel size is different from the standard pixel size) to adjust the actual rendering scale to calculate the standard rendering scale, which will then be used to compare to the scale range of an SLD rule. If the actual display device has non-square pixels, then a method of “linear equivalence” to square pixels should be used to calculate the standard rendering scale.

For example:

actual_linear = sqrt(actual_x_size * actual_y_size)

While I think Google (and others) go with 96DPI - which is about 10% different.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.