Sequential point feature numbering based on closest point (Example: utility poles)

After delivering a postcard to 40 Main Street, the mail carrier can count on the next home on the same side of the road either being 38 or 42 Main Street. This consistency makes navigating our streets easier and more efficient for all. Unfortunately, This constancy does not always exist in all parts of our shared infrastructure. For example, poles that may run along the same main street may have non-sequential pole-ids—or you may not be able to access them.

To solve this program I wrote a small script to programmatically add sequential ids based on the next closest feature. The process is not complex and can be broken down into four steps:

0. Identify first point and add the starting ID. The first point could be identified in the dataset, or the program would default to the southwestern most point. 
1. Search for the next closest point.
2. Apply the next ID in the series.
3. Repeat steps 1-2 until all points have an ID. 
An visualization of the program ‘working’, adding pole numbers sequentially.
The final product after all poles are numbered.

The script, written in Python, is not on GitHub but send me an email if you want a copy of the file.