Hi,
I'm trying to build a routine to traverse a series of frames (defined as bounding boxes), outputting info about the content within each of these. I'm testing whether the frame contains data or not.
However, all my attempts to get a feature count fails, as the routine always return zero.
I'm attempting to use GetFeaturesWithin, but I've also tried GetFeaturesInsideBoundingBox and GetFeaturesOverlapping, but all return zero.
I've also tested whether any data is returned, and both GetAllFeatures and GetFeatureById return valid features.
Here's the relevant code segment:
Dim lyr As New MsSql2008FeatureLayer(...)
Dim frameRect As New RectangleShape(lox, hiy, hix, loy) 'populated with frame min/max
'testing access:
Dim ft1 = lyr.QueryTools.GetAllFeatures(ReturningColumnsType.AllColumns).First 'this returns a valid feature
Dim ft2 = lyr.QueryTools.GetFeatureById("30062", ReturningColumnsType.AllColumns) 'this returns a valid feature within a specific frame (A210) - see screen dump label
Dim ftscnt As Long = 0
ftscnt = lyr.QueryTools.GetFeaturesWithin(frameRect, ReturningColumnsType.NoColumns).Count 'this always returns zero !?!
Here's a screendump of the data in question (frames are read, data is green, labeled with feature ID):
Suggestions as to the cause are most welcome.
Cheers.