[geos-devel] FIXED: problem with GEOS buffer(0) -- JTS works

strk at refractions.net strk at refractions.net
Mon Aug 22 09:44:43 EDT 2005


Found and fixed the bug (BufferSubgraphGT).

It was StrictWeakOrdering predicate again, like the one
in DepthSegmentLT which triggered release 2.1.3.

I think this calls for a 2.1.4 

To avoid repeating this any further I've taken a look
at all sort() invocations, making sure used comparators
implemented the required semantic. I've changed 3 more
predicates this way.

Following is a patch for BufferSubgraphGT only
(which is enough to fix Dave's test case).

For full patch extraction refer to the 'branch-2-1'
branch of cvs.

--strk;

Index: source/operation/buffer/BufferBuilder.cpp
===================================================================
diff -U2 -r1.27 BufferBuilder.cpp
--- source/operation/buffer/BufferBuilder.cpp   19 May 2005 10:29:28 -0000
1.27
+++ source/operation/buffer/BufferBuilder.cpp   22 Aug 2005 13:31:02 -0000
@@ -262,5 +262,5 @@

 bool BufferSubgraphGT(BufferSubgraph *first, BufferSubgraph *second) {
-       if (first->compareTo(second)>=0)
+       if (first->compareTo(second)>0)
                return true;
        else



More information about the geos-devel mailing list