I’m experiencing what appears to be inconsistent spatial query behavior in ArcGIS Server 11.5 against a polygon feature class stored in SQL Server.
I would like to know whether this is expected behavior, a known limitation, or potentially a bug.
Environment:
- ArcGIS Server / Enterprise 11.5
- SQL Server enterprise geodatabase
- Layer is a normal polygon feature class (not a query layer/view)
- Query performed against /MapServer/{layerId}/query
- Spatial relation: esriSpatialRelIntersects
- Geometry type: esriGeometryMultipoint
- Requests are sent using POST
- Spatial index rebuilt
- Statistics updated
- Feature class extent recalculated
- Service restarted
The issue:
Individual point queries work correctly.
However, when multiple points are combined into a single multipoint geometry, ArcGIS Server starts returning inconsistent results.
The strange part is:
Adding additional points can REMOVE previously returned OBJECTIDs from the result set.
https://servername/webgis/rest/services/Int/NG_Intern/MapServer/188/query
Post body:
{
"where": "1>0",
"geometry": {
"points": [
[518458.872, 6091340.096],
[529008.6611, 6096497.8727],
[518340.468, 6091537.346]
],
"spatialReference": {
"wkid": 25832
}
},
"geometryType": "esriGeometryMultipoint",
"inSR": 25832,
"spatialRel": "esriSpatialRelIntersects",
"units": "esriSRUnit_Meter",
"outFields": "objectid",
"returnGeometry": true,
"returnTrueCurves": false,
"returnIdsOnly": false,
"returnCountOnly": false,
"returnZ": false,
"returnM": false,
"returnDistinctValues": false,
"returnExtentOnly": false,
"sqlFormat": "none",
"returnUniqueIdsOnly": false,
"featureEncoding": "esriDefault",
"f": "json"
}
Example 1 — returns 3 polygon features:
{
"points": [
[518458.872,6091340.096],
[529008.6611,6096497.8727],
[518340.468,6091537.346]
],
"spatialReference": {
"wkid": 25832
}
}Example 2 — same points + one additional point:
{
"points": [
[518458.872,6091340.096],
[529008.6611,6096497.8727],
[518340.468,6091537.346],
[521703.189,6102741.1]
],
"spatialReference": {
"wkid": 25832
}
}This second query returns only 1 polygon feature???
The polygons returned from Example 1 disappear completely in Example 2, even though all original points are still included.
This seems logically incorrect - or am I missing something?
I can also reproduce similar behavior using multipart polygon geometries (rings) instead of multipoints.
Additional observations:
- Results appear sensitive to point order
- Individual point queries always return correct polygons
- Problem only occurs with combined geometries
Has anyone seen similar behavior with:
- ArcGIS Server MapServer query engine
- SQL Server spatial backend
- multipoint or multipart geometries
- candidate pruning / spatial indexing
I’m especially interested in whether:
- this is a known bug/limitation of MapServer queries
- there are known bugs related to spatial decomposition multipoint geometries
Thanks.