Skip to main content
Solved

Get the direction of a polyline

  • November 16, 2022
  • 5 replies
  • 30 views

nelson
Participant
Forum|alt.badge.img

Hello,

 

Is there a transfomer to know the direction a polyline was drawn (forward or backward) ?

 

Thank you

Best answer by tcrossman

tomfriedl wrote:

This is a polyline:

_______________________________

What means here forward or backward?

Maybe first vertex = start, last vertex = end, and direction = start to end?

Use CoordinateExtractor to get _indices{} list attribute added to feature and then access the first and last coordinates as _incices{0} and _indices{-1}

View original
Did this help you find an answer to your question?

5 replies

tomfriedl
Contributor
Forum|alt.badge.img+13
  • Contributor
  • November 16, 2022

This is a polyline:

_______________________________

What means here forward or backward?


tcrossman
Contributor
Forum|alt.badge.img+1
  • Contributor
  • Best Answer
  • November 16, 2022
tomfriedl wrote:

This is a polyline:

_______________________________

What means here forward or backward?

Maybe first vertex = start, last vertex = end, and direction = start to end?

Use CoordinateExtractor to get _indices{} list attribute added to feature and then access the first and last coordinates as _incices{0} and _indices{-1}


nelson
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • November 17, 2022
tomfriedl wrote:

This is a polyline:

_______________________________

What means here forward or backward?

I'm working on wast water, a web application needs to know the network flow orientation in order to define symboly for the layer.


nelson
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • November 17, 2022
tcrossman wrote:

Maybe first vertex = start, last vertex = end, and direction = start to end?

Use CoordinateExtractor to get _indices{} list attribute added to feature and then access the first and last coordinates as _incices{0} and _indices{-1}

Thank you I'll see


hkingsbury
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • November 17, 2022

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