Skip to main content
Question

Line towards or away from point


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!

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+17
  • 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.


Reply


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