Select to view content in your preferred language

Calculating distances in 3-dimensions

420
1
10-02-2010 03:54 PM
WinnKetchum
Deactivated User
Does anyone know the python function to calculate distances between points using the Euclidean calculation in 3-dimensional space?  Is there a wrapper or module with this function out there?

Thanks,

Winn
0 Kudos
1 Reply
KimOllivier
Honored Contributor
Use the numpy module , already included in ArcGIS 10

import numpy
a = numpy.array((xa,ya,za))
b = numpy.array((xb,yb,zb))
diagDist = numpy.linalg.norm(a-b)
0 Kudos