Questions on projections, reference systems, map extents, scales

Ed McNierney ed at TOPOZONE.COM
Sun Apr 24 22:08:57 EDT 2005


Klaus -

"Vortex" is a good choice - you're certainly spinning around rapidly!

I'm not going to try to give you a complete GIS tutorial, but you should
try to get one.  Try to learn about datums, projections, etc. OUTSIDE of
MapServer, then learn how to use those concepts INSIDE MapServer.  That
way you're not trying to do two things at once, and you might be able to
ask questions in the most appropriate places.  For example, there is a
separate mailing list for PROJ and that's the best place to ask
questions about it.

If all the input and output data in a MapServer map use the same
coordinate system, then you do not have to specify any coordinate system
at all.  If that is not the case, you should really specify ALL input
AND output coordinate systems.  Coordinate systems are not "embedded" as
often as you seem to think - you need to specify them.

WGS84 and NAD83 can be treated as identical - for the portion of the
globe where NAD83 is defined.  Do not try to use coordinates in
Mozambique and call them "NAD83".

Yes, the "geographic" coordinate system refers to longitude/latitude
coordinates.  Longitude and latitude are NOT "always the same" and must
be expressed relative to a datum; 30 degrees North, 90 degrees West is
NOT the same location in the NAD27 datum as it is in NAD83.  WGS83 and
NAD83 are datums - they are not coordinate systems.  Cartographic
coordinate systems are based on datums.

If you have "pure" (most people would say "unprojected")
longitude/latitude data you still need to know what datum is used.

You're worrying too much about height/altitude - ignore it.  The
ellipsoid/datum parameters for your projections know how big the Earth
is (or at least, how big it is defined to be for that ellipsoid).

If the output and input projections are identical there is no
reprojection done.  Yes, this is faster, but vector reprojection is VERY
fast and not worth worrying about (at least, not now).

The map EXTENTS are expressed in the units of the output projection
being used by MapServer (as defined in your MAP file).

You will have MUCH better luck getting answers if you limit your
postings to one or a few related questions.  Long laundry lists of
questions tend to make readers (a) feel they don't have time to answer
all those questions and/or (b) don't know how to answer ALL of them, so
they might as well not answer ANY of them.  And please always reply to
the whole list, not just to the person who replied to you - thanks!

        - 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 Vortex
Sent: Sunday, April 24, 2005 6:10 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Questions on projections, reference
systems, map extents, scales

Hello!!
I'm quite new to all this mapserver/postgis/proj4/geoinformationsystem
stuff.
Althought i've played around for a while with it and made many
assumptions how it works, i'm unsure if i got it right and have a lot of
questions too. Maybe somebody can confirm or disagree my conclusions and
answer some questions?

* I have to specify the coordinate system for every data source?
  - At least for shapefiles and postgis layers the coordinate system
    should be "embedded"? Why i have to specify it anyway?
  - What happens if they don't match?
    + Is the lat/lon data simply related to the new reference system?
* WGS84 and NAD83 are *nearly* the same?
* geographic coordinate system means unprojected latitude/longitude
values?
* WGS84 and NAD83 are "unprojected" lat/long coordinate systems by
definition?
* latitude/longitude values are independent of the reference system,
they
  are always the same. But the reference system is getting important
  if i want to calculate the absolute position of a point in 3d space
  because the associated height value is based on the surface of
  the reference ellipsoid?
* There are data sources available which does not have a reference
  system at all and consists of "pure" lat/long data?
  - If i specify a reference system in the mapfile for such data anyway,
    the positions of this data source are asumed to be flat on the
surface of
    the specified reference ellipsoid?
* To do a projection (like lcc) it is absolutely necessary to have a
  reference system, because it's necessary to know the 3d positions of
  all data to perform the projection?
  - Does mapserver consider the height of any point over the surface
    of the reference ellipsoid for projection? Probably this is done
    by proj4 lib anyway. Does it? Is it necessary?
* If i specify a latlong output projection and the source data is also
  in latlong althought there is a reference system specified like NAD83,
  there is no reprojection done?
  - Is this faster than output to lcc for example?
  - Isn't it totally regardless of which reference systems are specified
    in this case?
* The map EXTENTS specified in the mapfile are always related to the
  result of the output projection?
  - For lcc they are in meter, for latlong they are in decimal degrees?
  - In the lcc projection it is quite easy to set the origin of the
    map by lat_0 lon_0 parameter if i want to zoom to a specific
    lat/lon position having always the same extents.
    + Is this the usual way?
    With lat/long output, the only way to change the origing is changing
    the EXTENT?
  - If i set k != 1 for lcc, the scale calculation goes wrong? So
    zooming should always be done be modifing the map extents? Is the
    k parameter useful in mapserver anyway?
* The SIZE and RESOLUTION paramter in mapfile are used to calculate the
  real size of the displayed image. The specified map EXTENT is
  fitted into this "window". Mapserver does not really know about
  the units of the output projection. Therefore i have to specify
  the UNITS in the mapfile. With a projection output in meter, the
  scale can be calculated now. Based on the scale and the resolution,
  the scalebar is generated.
  - The documentation says, the scale is "Set most often by the
application."
    Is this really true? I don't know how to set it and i thought it
should
    be calculated by the mapserver itself?
  - How is it possible for mapserver to calculate a scalbar for
    lat/long output? I thought it should be even for projections
difficult to
    calculate a scalebar. Isn't it only correct for parts of the map
    because of distortions? I thought this problem would be even more
    difficult for unprojected maps? Is this only a rough estimation?
* What happens if there is projected INPUT data with units in meters
  for example? I think it should work too if i specify the correct
  projection. But is it internally "inverse" projected to latlong
  coordinates to merge it with other data sources which are maybe
  naturally in latlong coordinates and then reprojected to the
  output projection?


Wow, that was quite a lot. Hopefully not too much. Sorry for my bad
english.

Thank you very much!

Klaus



More information about the mapserver-users mailing list