[geos-devel] Bug in buffer function?

Silke Reimer reimer at rapideye.de
Fri Jan 25 09:26:59 EST 2008


I observed a really strange behavior of the buffer function when using an 
inner buffer. The error occurs with the following geometry:
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

Using a buffer of -2 should lead to an inner buffer but leads 
to "GEOMETRYCOLLECTION EMPTY" resp. "POLYGON( EMPTY)" depending on the geos 

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.

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


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))

I tested this on different geos versions among them
3.0.0rc4 and 3.0.0

I would say that this is a bug but it would be nice if somebody could confirm 
this - and perhaps you even have an idea how to solve this? I did not find 
any entry in the bug tracker but maybe I just missed it. In this case I would 
be glad for a hint.

Many greetings,



RapidEye AG
Molkenmarkt 30
14776 Brandenburg an der Havel

Head Office/Sitz der Gesellschaft: Brandenburg an der Havel
Management Board/Vorstand: Wolfgang G. Biedermann
Chairman of Supervisory Board/Vorsitzender des Aufsichtsrates: Axel Schmalz
Commercial Register/Handelsregister Potsdam HRB 17 796
Tax Number/Steuernummer: 048/100/00053
VAT-Ident-Number/Ust.-ID: DE 199331235

Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail irrtuemlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

The information in this e-mail is intended for the named recipients
only. It may contain privileged and confidential information. If you
have received this communication in error, any use, copying or
dissemination of its contents is strictly prohibited. Please erase all
copies of the message along with any included attachments and notify
RapidEye AG or the sender immediately by telephone at the number
indicated on this page.

More information about the geos-devel mailing list