Upgrade Problems - Additional Info

Ed McNierney ed at TOPOZONE.COM
Mon Oct 17 18:00:49 EDT 2005


Tim -

I think you're confusing a few issues and only partially understanding
the properties of the Mercator projection.

As Cliff pointed out, if you are interested in measuring distances, a
Mercator projection is just the wrong choice of projection.  Different
projections have different properties; none are perfect, and all
sacrifice doing some things poorly in order to do other things well.
Again, Cliff pointed out the one prominent reason to choose a Mercator
projection - it lets you draw lines of constant compass declination
(rhumb lines) as straight lines.  Unless you're a marine navigator with
a defective GPS receiver, that is probably not useful to you.

I have occasionally vented my frustration at the rampant proliferation
of the "geographic" projection these days, in which latitude and
longitude are used  X/Y coordinates.  This isn't the same as the
Mercator projection, but it's very nearly as useless.  You *cannot*
create a generalized scale bar for such a map.  That's not MapServer's
fault, and has nothing to do with a MapServer configuration.  You just
cannot do it because the linear scale on such a map varies with both the
latitude and with the angle of the line measured.  It is just plain
impossible to create an accurate scale bar.  The fact that some maps
display a scale bar next to a Mercator projection doesn't mean that
scale bar is accurate (although the more honest ones will footnote the
scale bar indicating the one place on the map where it's correct).

Fortunately, there are many projections in the world to choose from <g>.
The UTM family of projections was defined (in part) to provide
relatively uniform distance measurements.  That's why each UTM zone is
only 6 degrees wide; the projection math works fine beyond that range,
but the distortion increases to an unacceptable level.

That's also why US states have adopted State Plane Coordinate Systems
(SPCS).  They are designed to cover a smaller area than UTM, but with a
smaller degree of distortion, suitable for use in surveying and other
professional applications.  Many states are divided into several
"zones", each of which uses a different (but related) projection, to
further minimize the distortion.

If you are specifically interested in the State of California, the State
GIS program uses an Albers projection for managing statewide data.
While nothing's perfect, this projection is probably a good candidate
for use in displaying California statewide data sets in a manner that
allows distance and area measurements (and scale bars) with a reasonable
degree of accuracy over a relatively large area like California.  You
can find information about it at http://gis.ca.gov/albers.epl

     - 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
ed at topozone.com

-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of tim
Sent: Monday, October 17, 2005 5:08 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Upgrade Problems - Additional Info

Hi Frank,

I appreciate your interest on this, but perhaps taking a closer look at
the Mercator first would be more fruitful. I got a  number of replies
from the
PROJ4 list that indicate the problem is related to the Mercator
characteristics, i.e.

From: Clifford J Mugnier <cjmce at lsu.edu>  >Computing distances is a
folly on the Normal Aspect  >Mercator.  With two endpoints, just compute
the inverse of the cartesian  >coordinates back into latitude and
longitude and then compute the correct  >distance with a geodesic
inverse.

From: Paul Ramsey <pramsey at refractions.net>  >For a Mercator map of all
of California, there is no *right* scale  >bar.  The scale at the top
will be different from the scale at the  >bottom.  This is true of any
Mercator map, just actually visible on  >maps of larger areas.  So the
scale bar Mapserver is generating is  >probably right for *one* part of
the map (perhaps the top or bottom?)  >and the scale bar from your paper
map is right for *one* part of the  >map (the middle, maybe? or maybe
for right where it is?).

 >For interactive things, like desktop user interfaces, it is possible
>to quietly cheat.  The measuring tool in uDig, for example, projects
>back into geographic coordinates, and does length calculations on the
>spheroid, rather than naively returning the length in the projected
>plane.  In this way it is possible to measure distances in meters
>while looking at a map in geographics, or get correct distances from
>a map in mercator.

From: "Craig Miller" <craig at millerfam.net>  >To get correct distances,
you will need to calculated great-circle distance.

I am almost sure that I can implement one of these solutions through php
mapscript, but it will mean circumventing the usual measuring tools . .
.

If you are still interested, I will try to re-create the visible
differences from the command line mapserv.exe as you suggest . . .

thanks again for the interest
tim

Tim Norris


At 02:47 PM 10/17/2005, Frank Warmerdam wrote:
>On 10/17/05, Kralidis,Tom [Burlington] <Tom.Kralidis at ec.gc.ca> wrote:
> > Thanks for the info.  I don't think these instances are using 
> > WKT/GML as input or output, if that's what you mean.  Basic .ovf 
> > connection to provide WMS output.  Is there anything we can do on 
> > our end to help with this issue?  The problem is basically:
>
>Tom / Tim,
>
>If you can reproduce the problem at the commandline with mapserv.exe 
>from FWTools then just bundle up the minimum data required to reproduce

>it along with the commandlne required to invoke it and submit that as a

>mapserver bug, reassigned to me.
>
>If you can't reproduce it under those circumstances then perhaps we can

>work out a clue as to what is going from that.
>
>Best regards,
>--
>---------------------------------------+-------------------------------
>---------------------------------------+-------
>I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
>light and sound - activate the windows | http://pobox.com/~warmerdam
>and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-users mailing list