Need "Drive time" from a Simple Roads File -> ND

03-10-2014 03:27 PM
New Contributor
So I am trying to calculate proper drive distance and drive time for a GIS project. It doesn't have to perfect, just to show that I can.
So, I'm searching for a road shapefile, but most are only highways, and finally I find one. It has road classifications but no length or speed limit or drive time per line.

So thinking I'm being clever, I export the file to a geodatabase to get line lengths, then convert those to miles in their own attribute column. Then I create Speed limits for each classification of road, and assign them in the attributes. I divide the mile by the speed limits, and create a new column called "drive_time" which gives me the average # of hours it would take to drive down that section of road. Save everything in my map... (my thinking was I'd be able to select that column as a "Cost", then set the value to "hours, when I built the Network Dataset. Apparently not.)

Then I go to create a network dataset from the polyline file, and when I get to the attributes section, it only lets me have distance. Other files that have been given to me automatically offer choices for distance and time, and I have to wonder why mine does not. (Example: Both "Length" and "Minutes" are offered up as costs by default.)

Do I need to change how I label my attributes? Or is there something else i am missing?
Tags (2)
0 Kudos
3 Replies
New Contributor III
You will have to add Time as an attribute when you create the network dataset.  When you get to the attributes screen, select "Add;" fill in the name (Time, Hours, whatever you want to call it), and select the units from the drop-down.  Leave Usage Type as "Cost" and Data Type as "Double" and click "OK."  Highlight Time (or whatever you named it), click on "Evaluators;" Type is "Field" and Value is the field containing the time data.

0 Kudos
New Contributor
Ah, that seemed to do it!
Never assigned one like that before, so all I got from my attempts was the "!" error.

I assume it is working as when I change the impedance from "Distance" to "Time" it gives me different routes.

Thanks a bunch!
0 Kudos
Esri Regular Contributor
If your points are in the USA, you can use the free streetmap network dataset that comes on the data and maps dvd. it is ready to use network and have time and distance attributes.

You can also the Find Route tool (next the binoculars) on the standard toolbar in ArcMap. It will use the online service to return you back the routes.

Jay Sandhu
0 Kudos