Select to view content in your preferred language

GP Tool to Remove Polygons that do not touch

559
4
02-16-2024 07:03 AM
chadhickman
Occasional Contributor III

The yellow lines present where the purple and blue touch each other. I want to remove all the polygons where the do NOT touch. Does anyone know which GP tool(s) I would use to do this?

 

Thank you!

0 Kudos
4 Replies
DanPatterson
MVP Esteemed Contributor

If those polygons came from a raster conversion, it might be easier to Expand the 'blue' class by one cell, followed by a shrink of one cell, it should leave 'nodata' in the intervening space


... sort of retired...
0 Kudos
chadhickman
Occasional Contributor III

@DanPatterson thank you for the reply. The polygons did come from a raster conversion, they are two different land cover types, specifically the edges of each land cover. I am only interested in the areas where those to edges converge. The remaining polygons (edges) I want to delete. Do you know of a simple way to do this?

0 Kudos
DanPatterson
MVP Esteemed Contributor

I am just quickly thinking along the raster lines now.

A 'focalstatistics' with the 'variety' option.  

If you only have 2 classes, then edges that meet should have a variety of 2.  you could remove cells that have single class, regardless what is.  So if you ran the focal variety and just did a query on that for cells with a variety > 1, you should have your edges.  (but I have only had one coffee so far)


... sort of retired...
DavidPike
MVP Frequent Contributor

Select by Location - Intersects, then invert selection and delete possibly.  It depends how your polygons are broken up and if you mean you want to keep the entire polygon if it touches the other layer at any point.