Ticket #176 (closed defect: fixed)
Buffer returns empty geometry though it should not be empty
| Reported by: | silke | Owned by: | strk |
|---|---|---|---|
| Priority: | major | Milestone: | 3.2.0 |
| Component: | Core | Version: | svn-trunk |
| Severity: | Significant | Keywords: | |
| Cc: |
Description
I observed a really strange behavior of the buffer function when using an inner buffer. The error occurs with the following geometry: POLYGON (( 513.4 343.1, 707.3 344.2, 707.0 394.9, 797.9 395.4, 799.2 341.8, 516.9 340.9, 516.7 262.3, 513.2 262.3, 513.4 343.1 )) Its WKB representation is 0103000000010000000900000033333333330B80409A9999999971754066666666661A8640333333333383754000000000001886406666666666AE78403333333333EF88406666666666B678409A99999999F98840CDCCCCCCCC5C7540333333333327804066666666664E75409A99999999258040CDCCCCCCCC6470409A99999999098040CDCCCCCCCC64704033333333330B80409A99999999717540
Using a buffer of -2 should lead to an inner buffer but leads to "GEOMETRYCOLLECTION EMPTY" resp. "POLYGON( EMPTY)" depending on the geos version.
Using the same buffer of -2 on a polygon with the same shape but shifted to the left by 100 and shifted down by 100, i.e.
POLYGON (( 413.4 243.1, 607.3 244.2, 607.0 294.9, 697.9 295.4, 699.2 241.8, 416.9 240.9, 416.7 162.3, 413.2 162.3, 413.4 243.1 ))
resp. 010300000001000000090000006666666666D679403333333333636E406666666666FA82406666666666866E400000000000F8824066666666666E72403333333333CF854066666666667672409A99999999D985409A99999999396E4066666666660E7A40CDCCCCCCCC1C6E4033333333330B7A409A999999994964403333333333D379409A999999994964406666666666D679403333333333636E40
leads to the expected buffer: POLYGON((609.172261037685 243.512992930268,609.26383338939 243.821372982058,609.29996498814 244.211834112356,609.011804031568 292.911035772954,695.948180429531 293.389233662932,697.151062564334 243.793477951075,609.172261037685 243.512992930268)) resp. 01030000000100000007000000DD1965CA600983408D5226706A706E403118AE541C0A83402AF8FDAF487A6E400A300B54660A8340DB175558C7866E405E4CB62C1808834035253F9A934E72405BFC9EDF95BF8540BECC134D3A567240B72B4A6035C98540EB3EDF2B64796E40DD1965CA600983408D5226706A706E40
I tested this on different geos versions among them 3.0.0rc4 and 3.0.0
Cf. the discussion on the geos-devel list as well: http://lists.osgeo.org/pipermail/geos-devel/2008-January/003271.html
Also this bug might be related to the bug number #158

