Hi,
I'm trying to find lines on which there are points that I would then connect into a line. The problem is that as soon as I look for points intersecting the line, it doesn't find any even though I know they must be there.

One line example
my code:
if (!(MapView.Active.Map.FindLayers("Z_Voda_L ").First() is FeatureLayer vodaLayer))
return;
FeatureClass fcVoda = vodaLayer.GetTable() as FeatureClass;
if (!(MapView.Active.Map.FindLayers("featureToVer").First() is FeatureLayer featureToVer))
return;
FeatureClass fcFeatureToVer = featureToVer.GetTable() as FeatureClass;
var qfilter = new QueryFilter
{
WhereClause = "OBJECTID >= 0"
};
var vodaPruchod = fcVoda.Search(qfilter);
while (vodaPruchod.MoveNext())
{
var vodaFeature = vodaPruchod.Current as Feature;
var body = vodaFeature.GetShape() as Polyline;
var spatialQueryFilter = new SpatialQueryFilter()
{ FilterGeometry = body, SpatialRelationship = SpatialRelationship.Intersects};
var polyCursor = fcFeatureToVer.Search(spatialQueryFilter, false);
var mapoveBody = new List<MapPoint>();
while (polyCursor.MoveNext())
{
var bodAktual = polyCursor.Current as Feature;
var mapPoint = bodAktual.GetShape() as MapPoint;
mapoveBody.Add(mapPoint);
}
}
}The polyline is always selected because I see it always has a length, but I don't know why it doesn't find any point.
I will be glad for any advice and help
David