ARCIMS Emulator getProjection with ArcGIS9.0

Ellis Robin (Bundaberg) Robin.Ellis at NRME.QLD.GOV.AU
Sun Sep 26 19:04:53 PDT 2004


I've had the ArcIMS Emulator working just great for a few months now, however we've just upgraded our ESRI software to ArcGIS 9 and I've found that the request string being output from ArcGIS is slightly different between versions, causing an error to occur when processing 'com.esri.esrimap.Esrimap'. I've been able to implement a dodgy workaround to suit my specific needs, however it isn't a solution that will help other users. If someone can come up with a transferable solution I'd like to implement it.

It looks to me that the XML output from ArcGIS 8.3 used "EPSG" ID's for FEATURECOORDSYS and FILTERCOORDSYS, like this:

<FEATURECOORDSYS id="4283"/><FILTERCOORDSYS id="4283"/>

But ArcGIS 9.0 uses strings to define these, like this:

<FEATURECOORDSYS string="GEOGCS["GCS_GDA_1994",DATUM["D_GDA_1994",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]"/>

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()));

Now, wether this is because ESRI has messed up the projection definition string for this particular coordinate system or the getProjection syntax has changed (input and output) I'm not sure. In the mean time I've hard-coded in the appropriate EPSG ID for the coordinate system that we always use:

$envelope->project(new mapscript::projectionObj("init=epsg:4283"),new mapscript::projectionObj($map->getProjection()));

Effect for this particular instance, but not so good for other people.

If anybody can come up with a more robust solution I'd love to hear it. I'm not an expert in coordinate system definition, so if it looks like the problem is on ESRI's side please let me know and I'll try to iron bugs on that side of things.

Thanks

Rob



Robin Ellis
Department of Natural Resources and Mines
PO Box 1167
Bundaberg QLD 4670
ph +61 7 4131 5771
fax +61 7 4131 5823
Robin.Ellis at nrm.qld.gov.au




************************************************************************
The information in this e-mail together with any attachments is
intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material.
Any form of review, disclosure, modification, distribution
and/or publication of this e-mail message is prohibited.  
If you have received this message in error, you are asked to
inform the sender as quickly as possible and delete this message
and any copies of this message from your computer and/or your
computer system network.  
************************************************************************



More information about the MapServer-users mailing list