Projections

Stephen Lime steve.lime at dnr.state.mn.us
Tue Aug 3 18:04:15 EDT 1999


In general, on-the-fly projections are experimental and using them is
discouraged for a number of reasons, speed is a big one. Several folks
are using them successfully though. Here's a quick tutorial.

COMPILING: MapServer by default is setup not to use on-the-fly projection
support. So, there are a couple of things you need to do to get it to work.

  1) nab the PROJ.4 cartographic projection library from the USGS (the
      URL is on the download page at the main MapServer site)

  2) compile it

  3) edit the Makefile in the MapServer distribution. look for the lines refering
      to PROJ and uncomment them (you may need to enter the location of 
      the PROJ.4 library and include files on your system)

USING: MapServer does nothing special and relies on PROJ.4 to handle
all the projection parameters. Within a map file you specify an output projection
for a map/application, and each layer can have an input projection section
specific to it. If no projection is defined for a layer then it is assumed to be
in the same system as the output system. If all data is in the same system
then you don't need the PROJ.4 library at all. Cameron's example projection
definition is most likely an output definition. Commonly you'd see unprojected
layers with the following definition indication that they're in lat/lon:

PROJECTION
"geographic"
END

Everything between the "PROJECTION" and the "END" are keywords for the
PROJ.4 library. So, to get stuff to work you'll need to read the manuals associated
with PROJ.4 (see the PROJ.4 ftp site). Note that there can be multiple input
projection definitions (1 per layer) and they could all be different, but there can
only be 1 output projection.

Again, study the PROJ.4 docs as they detail parameters and keywords.

Steve

Stephen Lime
Internet Applications Analyst
MIS Bureau - MN DNR

(651) 297-2937
steve.lime at dnr.state.mn.us

>>> Cameron Shorter <camerons at cat.org.au> 08/03 4:25 PM >>>
Hi,
I have just been given a .map file which contains the following:'

PROJECTION
"proj=utm"
"ellps=aust_SA"
"zone=56"
"south"
END

Unfortunately, it doesn't run, and I cannot find any documentation on how
to include PROJECTIONs or even if they are supported by mapserv.

Cameron Shorter
61.2.9901-1596 work.




More information about the mapserver-users mailing list