AnsweredAssumed Answered

Filtering a FeatureClass for use with SurfaceOp.Visibility

Question asked by jtheelen on Mar 21, 2012
Latest reply on Mar 22, 2012 by jtheelen
Hello,

I have a dataset of about 10.000 points and for statistical analysis I need to calculate the area visible from each of those points individually. I'm using ArcGIS 9.3 ArcObjects/VBA.

I have the code for doing the calculation using a derived dataset containing one single point location. What I'm trying to do is put a query or filter on the FeatureClass containing all points, each time selecting one single point and using that filtered FeatureClass as the parameter calling the SurfaceOp.Visibility operation.

Unfortunately, I cannot find the way to do this. I tried to put a IQueryFilter on a FeatureLayer, but when I use the FeatureClass linked to that FeatureLayer, the operation SurfaceOp.Visibility still uses the underlying FeatureClass with all points, bypassing the filter on the FeatureLayer level. I also know it is possible to put a filter on the FeatureClass, but then I get a Cursor for iterating the records in the filtered FeatureClass, an object I cannot use as a parameter for the SurfaceOp.Visibility operation.

One way to achieve my goal would probably be to create an all new FeatureClass, containing one single point, materialize it into a temporary shapefile, and us it as the parameters. However, I also try to limit the overhead this would generate considering the large amount of points I have to process (1 extra second overhead per point for 10.000 points would mean about 3 hours of extra processing time).

My question is: how can I filter a FeatureClass in ArcObjects, in such a way that the resulting (filtered) object is indeed a filtered FeatureClass I can use as a parameter for the SurfaceOp.Visibility operation.

I'm rather new to ArcObjects so forgive me for asking a rather stupid question.

Thank you,
Joeri

Outcomes