Point layer MINUS another point layer

291
1
08-25-2022 11:52 AM
GISLearner
New Contributor III

I have 2 point layers; point layer #2 is a subset of point layer #1

I want to write ArcPy code that gives me all the points in point layer #1 that are NOT in point layer #2

Basically, point layer #1 MINUS point layer #2

What tool or set of tools can help me achieve that?

Thank you

0 Kudos
1 Reply
Clubdebambos
Occasional Contributor III

Hi @GISLearner,

Erase is the tool you are looking for. See docs here.

Any point geometries in Point Layer #1 will be removed if they are identical (or within a tolerance) of Point Layer #2.

Caveat; this tool is only available with an Advanced License.

Alternatively, without an Advanced License you can use the Select Layer By Location tool and select points that are identical, invert the selection, and use the Copy tool to copy the selected to a new feature class. 

 

EDIT: didnt realise there was a Pairwise Erase tool available on Basic License that might suffice.

~ learn.finaldraftmapping.com
0 Kudos