[OSM-dev] Osmarender rendering scale
David Svantesson
david at oxtract.se
Thu Jan 22 17:01:24 GMT 2009
Hi,
In the Osmarender options wiki page (
http://wiki.openstreetmap.org/wiki/Osmarender/Options), it says about the
scale option: "Changing this setting does not alter the size of the map
canvas (say 800px by 600px) but does alter the size of the items rendered on
the map.".
Maybe I have misunderstand something but I get the opposite, double the
scale gives double image size while the pixel size of objects remain the
same (which seems logical).
Now to my problem, I want to render a map at a certain scale (locally).
Looking at the osmarender code I find:
<xsl:variable name="dataWidth"
select="(number($topRightLongitude)-number($bottomLeftLongitude))*10000*$scale"/>
<xsl:variable name="dataHeight"
select="(number($topRightLatitude)-number($bottomLeftLatitude))*10000*$scale*$projection"/>
<xsl:variable name="km" select="(0.0089928*$scale*10000*$projection)"/>
I guess that by setting $scale=1/$projection (=cos(lat)), I will get the
same scale as at the equator, but what scale would osmarender render at
lat=0 ($projection=1)? Or in other words, what shall I set the scale
parameter to get a map of e.g. 1:50000.
I hope someone can help to clarify this for me.
Regards,
David Svantesson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20090122/97a40af5/attachment.html>
More information about the dev
mailing list