2

I have two shapefiles and I would like to know the distance between each point on File1 and each corresponding point on File2 (one to one relationship).

I have been using the Ruler and manually calculating this, but is there a more efficient way?

I am able to produce one table with the lat/long from Table 1 and the lat/long from Table 2. However, I do not know how to populate a distance column with an equation (and I do not know Python).

  • if you have ArcInfo, you can use the Near tool. Otherwise, some basic geometry with the coordinates works too. – crmackey Nov 14 '14 at 22:49
  • Hi, thank you for suggesting the Near tool. I am familiarizing myself with it right now. However, it does not appear to measure distances between pairs of points (based on a unique #). Rather, what I desire to do is determine the lengths between one point in File1 and one point in File2 (A1 to B1, A2 to B2, A3 to B3). – WolverineTime Nov 17 '14 at 17:07
  • Look into the Point Distance tool (requires Advanced license). This provides distances between all possible pairs of points. – phloem Nov 17 '14 at 19:09
  • Hi, thanks, but I'm really looking for a 1:1 relationship based on a unique ID, so this does not work. – WolverineTime Nov 17 '14 at 19:21
  • While Point distance would give you all possible pairings of points, it's a simple enough matter to filter/definition query/select records in the result only where ID1 = ID2. That would get you the distances only between matched pairs of points. @phloem should probably make an answer out of that. – Chris W Nov 24 '14 at 23:19
2

As commented under the OP, my suggestion is to use the Point Distance geoprocessing tool, if you have Advanced licensing.

  1. Run Point Distance tool to calculate the distance between all possible combinations of points
  2. Start editing
  3. Select by Attributes where ID1 <> ID2
  4. Delete the selected records
0

If you points have unique ID's that you are trying to measure between:

  1. Point to Line tool
  2. Line field being the unique ID of the matching points
  3. Add length field to the lines output for the units you need.
  • 1
    Hmm, maybe I am doing this wrong, but when attempting to use the Points to Line feature, it appears I must connect all the points in File 1 together. Rather, what I want to do is determine the lengths between one point in File1 and one point in File2 (A1 to B1, A2 to B2, A3 to B3). I am looking to measure the distance between each pair of points. Any ideas? – WolverineTime Nov 17 '14 at 16:55
  • @WolverineTime A possible workaround to enable PolyGeo's answer is to add a new field to your two point files and populate it with A for all records in one file and B for all records in the other, then merge/append the two files together. With all points in a single file, this method will work. – Chris W Nov 24 '14 at 23:23
0

Another way is to use the XY to line tool and then midpoint the resulting line.

The way I do it is ...

  1. Ensure your points in file1 and file2 are tagged with a matching identifying attribute for each vertice eg: VertexID
  2. Calculate geometry (or Xtools) to create a latitude and longitude field for both file1 and file2
  3. Join File1 and File2 on VertexID so you now have coordinates for file 1 & 2 in the same table
  4. Export the table
  5. Use the table in the 'XY to line' tool to create a line between the points for each vertex (http://support.esri.com/technical-article/000012092)
  6. Create a midpoint from the line using Xtools (centroid tool, easy) or this slightly clunky ESRI procedure that achieves that same. http://support.esri.com/technical-article/000012326

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.