compensate scale for longitude
Jacob Delfos
jacob.delfos at MAUNSELL.COM
Tue Aug 17 23:31:00 PDT 2004
Hi List,
I've been working on getting my "print to scale" code to work properly when working in latitude/longitude. I had a consistent error, and now realize it's because mapserver seems to ignore the longitude when converting from degrees to metres. I was wondering if that is something that could be changed. My code actually did compensate for it, which is why my scale (which is wrapped around the mapserver scale) did not match my scalebarsize after printing. It's quite a simple compensation; it's just a matter of taking the number which is currently calculated for the size of a pixel, and multiplying it with the cosine of the longitude (I use the longitude of the centre of the map). Of course the scale would not be the same throughout the map if your extent is large, but it will be a lot closer. In Perth the difference is around 15%. Where in the code should this be changed?
regards,
Jacob
JACOB DELFOS
SPATIAL INFORMATION ANALYST
Maunsell Australia Pty Ltd
629 Newcastle Street
PO Box 81
Leederville 6902
Western Australia
ABN 20 093 846 925
Tel + 61 8 9281 6185
Fax + 61 8 9281 6297
jacob.delfos at maunsell.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20040818/03355810/attachment.htm>
More information about the MapServer-users
mailing list