Time Calculations

2041
7
11-11-2013 10:35 AM
Highlighted
New Contributor
When trying to create my time calculations from speed limits (mph) i have it fails. I do not have a distance field and network analyst is creating my length attribute on its on using my [Shape] field. So i thought that for my time attribute i could possibly do ([shape]/[speed])*60 for my minutes. Unfortunately this does not work, I had thought about projecting my data into a different format, so I could create a miles length field, but will that mess with my data in the future or is that okay for something like this?

Thanks
Tags (2)
Reply
0 Kudos
7 Replies
Highlighted
New Contributor
Also, when I have my hierarchy enabled, I get an error saying no route to specified location. It works fine without the hierarchy though, I thought the hierarchy would allow you to travel any roads, but just gives preference to higher order roads. If that is the case how can there be no route?
Reply
0 Kudos
Highlighted
New Contributor
To determine the values for your distance field, create a new field in the attribute table of your streets feature with a field type of double. Right click on the newly created field heading an select "Calculate Geometry". For the "Units", select "Miles" from the dropdown menu. This will calculate the disatance in miles for every street segment within your street feature. You then can do your time calculation based off of this field. You can also use this field for the distance attribute when you create you network.
Reply
0 Kudos
Highlighted
New Contributor
Yes, I have done this. My data is already in WGS 1984 and to do that I project it into UTM, but for some reason my miles calculations end up being not right (ridiculously small measurements) and ends up ruining the calculations. Is there anyway to use the length field that NA creates for you?
Reply
0 Kudos
Highlighted
New Contributor
I would expect to see small numbers in the distance calculations. Looking at the street data that I used to create my network, 99.8% of the distances are less than a mile. I would try a simple route calculation and see if the results make sense. My data is also projected in UTM.
Reply
0 Kudos
Highlighted
New Contributor
Yes, and when I try and run say a service area with time as 5 minutes. It highlights my entire dataset. I just checked the summary statistics of my distance field I created from miles and it says the sum is around 1 mile for multiple counties worth of streets. Not sure what the problem may be.
Reply
0 Kudos
Highlighted
MVP Esteemed Contributor
Yes, and when I try and run say a service area with time as 5 minutes. It highlights my entire dataset. I just checked the summary statistics of my distance field I created from miles and it says the sum is around 1 mile for multiple counties worth of streets. Not sure what the problem may be.


Any chance you can post a partial feature class set? The only attributes needed are the shape length in your map units and the speed limit.  It seems like your work flow may be out of whack somewhere on making your calculations.  I'd be happy to lend another set of eyes.

In your original post you gave the equation of [Shape/speed] * 60; I suspect that you meant [miles/speed in mph] * 60 to calculate the time it takes to traverse a given segment.
Reply
0 Kudos
Highlighted
Esri Regular Contributor
If your data is unprojected, that is, GCS, then use the GP tool "Calculate Field" to compute the geodesic distance (just as Network Analyst does). You can add a new length field and then use the python expression like !shape.geodesicLength@miles!

See the help here for more info:
http://resources.arcgis.com/en/help/main/10.2/index.html#//00170000004m000000

Jay Sandhu
Reply
0 Kudos