I'm trying to make a service area network analysis containing the time that is needed using a bike starting from one point. The attached map shows this service area when the bicycle speed is 20km/t, and a travel time interval of 5, 10, 15, 20 and 30 minutes.
But I want to include slope as a cost in the analysis, and calculate a speed based on the slope. The speed will then be used to calculate a travel time for each segment.
The slope/speed calculation can be something like this (interpolation between):
downhill steeper than minus 8% = 40 km/t
-4% = 30 km/t
0 % = 20 km/t
4% = 10 km/t
upphill steeper than 8% = no bicycle
My biggest issue is that I don't know how to define the road links' direction.
What I've done so far:
1) Import road network
2) Dissolve road network, and split network into sections of 50m (since I will calculate the average slope by intervall of 50 metres)
3) Extract start and end point of each section (will be used to define altitude data for startpoint and endpoint)
4) Get xy-coordinate for each point
5) Get elevation data for each point from DEM model (metres above sea level)
6) Copy elevation data and xy-coordinate from each point to the 50m lines
I now have a network consisting of road segments of 50 metres with xy-coordinates and altitude data for each start and end point. I now want to calculate the slope based on (elevation end-point minus elevation start-point) divided by segment lenght. This will give me the slope (average), BUT I do not know the direction (upphill/downhill).
I thought about using the coordinates, but the road can curve a lot so based on xy-coordinates I actually do not know if I am travelling from or towards the starting point..
Any idea how to define the direction of the roads away starting from one point?
For example, is there a method to sequentially number nodes/points starting from one point?