Solved

Get the direction of a polyline

  • 16 November 2022
  • 5 replies
  • 1 view

Hello,

 

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

 

Thank you

icon

Best answer by tcrossman 16 November 2022, 18:31

View original

5 replies

Userlevel 1
Badge +12

This is a polyline:

_______________________________

What means here forward or backward?

Badge +1

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 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.

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

Userlevel 5
Badge +29

Have a look at the OrientationExtractor - http://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Transformers/orientationextractor.htm

Reply