[GIS] WMS scale denominators and zoom levels: why are these tables different

scalewmszoom

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.

Best Answer

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.

Related Question