There's no quick fix for this within JTS. The issue is caused by vertices being very close to line segments, which causes robustness failures during some internal operations.

The philosophical fix is to carry less precision in the input geometries. (e.g. round them to .001 or something reasonable). This really should be provided as a function in JTS, but isn't quite there yet. You can simulate it in this case by rounding the coordinates and then doing a buffer(0) to fix up the (invalid) result.

Diego Guidi wrote:
ehm, I'm not sure that this is actually a bug, but...
I've received a NTS issue
(http://code.google.com/p/nettopologysuite/issues/detail?id=37)
and )ve verified that the same behavior is also with JTS 1.8.0 and
1.9.0 (no tests with newer versions, sorry).
see JTS test attached and here
(http://code.google.com/p/nettopologysuite/source/browse/trunk/NetTopologySuite.Samples.Console/Tests/Various/Issue37Test.cs?spec=svn415&r=415)
for NTS test

Diego Guidi
------------------------------------------------------------------------

_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel

--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

_______________________________________________
jts-devel mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jts-devel

Reply via email to