Skip to main content

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.

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


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.


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?


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


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 🙂!


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


Reply