-1

I have an attribute table with coordinates of two point, the beginning and the end: (x1, y1)-begin and (x2,y2)-the end.

How can I calculate distance between these coordinates?

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
S.Rai
  • 309
  • 3
  • 14

1 Answers1

1

The attributes of a single feature have two pairs of coordinates in the one record? If so, then just create a field and use field calculator. Using the VBScript parser it's just this:

sqr((x2-x1)^2 + (y2-y1)^2)

This assumes you are working in a projected coordinate system. Won't work in lat/long.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Jersey Andy
  • 733
  • 4
  • 7