# Thread: How to calculate distance between points from different shape files?

1. ## How to calculate distance between points from different shape files?

Hi,

I am trying to calculate the distance between various points of 2 different shape files. One is a point shape file of road intersections while the other is of bus stops. I want to calculate the distance from the bus stops to the intersection; say we have intersection A and intersection B and there are 10 bus stops between the two intersections, I want to calculate the distance of each stop to intersection B.

I tried joining the two shape files and using neighbor count but that didn’t work. I think I may be approaching the problem incorrectly. Any advice?

Thanks,
Zoha
(Please note I’m a student and don’t have much experience with GIS)

2. ## Re: How to calculate distance between points from different shape files?

Zoha,
I trust you are enjoying your GIS classes. As both of your shagpefiles are points (intersections and bus stops) I'm not certian what the best solution is. Hopefully others can add their ideas to mine.

To partially answer your question, a Spatial Join (use ArcToolbox's search function to find it) will tell you which features are nearest to which features, i.e. which bus stop is nearest/closest to which intersection; I believe Spatial Join creates and populates a new field with the distance between features.

Check out ESRI's Arc10 Help:
http://help.arcgis.com/en/arcgisdesk...0033000000.htm

If "nearest" is not what you are wanting, I can't think of another tool off the top of my head, perhaps somone else can??

{EDIT: You should check out NetWork Analyst : http://help.arcgis.com/en/arcgisdesk...0001000000.htm }

You may try Geocoding:
If you had location addresses for the bus stops and a street center line file with address ranges (typically you can get this from your County GIS or what ever organization is responsible for local emergency services routing) Then Geocoding would likely be your best method. Geocoding is what google maps uses to give you directions, you put in address A and address B and Google draws a line between them, you can do the exact same thing with ArcGIS.

If your streets center line layer has address ranges on it then Geocoding is pretty easy to figure out. If you don't have address ranges then you'll have to get creative.

Check out ESRI's Arc10 Help section on Geocoding:
http://help.arcgis.com/en/arcgisdesk...0001000000.htm

Also here is a great tutorial on Geocoding:
http://proteus.brown.edu/EarthlabGIS...tachid=5803632

-Joshua