ContourBuilderForTin doesn't like coordinates of zero
See original GitHub issueWhen a ContourBuilderForTin
is initialised with a vertices list where some vertices have 0 in either the x or y coordinate, the following error is returned. Fudging the coordinates by 0.0001 fixes the problem.
java.lang.NullPointerException: Cannot invoke "org.tinfour.contour.PerimeterLink.addContourTip(org.tinfour.contour.Contour, boolean)" because "pStart" is null
at org.tinfour.contour.ContourBuilderForTin.buildRegionsUsingPerimeter(ContourBuilderForTin.java:701)
at org.tinfour.contour.ContourBuilderForTin.buildRegions(ContourBuilderForTin.java:638)
at org.tinfour.contour.ContourBuilderForTin.<init>(ContourBuilderForTin.java:253)
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
提问,如何在window上开发,通过designer设计ui,通过什么来编写 ...
ContourBuilderForTin doesn't like coordinates of zero, 10, 2021-03-16, 2022-09-22. Expose SimpleTriangle Circumcircle, 4, 2021-02-22, 2022-09-21.
Read more >TriangularFacetInterpolator: valid average formula?,about ...
In which case the triangle is degenerate (has area zero). ... HOT 4; ContourBuilderForTin doesn't like coordinates of zero HOT 10; TriangleCollector.
Read more >Tinfour - githubmemory
ContourBuilderForTin doesn't like coordinates of zero. Previous Next. Make software development more efficient, Also welcome to join our telegram.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I basically have this fix completed and have posted an updated version of the code in the repository. I am still doing some final clean up, adding some more comments and Javadoc, etc. I will be submitting the final version soon.
The issue was related to the many special cases that can occur when contours are allowed to pass through vertices… That is, when there exist vertices with the exact z values as a contour. I did quite a bit of rework on the code to address these situations. I’ve also added an inspection utility that performs several tests to verify that a result is correct.
The attached an image was created by contouring elevation data from a Lidar sample taken over Bear Mountain in Salisbury Connecticut. The image represents a 1 kilometer square area. Contours are drawn at 5 meter intervals ranging from 540 meters to 705 meters above mean sea level.
I just posted improvements to contouring to address this issue. However, I’ve discovered some new special-cases that cause the contouring to fail. So I am leaving this issue open and continuing work.