Skip to main content
Solved

Tester for line features

  • January 27, 2021
  • 6 replies
  • 76 views

Hi @everyone, I want to test my 3D Dataset for vertical lines (only horizontal are allowed). I instructed the transformer to test if the z-start point is the same like the z-endpoint. Z-ValueNow the problem is the amount of z-points in the data set differs, some lines got more than 6 or less:

z-value2 

How can I test dynamically for the end z-point?

 

Thank you in advance.

Best answer by ebygomm

But if I only compare the first two vertices, there is the possibility that the line deviates after the second vertice and wont get identified. Is there any possibility to compare all existing vertices?

If you have extracted all coordinates you could use a list duplicate remover on the z value then count the length of the list with a list element counter - if the list is 1 all the values are identical

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.

6 replies

redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3700 replies
  • January 27, 2021

You could use a BoundsExtractor to store the min and max z values as attributes, then a TestFilter to see if they differ.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • January 27, 2021

I'd probably go with the BoundsExtractor option, but if you want to get just the last coordinate where you don't know the number of vertices you can use a coordinate extractor set to specify coordinate with the coordinate index set to -1

 

Unless I've misunderstood what you mean by horizontal, you should just be able to compare the z values of the first and second vertices though.


  • Author
  • 6 replies
  • January 27, 2021

I'd probably go with the BoundsExtractor option, but if you want to get just the last coordinate where you don't know the number of vertices you can use a coordinate extractor set to specify coordinate with the coordinate index set to -1

 

Unless I've misunderstood what you mean by horizontal, you should just be able to compare the z values of the first and second vertices though.

But if I only compare the first two vertices, there is the possibility that the line deviates after the second vertice and wont get identified. Is there any possibility to compare all existing vertices?


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • Best Answer
  • January 27, 2021

But if I only compare the first two vertices, there is the possibility that the line deviates after the second vertice and wont get identified. Is there any possibility to compare all existing vertices?

If you have extracted all coordinates you could use a list duplicate remover on the z value then count the length of the list with a list element counter - if the list is 1 all the values are identical


  • Author
  • 6 replies
  • January 28, 2021

But if I only compare the first two vertices, there is the possibility that the line deviates after the second vertice and wont get identified. Is there any possibility to compare all existing vertices?

Seems to work, thank you very much :)!


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • January 28, 2021

But if I only compare the first two vertices, there is the possibility that the line deviates after the second vertice and wont get identified. Is there any possibility to compare all existing vertices?

The BoundsExtractor that @Hans van der Maarel​ mentioned would be more efficient, one bounds extractor then test for if z min = z max. If max and min are the same that means the line is horizontal