[GIS] Finding distance between consecutive points using ArcGIS Desktop

arcgis-10.0arcgis-desktopdistancefield-calculator

I am wondering how I can get the distance between consecutive GPS locations in ArcMap 10 (i.e. the distance between consecutive GPS locations sent in during a wildlife telemetry study).

Best Answer

Assuming that your points are in order, and that this works at 10.0 (I'm using 10.2):

Field Calculator Expression:

dist( !Shape! )

Field Calculator Code Block:

count = 0
def dist(shape):
    global prev
    global count
    point = arcpy.PointGeometry(shape.getPart(0))
    if count > 0:
        distance = point.distanceTo(prev)
    else:
        distance = 0
    prev = point
    count = count+1
    return distance

Parser: Python

enter image description here

Related Question