4

I have 2 sets of point shapefiles in ArcGIS Desktop (group A and B), each set has around 1000 entries that contain lat/long.

What I want to do is compare Group A against Group B and figure out for every point in Group A what point in Group B is the closest and what that distance is.

What would be the easiest way to do this in ArcGIS Desktop?

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Furlong
  • 2,115
  • 6
  • 29
  • 33

3 Answers3

3

You could run a Spatial Join between the two layers. In ArcMap TOC, right click the layer and select Joins and Relates>Join. On the top drop down select "Join data from another layer based on spatial location." Check the radio button that says, "Each point will be given all the attribute...etc". This will give you a distance value.

You can also use the Near tool.

artwork21
  • 35,114
  • 8
  • 66
  • 134
  • This seems to work but it is giving weird numbers, I am guessing they are decimal degrees. For example one distance is .185239. How can I change the unit of measurement to miles? – Furlong Jun 06 '11 at 17:04
  • I just read that you can convert decimal degrees to miles by taking 69.11 times the cosine of the decimal degree. I did a field calculation on the distance field using 69.11*Cos ( [Distance] ). Would this be correct? – Furlong Jun 06 '11 at 17:19
  • @Furlong, either update the data frame>Properties>General tab and set Display to something like feet or you may want to define or re-project your two layers to a projected coordinate system before using the spatial join option. I believe when measuring between points your data should be in a projected coordinate system, not a geographic one. – artwork21 Jun 06 '11 at 17:20
  • @Furlong If Spatial Joins operate on the projection of the Data Frame, you can probably get away with just changing the projection of that. – Nathanus Jun 06 '11 at 17:27
  • @Nathanus thank you for your advice, what should I change the projection to? My data covers the continental US, including Alaska and Hawaii. – Furlong Jun 06 '11 at 17:50
  • @Furlong Keep in mind my suggestion is pure speculation. You'd have to recompute the Spatial Join after reprojecting the data frame to test my theory. As for picking a projection, that's another can of beans entirely. I'm not solid enough on them to offer anything more enlightening than a guess that a world equidistant projection is what you want. – Nathanus Jun 06 '11 at 18:03
  • @Nathanus For problems with the equidistant projection, see http://gis.stackexchange.com/questions/1351/how-does-arcgis-compute-the-distance-between-two-points-with-a-non-equidistant-pr/1356#1356 . If ArcGIS is not doing spherical/ellipsoidal calculations of distance, then it's not going to do a good job with points spread over the greater part of a hemisphere, no matter what projection you use. (The current documentation of spatial joins is silent concerning how "distance" is calculated.) – whuber Jun 06 '11 at 18:33
1

If you have ArcInfo make use of the Near tool to generate exactly what you're looking for. You can set it to only find the closest feature in Group B from Group A, and it will create a table containing the distances.

Nathanus
  • 4,318
  • 1
  • 32
  • 47
0

For this I would project first into a Projected Coordinate System that uses units of meters.

Then if you have an ArcInfo/Advanced level license use the Point Distance tool:

Determines the distances from input point features to all points in the near features within a specified search radius.

Alternatively, look at Performing Point Distance analysis using Basic level license of ArcGIS for Desktop?

PolyGeo
  • 65,136
  • 29
  • 109
  • 338