[Mapserver-users] Problems with projection

Frank Warmerdam warmerdam at pobox.com
Tue Mar 18 09:27:15 EST 2003


Krzysztof Chodak wrote:
> I got problems with projecting.
> I have some files in WGS84 and what to reproject them for users into
> Mercator.
> I use following PROJECTION element in map definition file:
> 
> PROJECTION
>   "proj=merc"
>   "ellps=bessel"
>   "lat_ts=0N"
>   "lon_0=110E"
>   "k_0=0.997"
>   "x_0=3900000m"
>   "y_0=900000m"
> END
> 
> I'm not using PROJECTION subelements in LAYERs as this information is stored
> in shape files.
> I see no difference in produced image - with or without main PROJECTION
> element so I think that is not working for me (olso I think I know how
> Mercator should look like).

Krzysztof,

If you are using the normal MapServer shapefile reading code, you will still
have to specify the projection settings for the shapefile based layers.
MapServer does not automatically read ESRI .prj files to derive projection
information.

Your formulation of a Mercator projection looks fine, though I would note that
specifying units in the false northing and easting values does not accomplish
anything.  The "m" is ignored.  False easting and northing values are always
in meters (with PROJ.4) even if alternate units are being used via units=
or to_meter=.

Best regards,
-- 
---------------------------------------+--------------------------------------
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