Skip to main content
Question

Line towards or away from point

  • June 19, 2020
  • 2 replies
  • 14 views

This seems really simple but I cannot figure it out.

 

I have a linear feature connected to a point with a triangle on the line which shows the direction. How can I determine if the line is headed away from or towards the point? I need to know if the triangle follows the line to the point, I have other ones I need to check that will not be a straight line to the point.

Thank you in advance!

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

jovitaatsafe
Safer
Forum|alt.badge.img+11

Hi @james_c,

I'm not sure if I understand your question correctly, are you looking to find the direction of the line between the point and the triangle? Or to check that the triangle or arrow is pointed in the right direction?

It may also be helpful to share a sample of your data and what you are looking to do with it. Thanks!

- Jovita


erik_jan
Contributor
Forum|alt.badge.img+22
  • Contributor
  • June 24, 2020

Using the CoordinateExtractor transformer, you can get the coordinates of the start of the line using index 0.

The PointonLineOverlayer can transform those attributes (start X and Y of the line) on the point.

If the start X and Y of the line match the coordinates of the point, the line moves away from the point, if not the line moves towards the point.

Hope this helps.