From 2dd3abc6018df4ac65288fbe546196bcc14b7924 Mon Sep 17 00:00:00 2001 From: verdy-p Date: Wed, 23 Nov 2016 06:19:08 +0100 Subject: [PATCH] Updated Aspect Fix Mode (markdown) --- Aspect-Fix-Mode.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Aspect-Fix-Mode.md b/Aspect-Fix-Mode.md index cdb53fc..dc3948a 100644 --- a/Aspect-Fix-Mode.md +++ b/Aspect-Fix-Mode.md @@ -4,8 +4,8 @@ Mapnik's `aspect_fix_mode` is both wonderful and evil. This page explains why. Mapnik uses a bounding box (aka. envelope or bounding rectangle) to decide what data to query and where to place it on a given map. -A bounding box (BBOX) is made up of 2 x,y coordinate pairs representing the lower left corner and the upper right and is expressed as `minx,miny,maxx,maxy`. So a BBOX that represents the entire world is `-180,-90,180,90` if we are speaking in long/lat degrees. The coordinate values are specific to the spatial reference system you are using, so another common BBOX is the global extents in [web mercator](http://wiki.openstreetmap.org/wiki/Mercator): `-20037508.342789244,-20037508.342789244,20037508.342789244,20037508.342789244`. Curious how these were calculated? See [this code](https://github.com/mapbox/tilelive-mapnik/blob/2af055024e74414e75c714cbd47a115f43cfb3f2/lib/render.js#L8-L10): -their absolute values are measuring the exact length in meters of a path, along the equatorial parallel, on the reference WGS84 geoid modelizing the Earth surface at average sea level, from any longitude to its antipodic one (i.e. a path along 180 degrees of longitude), assuming that this equatorial parallel is a perfect circle (this is not exactly the case for the true Earth, but it is true for the reference geoid used in our web Mercator projection). +A bounding box (BBOX) is made up of 2 x,y coordinate pairs representing the lower left corner and the upper right and is expressed as `minx,miny,maxx,maxy`. So a BBOX that represents the entire world is `-180,-90,180,90` if we are speaking in long/lat degrees. The coordinate values are specific to the spatial reference system you are using, so another common BBOX is the global extents in [web mercator](http://wiki.openstreetmap.org/wiki/Mercator): `-20037508.342789244,-20037508.342789244,20037508.342789244,20037508.342789244`. Curious how these were calculated? See [this code](https://github.com/mapbox/tilelive-mapnik/blob/2af055024e74414e75c714cbd47a115f43cfb3f2/lib/render.js#L8-L12): +their absolute values are measuring the exact length in meters of a path, along the equatorial parallel, on the reference WGS84 geoid modelizing the Earth surface at average sea level, from any longitude to its antipodic one (i.e. a path along 180 degrees of longitude, or the half of the average equatorial circumference), assuming that this equatorial parallel is a perfect circle (this is not exactly the case for the true Earth, but it is true for the reference geoid used in our web Mercator projection). With common tiling schemes it is easy to know the BBOX based on a given zoom level and x/y tile id and to know the reverse. Learn more at and see some code that does this at .