Generate Near Table - How to include original point in results

718
2
05-08-2011 02:17 PM
KeriNiven
New Contributor
Hi - I am using the Generate Near Table tool to find the nearest 5 points to a selected point. This works just fine but I want to include the original Point in the output - ie so for each input ID there will be 6 records returned - itself and the 5 nearest.
Does anyone know how to do this?
Many thanks in advance..
Keri
0 Kudos
2 Replies
MidoGeo
New Contributor
Hi,
I'm using Generate Near Table tool to measure near distance from a point to line/polygon in that case i wanna ask if these lines will be represented by nodes or arcs?
Thanks
Mido
0 Kudos
KeriNiven
New Contributor
Hi - I am using the Generate Near Table tool to find the nearest 5 points to a selected point. This works just fine but I want to include the original Point in the output - ie so for each input ID there will be 6 records returned - itself and the 5 nearest.
Does anyone know how to do this?
Many thanks in advance..
Keri


Hi - Just in case anyone else is interested I found a workaround to this problem. I wrote a quick python script that selects and offsets all the points in my layer by 0.01cm and saves them to a temporary layer. I then do the Generate Near Table task using the original layer and new offset layer as inputs and tell it to return 6 features. The closest feature is my original feature and the other 5 are its nearest neighbours. Not very elegant but it does the trick.
0 Kudos