Open ghost opened 7 years ago
First of all, thank you for reporting the issue.
This is a project I did a while ago for a company called Incentergy. As you see, it was never truly finalized, but I'll reach out to them to see if they have improved the code further and if they could share it. I'm not planning to do major development because I am not using this library myself. But you are welcome to contribute, and I could help you as well if you can pinpoint the problem and it is not too difficult to fix.
Now if we look at the issue, it could be a problem with the algorithm itself not supporting some edge case. You could try to verify this by running the algorithm on paper or using alternate implementations (C++ or JS, linked in the original article's comments).
If there is no issue there, then it's just a problem with this implementation. If you could provide a unit test for it (some input and expected precise output), it would help. If you could debug the code and pinpoint the issue, that would be even better.
I have some basic issues when I run your code the code fails in two tests.
In "test2" why can I not split the polygon into more than four (4) areas?
Say I have a 10,000 x 10,000 square I might want to create a mesh with lots of areas.
In "test3" why can I not split a triangle (this is a polygon) ?
It seems like any sort of polygon splitter should be able to handle a triangle.
Looking forward to some answers/explanations - I don't really see any mistakes on my part. Note I am using Java8 and the latest GIT along with the latest JTS
The output when run ....