I'm struggling with using the ESRI SOAP api to perform a spatial filter against a layer with a datatype of 'Route Event Source'
Because the number of features returned by a single spatial query could easily exceed the configured ArcGIS server max, I first grab all the features Ids of the features within the selection envelope, and then retrieve the feature attributes in chunks.
No matter what I do, the array of Feature Ids returned by
QueryFeatureIds is always empty. With the same
SpatialFilter, though, I receive a correct count from
QueryFeatureCount and I receive the correct records from
Here's the test case that illustrates the problem I'm having. Am I missing something, or is that the intended behavior? (I've changed the selection envelope in the sample)
var proxy = new MapServerProxy("http://mymapserver/ArcGIS/services/myservice/MapServer"); var envelope = new EnvelopeN(); envelope.XMax = 100010.0; envelope.XMin = 100000.0; envelope.YMax = 200010.0; envelope.YMin = 200000.0; var spatialFilter = new SpatialFilter(); spatialFilter.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects; spatialFilter.GeometryFieldName = "Shape"; spatialFilter.FilterGeometry = envelope; int routeEventLayerIndex = 0; var count = proxy.QueryFeatureCount("Layers", routeEventLayerIndex, spatialFilter); Assert.AreEqual(2, count); // PASSES, 2 features within envelope var records = proxy.QueryFeatureData("Layers", routeEventLayerIndex, spatialFilter); Assert.AreEqual(2, records.Records.Length); // PASSES, data for 2 features is returned var fidSet = proxy.QueryFeatureIDs("Layers", routeEventLayerIndex, spatialFilter); Assert.AreEqual(2, fidSet.FIDArray.Length); // FAILS!!! Length of FIDArray is 0
I've tested this against ArcGIS Server 10.0 and 10.0 sp 4; both return the same results.