Hi! I'm using arcGIS pro and trying to run several different near functions on the same layer. When I do the first one, it works fine but when I go to do the next near function, the original one disappears!
I have tried using multiple near functions by making a copy of the layer and doing it separately but even then, both copies of the layer end up with the most recent near function and the original gets deleted.
Any help would be amazing
Can you elaborate on your process/intended results and how you make a copy of the layer a bit more?
I would say export the data as a new feature class after each near analysis, however you have done that and say another near analysis overwrites it, which I wouldn't expect at all - the copied layer is not referenced in the tool parameters at all?
Ensure you run the processes completely separately then do a series of table joins at the end. I'd also advise generating a new ID field to ensure you can correctly join back the features at the end, as sometimes OBJECTIDs can get regenerated.
Hi David, thanks for your help! I exported the data to make a new layer (using 'make layer from selected features'). But when I delete the original near function on my new layer, it deletes both! Any change I make happens on both - I even uploaded the raw data again to make a new layer and it still changes that if I edit the o.
Why don't you do this first
Generate Near Table (Analysis)—ArcGIS Pro | Documentation
Hi Dan, using the near table helped but I can't join the near tables to the original data because the id is different in the near table - do you know if there's a way to use the original id or transfer another identification field to the near table when running the near function so I can join them?
There is ObjectID, In_fld and Near_fld. The first is just that objectid for the near table. The second is the original ID fld from the table in question. The third is the ID that is closest to the one in In_fld.
Which field were you trying to join back to the original table? ( it should be the In_fld)
Thanks, I'll give that a go!
You need to change the name of the default output field under Field Names. By default they are always NEAR_FID and NEAR_DIST. So when you do a second with the same name, it overwrites the first.