-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need enhancement to handle defective polygon constraints #56
Comments
Maybe an idea could be to add a geometry validation with JTS. This validation logic would not be part of the core package but of a different one, e.g. With that, you could keep the core package clean of external dependencies, but would offer some convenience functions for others who do not mind having some additional dependencies. |
That's a good idea. And I'm pleased to see that you addressed the dependency issues. Also, I think JTS is a perfect choice for the task. |
Sounds like IsSimpleOp?
Another idea: rather than using such a technique to reject inputs (validation logic), perhaps degenerate polygon constraints could be fixed with JTS' new GeometryFixer (see here) and then processed. Alternatively, I believe |
Thanks. I just read Martin Davis' discussion from the link you provided for Fixing Invalid Geometry with HTS It's great to see that they provide that function, since I've needed something like it more times than I can count. While I wouldn't want to give Tinfour an additional external dependency on JTS, most of the applications I've written that use Tinfour also happen to use JTS. So it would be a good fit. |
Hi, |
Thanks. I will look at this and incorporate it into the test suite this weekend. |
The LogoCDT demonstration application uses Java fonts to provide polygons for rendering constrained Delaunay triangulations. The original implementation was developed using Java 8 and used the font "Arial Black", Bold, 72 pt. However, when running tests in preparation for the 2.1.5 release, we discovered that the CDT was failing. The problem was due to the way more recent versions of Java handled that font specification.
The picture below illustrates the problem. In Java 11, the lowercase letter "a" is formed so that the upper part of the letter touches the lower loop. This geometry violates the requirement that polygon constraints must not intersect themselves. Thus the constraint formed from the letter a is not valid.
This issue requests an enhancement to the current Tinfour API's capabilities for detecting problematic geometries. In the present implementation, some bad geometries can slip through the test procedures.
In the mean time, the LogoCDT module will be modified to use the font "Arial Black", Plain, 72 pt.
The text was updated successfully, but these errors were encountered: