Skip to main content
Solved

Get the direction of a polyline

  • November 16, 2022
  • 5 replies
  • 52 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

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}

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

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

This is a polyline:

_______________________________

What means here forward or backward?


tcrossman
Contributor
Forum|alt.badge.img+1
  • Contributor
  • 35 replies
  • Best Answer
  • November 16, 2022

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
  • 10 replies
  • November 17, 2022

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
  • 10 replies
  • November 17, 2022

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+63
  • Celebrity
  • 1620 replies
  • November 17, 2022