Hello,
I have two feature layers (State County and soccer fields). Given a particular county in the countLayer, I would like to find all soccer fields (soccerLayer) that intersect. Instead of looping through all the soccer fields and seeing if they intersect, is there a way to query soccerLayer using QueryTools(?) using the lower and upper points of the bounding box?
For example:
Collection<Feature> countyFeatures = countyLayer.QueryTools.GetFeaturesContaining(pointShape, ReturningColumnsType.AllColumns);
foreach(Feature features in countyFeatures)
{
RectangleShape county = features.GetBoundingBox();
double lowerLeftLatY = county.LowerLeftPoint.Y;
double lowerLeftLngX = county.LowerLeftPoint.X;
double upperRightLatY = county.UpperRightPoint.Y;
double upperRightLngX = county.UpperRightPoint.X;
}
Collection<Feature> soccerFeatures = soccerLayer.QueryTools.something(
(
(All features whose LowerLeftPoint.Y is between lowerLeftLatY and upperRightLatY)
or
(All features whose UpperRightPoint.Y is between lowerLeftLatY and upperRightLatY)
)
AND
(
(All features whose LowerLeftPoint.X is between lowerLeftLngX and upperRightLngX)
or
(All features whose UpperRightPoint.X is between lowerLeftLngX and upperRightLngX)
)
Thanks, Steven