0

I'm really new to ArcGIS and have been trying to search for whether this is possible but don't know the correct terminology to look it up.

I have two layers on my map, one of lines and one of points. Both layers have a field called 'Route ID'. The routes taken are on the lines layer, with routes happening on many different days and sometimes going in the same places but sometimes in different places, so there are lots of overlaps from different days/times of routes on the map, but each line has its own corresponding 'Route ID'. The points layer is of observations made on a route, with sometimes multiple points recorded on a single route, and point has the corresponding 'Route ID' assigned.

I have edited my points layer so that only one category of observations is now present. However, this means I now have a few routes (too many to visually identify) that contain none of the category of observation I'm interested in. I want to remove these routes, so that my lines layer contains only route lines for routes that have a 'Patrol ID' that matches the 'Patrol ID's on the points layer.

The resulting lines layer would contain any line that had a matching 'Patrol ID' to a 'Patrol ID' found in the points layer. So basically what I'm asking is, is there a way in ArcMap to remove data from an attribute table in layer 1 where layer 1's 'Field Name' doesn't match any of the rows in layer 2's 'Field Name'?

0

1 Answer 1

2

I have ArcGIS Pro installed, not ArcMap so somethings may be labeled slightly differently but it should be close enough to get what you need done.

You can achieve this in a couple of steps:

  1. Use the summary statistics table to create a new table with a unique list of Patrol IDs enter image description here
  2. Add a join from your line feature class to the results from table 1. Make sure you untick the 'keep all features' option. enter image description here
  3. Select all records
  4. Remove the join (the selection should remain)
  5. Switch the selection so all non-selected records are now selected. These are the records that didn't match your points feature class.
  6. Delete the selected features.
4
  • Is summary statistics really necessary? Surely one could perform a join of the routes to points using PATROL_ID, there may be more than one point for any given route but that doesn't matter, the join will be to the first point with a matching attribute. Instead of switching off 'keep all target.. ' the user can select where PATROL_ID = Join_table.PATROL_ID (use the real field name) then switch selection to get the lines that don't match at least one observation. Note that at this point even though the attribute table shows null in the join field you can't select Join_table.PATROL_ID is null. Commented Aug 26, 2020 at 6:01
  • Thank you Anna, that did exactly what I needed it to!
    – Eal20
    Commented Aug 26, 2020 at 10:04
  • @MichaelStimson in my past experience joins that result in the duplication of object ids in the base table are un-reliable. Commented Aug 29, 2020 at 23:06
  • Absolutely Anna,the previous comment does not rely on OID/FID values but the PATROL_ID which is identified by the OP as the common field. However the step where you are performing a statistical sum of the OBJECTID is fairly safe, I generally use statistical count of OID/FID values as the only property of a row number that is guaranteed is that it will be unique. Your method is sound, I've given you an upvote. I am commenting that there are redundant steps which are points where the novice might introduce errors but is also an introduction to one of the more powerful tools ArcGIS has.. Commented Aug 31, 2020 at 4:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.