I am trying to compute the distance and time taken for each origin (40,000+ house points) to the nearest train station (there are 111 of them). How can I do that in ArcGIS?

So example Houses H1 to H10 nearest station is S1, and H11 to H30 is S2, so on...

Update: The distance would be network distance not straight line.

  • Are you looking for the shortest straight line path, or along a road network? Jun 22, 2017 at 17:46
  • Hi Matthew, I am looking for road network distance.
    – Bernie
    Jun 23, 2017 at 12:44

1 Answer 1


You are looking for the OD cost matrix analysis in Network Analyst extension. Load all of your house points as origins and all your train stations as destinations. Then specify that you want to get the route only to one destination (which would be the closest) - the parameter is called Destinations To Find.

This will generate a number of routes (remember that you won't get actual routes shapes created as this is a very expensive operation), but you are not interested in them, so choose for Output shape type value None.

  • Where do I specify the route to only one destination? Also would using Closest Facility be any different?
    – Bernie
    Jun 26, 2017 at 15:28
  • You do it on the Analysis Settings tab, desktop.arcgis.com/en/arcmap/latest/extensions/network-analyst/…, read through the Help page to get started. Closest Facility (CF) would also do the trick, but you have so many routes to build - the CF would be so much slower than OD because it is not optimized for solving so many routes at the same time. Jun 26, 2017 at 16:12

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.