WKID of map differ in Geocortex rest and work flow map info
Hello,
I've been hitting my head against the wall for 3 entire days now.
My Geocortex bottom Map service is in Australian VicGrid, hosted by ArcServer. The spatial reference is in EPSG 3111 and ESRI factory ID 102171. If the service is hosted with Geoserver, the map thinks its WKID is 3111 (this is good), if hosted by ArcServer Geocortex map's spatial reference system is set to 102171 (bad). Unfortunately I have to use ArcServer. My workflow is trying to add a featureset from a Geoserver in 3111, now the map complains
The JavaScript error is: Map: Geometry (wkid: 3111) cannot be converted to spatial reference of the map (wkid: 102171)
I have tried reprojecting using ProjectTask and ProjectSingleGeometry, but projecting to WKID:102171 returns undefined (the workflow/geometry service seems not to know 102171 as WKID?). I've also tried to reproject again to 3111, just to be sure. It does not help. I've tried querying the map through MapInfoActivity, it says it is in 3111???, the Geocortex REST says map is in 102171. Interestingly, if I use an External Command, I can add 3111 geometry without the map complaining - but I need to addmarkupGeometry and zoomto featureset, wich would need 2 external commands, but the workflow ends after one (and this would only fix the symptoms). Now if I switch my base service to a VicGrid Geoserver mapservice, the work flow works perfectly.
Any ideas, how can I overcome the disparity between a workflow that thinks the map is in 3111 and a Geocortex map that is in 102171 -which are still two IDs for the same spatial reference?
Thank you,
Helen
0
-
Hi Helen,
Your best option here would be to have the ArcGIS Server map re-published such that it provides the WKID as 3111. However, if the WKIDs 3111 and 102171 are equivalent we can cheat a bit in the workflow without using the project task.
One of the output parameters of the Get Map Info activity is the current spatial reference of the map, represented as a SpatialReference object. You can use this object with an Assign activity to override the spatial reference of the FeatureSet you're using in your workflow.
Note: you may have to assign the Spatial Reference on the FeatureSet itself AND all of the Graphics (Features) within the FeatureSet, so that it serializes properly when workflow sends it to your viewer. Once you do, you should be able to see things as expected.
The viewer APIs are very picky about spatial references and will not behave as expected when geometries are sent in a different one, as you've observed. They must exactly match - either by ID or every character in WKT text, if using WKT.
Regards,
-Malcolm0
Please sign in to leave a comment.
Comments
1 comment