Skip to main content
Question

Identifying the direction of slope (ascending versus descending) on polyline network


Forum|alt.badge.img

Hi there,

I'm working on a project where I need to identify the running slope of various segments of a pedestrian network. I've calculated the slope along the different route segments, but would like to know whether the segments correspond to an upward or downward slope.

Specifically, I'm hoping to create four fields to track whether a route segment is above or below a specific slope value and whether that slope corresponds to an ascending or descending slope. The fields would include:

 

 

High upward slope: slope > 8.33%

 

Low upward slope: slope >= 0% & < 8.33%

 

High downward slope: slope < -8.33%

 

Low downward slope: slope < 0% & > -8.33%

However, I'm stuck on how to identify whether the slope of the route segments correspond to an upward or downward direction. Does anyone have any ideas how to approach this problem?

I uploaded my current workspace in three consecutive segments so that all my steps are visible.The end product for this project would look something like the image attached below.

7 replies

erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • February 5, 2018

Calculating the slope percentage you will need the Z at start and end (CoordinateExtractor with index 0 and -1).

Then calculating the slope % (ExpressionEvaluator) using

100.0*(@Value(Z_end) - @Value(Z_start))/@Length()


Forum|alt.badge.img
erik_jan wrote:

Calculating the slope percentage you will need the Z at start and end (CoordinateExtractor with index 0 and -1).

Then calculating the slope % (ExpressionEvaluator) using

100.0*(@Value(Z_end) - @Value(Z_start))/@Length()

Hi Erik,

 

 

Thanks for your response. I actually followed those steps above in my current workflow. I'm looking to identify the direction of the slope (i.e. whether it's upward or downward). Do you have any sense of how to derive that information given the current workflow?

 

 


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • February 5, 2018

Since you don't have an absolute value on your slope, if the slope is positive, you are going uphill, and if the slope is negative you are going downhill.


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • February 5, 2018
jennamkdavis wrote:
Hi Erik,

 

 

Thanks for your response. I actually followed those steps above in my current workflow. I'm looking to identify the direction of the slope (i.e. whether it's upward or downward). Do you have any sense of how to derive that information given the current workflow?

 

 

If Z_start > Z_end it is down hill, else it is up hill.

 

 


Forum|alt.badge.img
jdh wrote:

Since you don't have an absolute value on your slope, if the slope is positive, you are going uphill, and if the slope is negative you are going downhill.

Thanks for your response. I think I understand that part. I'm more-so interested in knowing what direction the upwards or downwards slope corresponds to. For example, in the picture above, where you see the dark orange line (corresponding to a high descending slope), how is it possible to know whether the descending slope is going from right to left or left to right (beyond manually examining the start and end elevation values of each line segment)?

 

I think I've seen you answer similar questions @takashi, so your input would be very much appreciated here!

 


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • February 5, 2018
jennamkdavis wrote:
Hi Erik,

 

 

Thanks for your response. I actually followed those steps above in my current workflow. I'm looking to identify the direction of the slope (i.e. whether it's upward or downward). Do you have any sense of how to derive that information given the current workflow?

 

 

I don't know what visualization tool you use, but does it have a linestyle option with an arrow that could indicate the direction?

 

 


jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • February 5, 2018
jennamkdavis wrote:
Thanks for your response. I think I understand that part. I'm more-so interested in knowing what direction the upwards or downwards slope corresponds to. For example, in the picture above, where you see the dark orange line (corresponding to a high descending slope), how is it possible to know whether the descending slope is going from right to left or left to right (beyond manually examining the start and end elevation values of each line segment)?

 

I think I've seen you answer similar questions @takashi, so your input would be very much appreciated here!

 

As erik_jan suggests, that's something in your visualisation tool, put an arrow on your line style.

 

 

I suppose you can generate a raster in FME with the arrow indicators using the MapnikRasterizer.

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings