I have this code where an IGeometry shape (4-5 circles not filled) should be intersected with another layer's features
// Convert from IGeometry to ADF Geometry Polygon
ESRI.ArcGIS.Geometry.IPointCollection com_pointcollection =
(ESRI.ArcGIS.Geometry.IPointCollection)multipointPoints2;
ESRI.ArcGIS.ADF.Web.Geometry.Point[] new_adf_points =
ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.Local.Converter.FromIPointCollection
(com_pointcollection);
ESRI.ArcGIS.ADF.Web.Geometry.PointCollection new_adf_pointcollection = new
ESRI.ArcGIS.ADF.Web.Geometry.PointCollection();
for (int i = 0; i < new_adf_points.Length - 1; i++)
{
new_adf_pointcollection.Add(new_adf_points[i]);
}
ESRI.ArcGIS.ADF.Web.Geometry.Ring new_adf_path = new
ESRI.ArcGIS.ADF.Web.Geometry.Ring();
new_adf_path.Points = new_adf_pointcollection;
ESRI.ArcGIS.ADF.Web.Geometry.RingCollection new_adf_pathcollection = new
ESRI.ArcGIS.ADF.Web.Geometry.RingCollection();
new_adf_pathcollection.Add(new_adf_path);
ESRI.ArcGIS.ADF.Web.Geometry.Polygon new_adf_polygon = new
ESRI.ArcGIS.ADF.Web.Geometry.Polygon();
new_adf_polygon.Rings = new_adf_pathcollection;
// Now get the intersect query
ESRI.ArcGIS.ADF.Web.SpatialFilter spatialFilter =
new ESRI.ArcGIS.ADF.Web.SpatialFilter();
spatialFilter.Geometry = new_adf_polygon;
spatialFilter.ReturnADFGeometries = false;
spatialFilter.MaxRecords = 10000;
System.Data.DataSet queryResultsDataSet = new System.Data.DataSet();
for (int index = 0; index < layerIDs.Length; index++)
{
System.Data.DataTable queryResultsDataTable =
queryFunctionality.Query(queryFunctionalityq.Name, ConvertFromLayerNameToLayerId(m_Map, m_ResourceMapItem, m_firstLayerName), spatialFilter);
queryResultsDataTable.TableName = gisResource.Name + "_" + layerNames[index];
queryResultsDataSet.Tables.Add(queryResultsDataTable);
}
I'm converting the IGeometry (which I've drawn on the screen and I know it's correct) to a web ADF Polygon and then using this polygon for an intersection query
However some features which are clearly not intersecting the circles' borders are being included in the result
To better explain the situation I did this screenshot:
Why is that? The red squared features are all different so it's not a problem of "same feature"
Update: with less features it's the same, if they intersect the circle line they get colored, but the others get colored too.. simply adding them seems like telling the system "I'm intersected too"