[geos-devel] Invalid geometry returned from buffer

strk strk at keybit.net
Mon Mar 6 10:02:30 EST 2006


Making some TopologyException handling tests i've
hit a possible bug in Buffer operation.

The attached XML test results in an Invalid output
from buffer(1). Input is valid.
Expected result is also valid (the test, in GEOS, 
succeeds as a tolerance-based comparison between expected
and obtained result is performed with a tolerance of
0.00000000000001).

Note that if precisionModel is set to FLOATING_SINGLE
the output will NOT be invalid.

Martin, can you reproduce the bug with JTS ?
With GEOS I added a --test-valid-output switch to
perform the specific check.

--strk;
-------------- next part --------------

<run>
  <precisionModel type="FLOATING" />
  <precisionModel type="FLOATING_SINGLE" />
<case><desc>Invalid output ?</desc>
<a>
GEOMETRYCOLLECTION (POLYGON ((0 10, 10 0, 10 10, 0 10), (4 8, 8 4, 8 8, 4 8)), LINESTRING (6 6, 20 20))
</a>
<test>
<op name="buffer" arg1="a" arg3="1">
 POLYGON ((-1.0000000000000000 9.9999999999401386, -0.9807852804178286 10.1950903219427378, -0.9238795325456491 10.3826834322821320, -0.8314696123607461 10.5555702329324976, -0.7071067812712054 10.7071067811018903, -0.5555702331315925 10.8314696122277159, -0.3826834325033531 10.9238795324540163, -0.1950903221775858 10.9807852803711139, -0.0000000001795863 11.0000000000000000, 0.0000000000000000 11.0000000000000000, 9.5857864376269042 11.0000000000000000, 19.2928932188134539 20.7071067811865461, 19.2928932188134539 20.7071067811865497, 19.4444297669803987 20.8314696123025449, 19.6173165676349122 20.9238795325112861, 19.8049096779838720 20.9807852804032322, 20.0000000000000000 21.0000000000000000, 20.1950903220161280 20.9807852804032287, 20.3826834323650914 20.9238795325112861, 20.5555702330196013 20.8314696123025449, 20.7071067811865461 20.7071067811865461, 20.8314696123025449 20.5555702330196013, 20.9238795325112861 20.3826834323650914, 20.9807852804032287 20.1950903220161280, 21.0000000000000000 20.0000000000000000, 20.9807852804032322 19.8049096779838720, 20.9238795325112861 19.6173165676349122, 20.8314696123025449 19.4444297669803987, 20.7071067811865461 19.2928932188134539, 11.0000000000000000 9.5857864376269042, 11.0000000000000000 0.0000000000000000, 10.9807852804032304 -0.1950903220161285, 10.9238795325112861 -0.3826834323650899, 10.8314696123025449 -0.5555702330196024, 10.7071067811865479 -0.7071067811865477, 10.5555702330196013 -0.8314696123025453, 10.3826834323650896 -0.9238795325112868, 10.1950903220161280 -0.9807852804032304, 10.0000000000000000 -1.0000000000000000, 9.8049096779838720 -0.9807852804032304, 9.6173165676349104 -0.9238795325112866, 9.4444297669803969 -0.8314696123025451, 9.2928932188134521 -0.7071067811865472, 9.2928932188134521 -0.7071067811865476, -0.7071067811865476 9.2928932188134521, -0.7071067811865478 9.2928932188134521, -0.8314696122942310 9.4444297669679553, -0.9238795324998327 9.6173165676072578, -0.9807852803944715 9.8049096779398379, -1.0000000000000000 9.9999999999401386))
</op>
</test>
</case>
</run>


More information about the geos-devel mailing list