[OSM-dev] Mapnik rendering: Zoom-Level to Width/Height

Andrew Ayre andy at britishideas.com
Wed Oct 14 21:40:59 BST 2009


Hi Peter,

This document:

http://svn.openstreetmap.org/applications/rendering/mapnik/zoom-to-scale.txt

shows the relationship of zoom level to scale denominator.

This blog post:

http://www.britishideas.com/2009/09/22/map-scales-and-printing-with-mapnik/

shows how to get from bounding box to scale denominator and vice versa.

Andy

Peter Körner wrote:
> Hello
> 
> I'm writing on a simple Frontend for the mapnik-toolchain. Currently you 
> can call it like this:
> 
> osm-render --bbox 8.2011,49.9649,8.3278,50.0327 --size 8192x4096
> 
> I'd like to add another option like this:
> 
> osm-render --bbox 8.2011,49.9649,8.3278,50.0327 --zoom 14
> 
> The combination of bbox-size (in lat/lon or maybe kilometers?) and 
> output-size (in pixels) somehow leads to the ScaleDenominator used in 
> the mapnik style, so i think it could be calculated to a zoomlevel and 
> vice versa.
> 
> Does anyone has a formular for that (especially bbox & zoom --> width & 
> height) or is this just not possible?
> 
> Thank you,
> Peter
> 
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
> 
> 
> 

-- 
Andy
PGP Key ID: 0xDC1B5864




More information about the dev mailing list