ISpatialFilter without FeatureClass

437
2
Jump to solution
02-07-2012 01:14 AM
VinayanMP
New Contributor
Hello,
I hope somebody can  help me on this.

i have two polygon Feature Classes, say, A and B. I want to check whether the Centroid of Polygon from A intersect a 10 feet buffer of centroid of polygon from B.


I used ItopologicalOperator.Buffer to Create the buffer from B. I believe the centroid of the Polygon from A can be obtained by using the below method

set pFeatClassA = pmap.layer(0) Dim pFeatureA as iFeature Set pFeatureA = pFeatClassA.GetFeature(123) Dim pPolygon as Ipolygon Set pPolygon = pFeatureA.Shape Dim pArea as iArea Set pArea = pPolygon Dim centroidPt as iPoint Set centroidPt = pArea.Centroid


But which method can be used to find whether these geometries intersect since there are no physical features corresponding to the centroid and the buffer polygon? IspatialFilter is the only option that i know of. But it seems it can be used only  from a FeatureClass or Selection set. Can someone help me on this?

Note: I do not want to create additional feature classes for this. It would have been a simple solution then.
Thanks in advance..
0 Kudos
1 Solution

Accepted Solutions
sapnas
by
Occasional Contributor III
you could use IRelationalOperator to determine the spatial relationship.

View solution in original post

0 Kudos
2 Replies
sapnas
by
Occasional Contributor III
you could use IRelationalOperator to determine the spatial relationship.
0 Kudos
VinayanMP
New Contributor
great!!
Thanks for the reply..
0 Kudos