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?
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.