Lines do not have an orientation that can be extracted with the OrientationExtractor. What do you mean by Orientation in this case? If you need the angle of the line, the HorizontalAngleCalculator(custom transformer) might help you here
Hi @aron,
A quick way to determine the orientation of a reasonably straight line is to subtract the beginning X and Y coordinate from the end X and Y. A + or - X value gives you the East/West orientation, while +/- Y gives you North/South. If both orientations match, then the lines are OK.
If your lines are close, but not exact, you may want to take the extra step of testing the difference in values between the lines. For example, two lines oriented almost exactly up/down may have a small negative X value for one and small positive value for the other. If the X difference falls below a tolerance, you can consider them equivalent.
Lines do not have an orientation that can be extracted with the OrientationExtractor. What do you mean by Orientation in this case? If you need the angle of the line, the HorizontalAngleCalculator(custom transformer) might help you here
Thanks for the clarification! A better wording would have been 'direction', as in a line has a start and a end. I need to make sure two overlying lines have the same direction.
In case it is of use to anyone, I solved it the following way:
- Intersector (could also use LineOnLineOverlayer)
- Snipper, to shorten the lines an inkling and not have any "duplicate positions"
- CoordinateExtractor x2, to get start and end (0 and -1)
- InlineQuerier, to find "flipped" lines
- Orientor, to flip the strays