Proximity analysis: Nearest point that occurred at a later date

162
3
11-21-2012 08:51 PM
AllisonHoskin-Kain
New Contributor III
Hi,

I have 800 odd instances of pest detections over a period of about 5 years. I want to do a proximity analysis that identifies for every detection (point) the closest subsequent detection. The points are named in chronological order so point number 1 occurred first in May 2007 and point number 800 occurred quite recently.

example of how my data looks....

number                lat        long                    date

2
3
4
.....
....
....
800

What I want to get is something along the lines of

Number                nearest subsequent detection                distance (km)
                         (the nearest detection of a high
                           number or later date than itself)               
1                                        nearest point (2-800)
2                                        nearest point (3-800)
3                                         nearest point (4-800)
4                                         nearest point (5-800)
...
....
...
800

I would really like to know if anyone has done something similar as I have had a look through the forums and only found proximity to any closest point.

Thanks for your time
Regards
Allison
0 Kudos
3 Replies
DarrenWiens2
MVP Honored Contributor
You probably won't find a premade tool for this, but it is possible through a Python script. You'll have to loop through each row with a Search Cursor, then for each current row loop through each row with a higher ID number (with another Search Cursor) and calculate the distance to the current row. Store all those distances and IDs in an array, then record the highest distance and ID in the current row.
0 Kudos
AllisonHoskin-Kain
New Contributor III
Thanks for the information.  I much appreciate it...

However I probably should have stated that I have very very little experience in writing python.  Is there somewhere that I could find this partly done?  or if I was to find someone that has programming experience, is there examples I could give to them that would help them understand what I need written??

Cheers
Allison
0 Kudos
BruceHarold
Esri Regular Contributor
Hi

You might be able to use the core tools XY to Line and Split Line at Point, with the points being made from an event layer in ArcMap from your input table.  The workflow would be:

Add your table in ArcMap, create the XY event layer and export it to a point feature class.
Make a polyline feature class with XY to Line.
Chop the lines up with Split Line at Point.

Regards
0 Kudos