AnsweredAssumed Answered

Deleting Features From One Layer Based On Geometry Of Another Layer

Question asked by andrew.southern@Franklintn.gov_franklin on Dec 27, 2018
Latest reply on Jan 2, 2019 by rzufelt

I have two layers and would like to script either a delete or erase to remove features from Layer #1 based on the geometry or an attribute from Layer #2.  Features in both layers share the same location and common id field (features created in Layer #2 are created using a custom URL scheme for Survey123 and pulls the same location and id attribute from Layer #1.)  Can someone please point me in the right direction.  In my mind there should be a way for me to run something like the erase geoprocessing tool and erase all features from Layer #1 that intersect Layer #2.  Or delete features using a comma separated list based off the common id field although I'm not sure that this module will run on a list based on anything other than ObjectID, though I could be wrong.


Any help is appreciated.  I've been attempting to figure this out for days without much luck and have exhausted the reference looking for answers (I wish there were more example snippets in the reference for Python novices like myself.)


Thank you.