Projection Issues

Frank Warmerdam warmerdam at POBOX.COM
Tue Feb 7 17:29:35 EST 2006


On 2/7/06, Neil Saunders <n.j.saunders at gmail.com> wrote:
> Hi All!
>
> Frank; Thanks for that tip, now I'm setting the projection on the layer and
> mapserver is doing my translation into merc which is great. However, the
> units its projecting it into are meters. If I set, as I have, the units
> in the layer projection to be m and the units of the map to be dd then i
> get a "[MapServer Error]: msProcessProjection(): unknown unit conversion
> id" error.

Neil,

If your map is going to be in mercator you are going to
have to specify your extents in some linear measure (like
meters), not in lat/long.

> So I tried to convert my data into a new shapefile so i could re-import
> it, using the following command:
> ogr2ogr -s_srs "+proj=latlong" -t_srs "+proj
> =merc +ellps=WGS84" e:\upload\worldmerc.shp e:\upload\cntry.shp
> ERROR 1: Failed to find required field in datum.csv in
> InitDatumMappingTable(),
> using default table setup.
> Failed to transform feature 180.
> ERROR 1: Terminating translation prematurely after failed
> translation of layer cntry00

I'm not exactly sure why you get this error.  But you really
should be specific about datum.

eg.
ogr2ogr -s_srs "+proj=latlong +datum=WGS84" -t_srs "+proj=merc
+datum=WGS84" e:\upload\worldmerc.shp e:\upload\cntry.shp

I would add it really frightens me when you leave
so many mercator parameters defaulted.

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