Projection with Mapserver & PRJ

Matthew Perry perrygeo at GMAIL.COM
Tue Jan 24 13:10:21 PST 2006


Brian,

Mapserver, as far as I know, doesn't recognize .prj files. You have to
define a PROJECTION for every layer which is not in the same
projeciton as the map.

To translate your .prj file into the appropriate proj string, I've
found http://www.remotesensing.org/geotiff/proj_list/ to be a good
resource.

If the projection is fairly common, it also likely that it is the EPSG
database which can be searched online at http://ocean.csl.co.uk/ .. in
this case use the "init=epsg:xxxx" syntax instead of the full proj
definition.

hope this helps a bit,

Matt Perry

On 1/24/06, Brian Peschel <brianp at occinc.com> wrote:
> Does MapServer use PRJ files?  I need to do some projections with shape
> files.  All of my shape files sets have prj file (ie town.shp, town.shx,
> town.dbf, town.prj).  If I setup a map level projection like:
>   PROJECTION
>     "init=epsg:4326"
>   END
>
> do I need to setup a layer level projection also?  Or will MapServer read
> the PRJ files and do the conversion on the fly for me?  I am struggling to
> understand how to convert a PRJ file into the PROJ.4 parameters like:
>   PROJECTION
>       "proj=laea"
>       "ellps=clrk66"
>       "lat_0=45"
>       "lon_0=-100"
>   END
> (which is from the tutorial, and is not the settings I need).
>
> Any help in this would be appreciated...
>
> Brian
>


--
Matt Perry
perrygeo at gmail.com
http://www.perrygeo.net



More information about the MapServer-users mailing list