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