d c wrote:
Hi listers,

I want to set the following projection (which works perfectly in the mapfile)
dynamically in Mapscript.

PROJECTION
 "proj=stere"
 "ellps=WGS84"
 "datum=WGS84"
 "lon_0=0"
 "lat_0=-90"
 "lat_ts=-71"
 "units=m"
END

------  MapScript ----------------

$map->setProjection("proj=stere, ellps=WGS84, datum=WGS84, lon_0=0, lat_0=-90, lat_ts=-71, units=m");
- or -
$layer->setProjection("proj=stere, ellps=WGS84, datum=WGS84, lon_0=0, lat_0=-90, lat_ts=-71, units=m");

------- Error -----------------------

Fatal error: [MapServer Error]: msProcessProjection(): major axis or radius = 0 or not given in .....php

Dan,

The above may be an acceptable syntax for MapScript setProjection, but I
would like to encourage people to use the same syntax as on the PROJ command
line.

eg.

$map->setProjection("+proj=stere +ellps=WGS84 +datum=WGS84 +lon_0=0
                     +lat_0=-90 +lat_ts=-71 +units=m");

The error message suggests the ellipse setting was not being successfully
parsed.  If you still can't get it working with the above syntax, file a
bug in bugzilla but make sure it gets assigned to me ([EMAIL PROTECTED])
and I'll dig through the PHP, mapserver and proj logic to see what is
happening.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [EMAIL PROTECTED]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org

Reply via email to