compensate scale for longitude

Ed McNierney ed at TOPOZONE.COM
Wed Aug 18 10:00:06 EDT 2004


Jacob -
 
I don't think this is something MapServer should be expected to do.  I
am assuming that you're using a "geographic" projection for your output
data - is that correct?  If so, the width of one degree on longitude
depends on the *latitude*  (not the longitude) and the width of one
degree of latitude is approximately constant.  But on any given map the
scale (in meters) north/south is different from the scale east/west -
there isn't a single "correction" you can make to fix that.  The scale
is constant in "degrees" but varies with the position AND ANGLE in
meters.
 
If you need a map in which units can be measured in a scale of meter,
you should use a projected map.  Otherwise you're just not going to be
able to do it accurately - with or without MapServer's help.
 
    - Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA  01863
Phone: +1 978 251-4242   Fax: +1 978 251-1396 


________________________________

From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Jacob Delfos
Sent: Wednesday, August 18, 2004 2:31 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] compensate scale for longitude


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/c04ce410/attachment.html


More information about the mapserver-users mailing list