finding route distances in batch

5333
7
02-23-2011 07:23 AM
BarryDurand
New Contributor
After over a week of fighting with it, I have figured out how to find the "as the crow flies" distance between two addresses.  

Here is the simple python window code:
import arcpy
arcpy.env.workspace = "C:\Documents and Settings\bpdurand\My Documents\ArcGIS\Default.gdb"
arcpy.PointDistance_analysis("address","hospital","howfar")

Now what I need to do, is something similar but get route distance (via roads) and if possible route time.   This needs to be done in a many-to-one address relationship.   For example, I need to find out how far driving distance it is from multiple specific addresses (which will be geocoded) to one specific address.  More specific example, I need to know how far it will be for specific people to drive to a hospital or something similar.  FYI, can't really use nearest facility because the destination address will be specified.

I have been looking for something similar to PointDistance_analysis but I can not find anything.  Is what I am trying to do even possible?  Is there a function similar to PointDistance_analysis or will it be much more complicated, as it looks like it may.  If there is a function what is it?  If it will be more complicated, a link to an example or something similar would be appreciated.

Thank you,

Barry
0 Kudos
7 Replies
MartinHermann
New Contributor
0 Kudos
BarryDurand
New Contributor
Thanks but not really.  This is a totally different kind of "route" (car route/driving distance) not IP routing.
0 Kudos
MartinHermann
New Contributor
I'm sorry...I was just reading the headline and flying with my eyes over the text. 😉 Next time I'll read more carefully!
0 Kudos
RolandShield
New Contributor II
Did you ever get an answer ? And I ask becauause I need to do precisely what you are doing. Is the "Route Tool" the way to go ? Can it even be adjusted with a Python script for such ?
0 Kudos
Jim_Gay
New Contributor III

I am looking for the exact same solution.  Did anyone find out how to do this?

I'm going to explore using a model and toolboxes but I'm not at all sure how to go about this.  Any help would be great.

0 Kudos
RichardFairhurst
MVP Honored Contributor

This is a Network Analyst problem if you are using a road network.  That requires a separate extension license to use it.  This post relates to the problem and how best to set it up, since it matters what is defined as an incident and what is defined as an origin.

0 Kudos
m_neer
by
Occasional Contributor

Richard is correct, I believe you may want to look into the cost matrix of a network.

0 Kudos