Peter, good to hear JTS is useful for you.
The simplest solution I can think of is for you round the coordinates
output from the contour generator to some reasonable precision model. You
can do this by creating a precision model in JTS and using
http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/geom/PrecisionModel.html#makePrecise(com.vividsolutions.jts.geom.Coordinate)
.
Note you don't *have* to use this precision model for the noding to solve
the problem of the olff-by-ULP problem in the contour output. However, it
may be useful to use it in the noder in order to avoid similar problems
during the noding.
On Wed, Nov 12, 2014 at 9:41 AM, Peter Kovac <[email protected]>
wrote:
> Dear JTS community,
>
> firstly, thank you for an awesome JTS, it's very helpful with my work.
>
> Secondly, I have a problem.
> I'm trying to process contours of a 3D surface and plot them in a 2D
> image as lines and filled polygons. In order to do that I'm noding a
> large set of individual contour segments (up to hundreds of thousands)
> together with a bounding rectangle and then polygonize the noded set. My
> problem is sometimes the contouring algorithm is not exact and outputs a
> contour which has a coordinate 1ULP off the correct value. When it
> happens, the noder I'm using is not reporting it as an intersection with
> the bounding rectangle. Therefore, resulting polygonization has dangles
> which is not correct result in my domain.
>
> What is wrong with my approach? Should I use a different noder or
> precision model?
>
>
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Jts-topo-suite-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user