[Mapserver-users] pb with projection settings

Frank Warmerdam warmerdam at pobox.com
Mon Nov 24 09:02:42 EST 2003


Yvain Ballini wrote:
> Hi list,
> I've got a problem with the use of the proj.lib in Mapserver: I would 
> like to display some map in Italy but I don't succeed in setting the 
> right projection parameters. I get always the same distorted map if I 
> change the parameters in the file proj_def.dat or when I change the 
> projection settings in the mapfile (for the main projection and for the 
> layer reprojections). Has someone any idea about the solution of these 
> problem ??
> Thank you very much.
...
> PROJECTION
> 
> "proj=longlat"
> "ellps=intl"
> "units=m"
> "towgs84=-225,-65,9,0,0,0,0"
> "no_defs"
> 
> 
> #"proj=utm"
> #"ellps=WGS84"
> #"zone=15"
> #"towgs84=0,0,0"
> #"north"
> #"no_defs"
> 
> END

Yvain,

If you choose to display a map on a geographic grid you will tend to get a
somewhat distorted view.  On approach to try and work around this would
be to add the PROJECTION declarations for each of the layers, marking them
as being proj=latlong ellps=intl, and then add a map level declaration for
proj=utm zone=32 ellps=intl.  This would cause the data to be reprojected
into UTM (I think zone 32 is roughly right for Italy).

I would add two notes:
  o Don't use units=m for proj=latlong, it doesn't make any sense.
  o When emailing out your map file requesting support from the list try
    reducing it to the minimum required to reproduce your problem.  I almost
    gave up scanning through your long mapfile to see if there were any other
    significant declarations.

Good luck,

-- 
---------------------------------------+--------------------------------------
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