OK on to my next problem...  Removing features from the selection

Discussion created by hylndr on Jan 25, 2012
Latest reply on Jan 25, 2012 by Neil
Howdy All,
I've progressed down my problems path to my next challenge... I have two feature layers that both have multiple features selected in them... One is street centerlines (polylines) and the other is a polygon layer, some of which intersect/cover the street centerline layer... I need to remove from the polygon selection those polygons that DO intersect/cover the street centerlines. There are multiple polygons in the original selection not all of which intersect the streets, and there are multiple street centerlines in the street centerline original selection. I need a programmatic solution to this, I can manually perform what I need by using the "Select by Location" tool and in there specify "remove from the currently selected features in" selection method... OK That's great, but I need to automate this via code... I think i need to use a Spatial Filter and use the "SelectFeatures" method in the polygon layer's Selection object... I just can't figure out how to setup the spatial filter to do this... My stumbling block is getting the multiple line geometries into the ONE geometry of the Spatial filter... And had to specify to subtract the features from the selection... maybe I'm going down the wrong path here... If so, please enlighten me as to the best path to travel!!! :-)

I'm pretty sure this is an easy one, but I'm just having one of those days where my brain just isn't firing on all cylinders!

Thanks in advance,

Kevin Orcutt
GIS Developer/Consultant
City of Cincinnati - Cincinnati Area GIS (CAGIS)
(513) 850-1335 (cell)