ArcGIS Server 10.22 Identify Issue

4149
7
Jump to solution
04-10-2014 10:49 AM
by Anonymous User
Not applicable
Original User: cbr4rusty

When performing an identify task against any arcgis server 10.22 map service, it does not return the "Spatial Reference" in the geometry object that gets returned. Since there is not spatial reference in the geometry object, the JavaScript API will create the geometry and set its Spatial Reference to the default (4326) - which is incorrect for the returned geometry.

ArcGIS Server 10.21 Sample Identify Request
http://54.84.38.134:6080/arcgis/rest/services/ladotd/ra/MapServer/identify?f=json&geometry={"x":-10281732.37830374,"y":3703573.248038438,"spatialReference":{"wkid":102100,"latestWkid":3857}}&tolerance=10&returnGeometry=true&mapExtent={"xmin":-10295127.9675107,"ymin":3696426.3858937835,"xmax":-10267916.385441214,"ymax":3711713.7915507983,"spatialReference":{"wkid":102100,"latestWkid":3857}}&imageDisplay=712,400,96&geometryType=esriGeometryPoint&sr=102100&layers=visible:8&returnM=true
[ATTACH=CONFIG]33029[/ATTACH]

ArcGIS Server 10.22 Sample Identify Request (no SR in geometry)
http://54.193.47.10/arcgis/rest/services/INDOT_RCE/MapServer/identify?f=json&geometry={"x":-9605937.405203775,"y":4849576.759392234,"spatialReference":{"wkid":102100,"latestWkid":3857}}&tolerance=10&returnGeometry=true&mapExtent={"xmin":-9606489.185001723,"ymin":4848420.64933939,"xmax":-9603087.737242945,"ymax":4850331.57504657,"spatialReference":{"wkid":102100,"latestWkid":3857}}&imageDisplay=712,400,96&geometryType=esriGeometryPoint&sr=102100&layers=visible:34&returnM=true
[ATTACH=CONFIG]33030[/ATTACH]
1 Solution

Accepted Solutions
CollinTewalt
New Contributor

I raised an issue with Esri support. Here's what they said.


"The bug that both NIM102427 and NIM102007 are duplicate of is NIM101410 Spatial Reference is missing from geometries returned by an Identify operation when an input/search geometry had one spatial reference defined in it. Sorry about the confusion. The current status of NIM101410 is Fixed at version 10.3, so it is no longer an issue for ArcGIS Server 10.3."

View solution in original post

7 Replies
by Anonymous User
Not applicable
Original User: crafty762

Check the properties of the data source behind your 'Routes' and 'CountyLog' layers using ArcCatalog.  Could 'CountyLog' simply not have a defined projection?
0 Kudos
ScottNoldy
New Contributor III
cbr, did you ever get this one figured out?  We just upgraded to 10.2.2 and are seeing the same behavior.
0 Kudos
ScottNoldy
New Contributor III
Confirmed as a bug from ESRI support: NIM102007
by Anonymous User
Not applicable
Original User: goldenlimit

Hello all,

Here is the link to track about this bug:  [NIM101410 The spatial reference is missing from geometries returned by the Identify operation when input or search geometry has one spatial reference defined in it]

http://support.esri.com/en/bugs/nimbus/role/beta10_1/TklNMTAxNDEw
Shingo-Ikeda
New Contributor III
I found the workaround solution for this issue. It seems it is returnining correct geometries, but API forgot to add spatial reference to it.

      var deferred = new dojo.Deferred();
      deferred = identifyTask.execute(identifyParams);
      deferred.addCallback(function(response) {     
           return dojo.map(response, function(result) {
               var feature = result.feature;
               
               alert(result.layerName +":"+ feature.geometry.spatialReference.wkid);
               
               // alert(feature.geometry.getExtent().xmin);
               // alert(feature.geometry.getExtent().ymin);
               // alert(feature.geometry.getExtent().xmax);
               // alert(feature.geometry.getExtent().ymax);
               feature.geometry.spatialReference = map.spatialReference;
               return feature;
              });
       });


Within the call back, update the spatial reference of the returning geometry with map.spatialReference.
It seems QueryTask is not affected by this bug.

Shingo
Shingo Ikeda
Geospatial Data Scientist/Developer - Geographical Information Platform
Global Power Generation - Digital Satellite USA and Canada
SimonFisher
Occasional Contributor II

I am also seeing this issue at 10.22.  Does anyone know if this has this been fixed in an arcgis server service pack, patch or 10.2.3?  or in 10.3? or is the only fix a code fix to manually add in the spatial reference?

0 Kudos
CollinTewalt
New Contributor

I raised an issue with Esri support. Here's what they said.


"The bug that both NIM102427 and NIM102007 are duplicate of is NIM101410 Spatial Reference is missing from geometries returned by an Identify operation when an input/search geometry had one spatial reference defined in it. Sorry about the confusion. The current status of NIM101410 is Fixed at version 10.3, so it is no longer an issue for ArcGIS Server 10.3."