Quantcast
Channel: Forums - ArcGIS for Desktop - General
Viewing all articles
Browse latest Browse all 2328

Comparing a point layer and a polygon layer with a spatial query?

$
0
0
Hi, and thanks for looking at my post. I am working more with spatial queries and what I want to do is to take a point layer and do a spatial query against it with a polygon layer. Address point to building structue polygons. I am wanting to find where the Parcel numbers match, and then if the Type fields do not match on the matching point/polygon.

I want to compare all the points, against all the structure polygons and get a selection set of those that do
match on the Type field.

The following code returns all of the address points.

I am not sure if I have it correct, or if this is the right approach to what I want to do.


Dim pFeatureSelection As ESRI.ArcGIS.Carto.IFeatureSelection = AddressLayer
pStructureLayer.FeatureClass = pWS.OpenFeatureClass("GIS.STRUCTURES")
Dim pStructureSpatialQ As ISpatialFilter = New SpatialFilter
pStructureSpatialQ.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects
pStructureSpatialQ.GeometryField = pStructureLayer.FeatureClass.ShapeFieldName
pStructureSpatialQ.WhereClause = "PIN LIKE PIN And TYPE NOT LIKE TYPE2"
pStructureSpatialQ.SearchOrder = esriSearchOrder.esriSearchOrderSpatial

pFeatureSelection.SelectFeatures(pStructureSpatialQ, ESRI.ArcGIS.Carto.esriSelectionResultEnum.esriSelectionResultNew, False)


Thank you for your time. Dale,

Viewing all articles
Browse latest Browse all 2328

Trending Articles