[UMN_MAPSERVER-USERS] simple tool for conversion

Richard Greenwood richard.greenwood at GMAIL.COM
Thu Dec 9 11:40:14 PST 2004


I haven't read all of this thread, so maybe this was already discussed.

It sounds like your data are in two different coordinate systems.
Mapserver can convert between coordinate systems. (to keep this breif,
we'll pretend that "coordinate system" and "projection" are synonyms.)

Lat/Lon is a spherical representation of the whole earth. Units are
degrees of arc. California State Plane is a cartesian (flat)
representation. Units are in feet.

To get mapserver to convert your data you have to:
1. define a projection for the map output as a whole (what mapserver
generates, and which is displayed in the browser).
2. define the projection of each input layer.

If all your input data is in the same coordinate system you don't need
to mess with that stuff.

So if you want to output your maps in California Zone 1 put this in
the MAP section of your map file

projection
        "init=epsg: 2225"
end

And put this inside the LAYER definition of your lat/lon layer(s):

projection
        "init=epsg: 4269"
end

The epsg number defines a projection and is in turn, defined in the
"epsg" file in the $PROJ_LIB directory. (You may need to use other
epsg numbers, I didn't look to see if you were in California Zone 1,
that was just the first one I found.)

HTH

--
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com



More information about the MapServer-users mailing list