Skip to main content

Hi there,

I'm using the Coordinate Extractor tool to extract the elevation values at the beginning and end of a line so that I can calculate the slope of the line. To identify the starting coordinate of the line, I'm using coordinate index == 0 and to find the ending coordinate on the line, coordinate index == -1. However, I'm confused as to whether the first coordinate on the line refers to the left- or right-most coordinate on the line.

 

 

Since I'm looking at the slope of lines, it's important to know whether the elevation associated with the first coordinate references the right or left hand vertex of the line because it would indicate the direction of the slope; for example, if the first coordinate is defined as the left-most vertex of a line and is higher than the right-most vertex of the line, I would be able to say that the slope of the line moves downward left to right.

For context, I'm creating a map where I'm trying to identify the slope along various segments of a pedestrian network, and I'd like to identify whether various segments of the route are more than/less than a specific slope threshold in both the upward and downward direction. I'd like to indicate with arrows on the map which direction the slope refers to.

I'm attaching a copy of my workspace below, broken into two segments for readability purposes.

You are right about index 0 indicating the first vertex of the line, but as you've seen it also depends of the direction of the line, or the order in which the vertices are listed.

You could use the AzimuthCalculator from the FME Hub to find the general direction of your line, just be aware that that if you have complex lines (e.g. a U-shaped line) it might not necessarily be what you expect.


Reply