ARCIMS Emulator getProjection with ArcGIS9.0

Frank Warmerdam warmerdam at POBOX.COM
Sun Sep 26 22:36:08 EDT 2004


Ellis Robin (Bundaberg) wrote:
> <FEATURECOORDSYS
> string="GEOGCS[&quot;GCS_GDA_1994&quot;,DATUM[&quot;D_GDA_1994&quot;,SPHEROID...

>
> The com.esri.esrimap.Esrimap file looked as though it would cater for this difference in XML, however I've found that
> the process falls over at this stage:
>
> my $l = new mapscript::layerObj($map); $l->setWKTProjection($filtcs_wkt); $envelope->project(new
> mapscript::projectionObj($l->getProjection()),new mapscript::projectionObj($map->getProjection()));

Robin,

Unfortunately the OGC WKT coordinate system specification was pretty
weak and there are a variety of variations.  I presume that the
layerObj->setWKTProjection() method is expecting something that is
compatible with the OGR WKT definition.  However, ESRI WKT is somewhat
different.  The key (deep down in OGR) is to import ESRI WKT and
then to call morphFromESRI() on the WKT to "normalize" the definition.

As far as I know this is not directly accessable from MapScript, but I
would suggest layerObj->setWKTProjection() be altered to do this morphing
internally if the WKT is prefixed with something like ESRI:::.  Then the
above mapscript could apply that.  In fact, we might want to change the
setWKTProjection() method to use the OGRSpatialReference::SetFromUserInput()
method which includes escapes for various formats, including ESRI morphing.

Of course, I could be a bit off target on what the real issue is.  I wouldn't
have expected any serious issues in a simple GEOGCS definition.

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