In my data I have many occurrences of 2 lines that follow the same path, but in opposing directions. Applying LineMerger
to this data results in the lines being joined together, but not merged into each other.
e.g. Given two lines with the same nodes
--->--->--->---
---<---<---<---
I want either:
--->--->--->---
or
---<---<---<---
But instead I get
--->--->--->--+
|
---<---<---<--+
or
+-->--->--->---
|
+--<---<---<---
Is there a way to obtain my desired result in JTS?