Euclidean Dstance

799
3
10-01-2013 06:06 AM
Juliados_Santos
New Contributor
Dear All,
Can you help me to calculate the euclidean distance.
Whats the file we use as input.
thanks in advance
0 Kudos
3 Replies
DaleHoneycutt
Occasional Contributor III
You need a line feature class in a geographic (unprojected) coordinate system.

Add a Double field to this feature class.  Name it something like GeoDistance.

Use the Calculate Field tool with the following settings:
Input table:  the line feature class
Field: GeoDistance (or whatever you named the field you added)
Expression:
!Shape.length@meters!
(you can use other units besides meters)
Expression Type: PYTHON_9.3
0 Kudos
DaleHoneycutt
Occasional Contributor III
My mistake -- I misread your original post.  I thought you wanted to calculate Geodesic distance, not euclidean distance.

So, back to your original question about calculating Euclidean distance.  You say you want to "calculate the euclidean distance" -- calculate the euclidean distance between what?  A collection of points?  The distance between two sets of features?  The length of a line feature?  The perimeter length of a polygon?

If your data is in a geodatabase (as opposed to a shapefile), lines and polygons have their length/perimeter calculated and stored in the attribute table.  If you have shapefiles, copy them into a geodatabase, such as a file geodatabase, and length/perimeter will automatically be calculated.

If you want to calculate distance between features, have a look at the Near tool
0 Kudos
JoeBorgione
MVP Emeritus
Dear All,
Can you help me to calculate the euclidean distance.
Whats the file we use as input.
thanks in advance


There was this guy... Pythagoras... He was always drawing lines and triangles and messing around with mathematical formulas on a piece of slate with charcoal.  I don't think he has a YouTube channel, but he may have a FaceBook page...
That should just about do it....
0 Kudos