{"comment":{"url":"https://api.github.com/repos/bmmpxf/suite/comments/11889344","html_url":"https://github.com/bmmpxf/suite/commit/55368fe4ee7213aba0b7c5aa49efb7ba0e478c8d#commitcomment-11889344","id":11889344,"user":{"login":"smithkm","id":2184425,"avatar_url":"https://avatars.githubusercontent.com/u/2184425?v=3","gravatar_id":"","url":"https://api.github.com/users/smithkm","html_url":"https://github.com/smithkm","followers_url":"https://api.github.com/users/smithkm/followers","following_url":"https://api.github.com/users/smithkm/following{/other_user}","gists_url":"https://api.github.com/users/smithkm/gists{/gist_id}","starred_url":"https://api.github.com/users/smithkm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smithkm/subscriptions","organizations_url":"https://api.github.com/users/smithkm/orgs","repos_url":"https://api.github.com/users/smithkm/repos","events_url":"https://api.github.com/users/smithkm/events{/privacy}","received_events_url":"https://api.github.com/users/smithkm/received_events","type":"User","site_admin":false},"position":81,"line":187,"path":"docs/usermanual/source/cartography/ysld/reference/scalezoom.rst","commit_id":"55368fe4ee7213aba0b7c5aa49efb7ba0e478c8d","created_at":"2015-06-26T19:30:37Z","updated_at":"2015-06-26T19:30:37Z","body":"The datums for Web Mercator and WGS84 have the same equatorial radius.  Both also have no distortion along the equator.  The Web Mercator grid set starts with a 256x256 px image spanning the length of the equator, and that's also a common starting point for a WGS84 gridset.  Scale is computed for where the projection has no distortion (the equator) so the scales match up level for level.  Level 0 is width-of-image:length-of-equator, level 1 is width-of-2-images:length-of-equator, level 2 is width-of-4-images:length-of-equator and so on.  It's the same either way.\r\n\r\nThe CRS it's displayed in is really up to whoever is making the request.  You could easily have one client making requests in one CRS and another making requests in a different CRS, or you could have a drop down box in an OpenLayers app that would switch projections on the fly. The projection we specify attached to a layer group is really more of a default suggestion.  If we're going through GWC, then the list is restricted to those CRSes for which there are gridsets, but that still need not be a single CRS.\r\n\r\nThe same style needs to work, which is why styles use scale ranges.  A scale is a scale (except for distortion). YSLD zoom levels are just a way to generate scale ranges from something that may be more intuitive.  Once the style is loaded, all that's left is a scale range and so it works regardless of CRS used in the request.\r\n\r\nMaybe try something along the lines of this:\r\n\r\n*Explain `scale`.*\r\n\r\nIf you are more used to thinking of zoom levels than scales, you can use `zoom` instead of `scale`.  This will produce scale ranges suitable for the standard Web Mercator (`EPSG:900913`, `EPSG3857`) zoom levels.  This is also the same set of zoom levels used for WGS84 (`EPSG:4326`) in Open Layers and WMTS.\r\n\r\nThe scale ranges for the zoom levels are continuous and don't overlap, if a map is requested at a scale in between the scales of level 1 and level 2, then either the level 1 rules, or the level 2 rules will be applied, not both.  A style using `zoom` will work in a reasonable way even if you are using other CRSes, zoom levels, or not using discrete zoom levels at all.\r\n\r\nIf you have specified a gridset in GeoWebCache with different zoom levels from Web Mercator, you can use those zoom levels instead.  *explain `grid`*\r\n\r\nPing me on slack and we can talk this over on skype/hangout/etc if needed."}}