[mapserver-dev] Implementation of the msCalculateScale

Mohamed Saâd HESSANE saad.hessane at gmail.com
Thu Feb 17 05:40:42 EST 2011

Good morning everybody.
I don't understand how the msCalculateScale function in mapscale.c is
As far as I know, the scale is calculated from the relation :
inches_in_screen / inches_in_reallity.
inches_in_screen : depend on the DPI and the width of the map;
inches_in_reality : depend on the map.extent, and the pixel size.
So why the "width-1" at the line 96? For me just "width" is more correct.
Perhaps I'm wrong.
The branches 4.X have just "width" in their implementations (line 125).
So why the center pixel is removed from calculation?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20110217/15ffbbe4/attachment.html

More information about the mapserver-dev mailing list