Skip to main content
Solved

Finding straight-ish polylines

  • June 10, 2020
  • 2 replies
  • 98 views

Forum|alt.badge.img+1

Hello all,

 

I have a polyline layer within which each feature is made up of just two segments, and of course just three node points.

I'm looking for a method to discover all polyline features that do not deviate beyond a set angle (let's say 20 degrees for arguments sake).

 

In the image below, polyline A would pass this test, but the other two examples would fail.

 

Can anyone provide some guidance?

 

Thanks in advance,

RB

 

Best answer by david_r

Have you looked at the AngularityCalculator?

The closer the output is to 0, the straighter the line is.

If you need the exact angle at the middle vertex, you can use the VertexAngleCalculator from the FME Hub, followed by a MeasureExtractor:

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.

2 replies

david_r
Celebrity
  • Best Answer
  • June 10, 2020

Have you looked at the AngularityCalculator?

The closer the output is to 0, the straighter the line is.

If you need the exact angle at the middle vertex, you can use the VertexAngleCalculator from the FME Hub, followed by a MeasureExtractor:


Forum|alt.badge.img+1
  • Author
  • June 10, 2020

Have you looked at the AngularityCalculator?

The closer the output is to 0, the straighter the line is.

If you need the exact angle at the middle vertex, you can use the VertexAngleCalculator from the FME Hub, followed by a MeasureExtractor:

Thanks David, the VertexAngleCalculater > MeasureExtractor solution is exactly what i'm looking for