Opened 12 years ago

Closed 20 months ago

#590 closed defect (fixed)

GEOSBufferWithStyle result isn't valid and GEOSIsValid() says it is

Reported by: olivier80 Owned by: geos-devel@…
Priority: major Milestone: GEOS Fund Me
Component: Default Version: 3.3.5
Severity: Unassigned Keywords:
Cc:

Description

LINEARRING(38.7066196617741550 -28.8266827415760860, 
-48.9228243285119790 100.6496977731573000, 
54.4799195800256510 129.8110447359351000, 
108.8101748540030500 45.8263654831350490, 
86.7372079193139310 22.3209346883718070, 
71.8793256882949690 36.0080540867567290, 
55.2741306329362700 34.2630391674088840, 
52.0696193064635370 19.4304123529519610, 
62.0890652576763390 -3.9267923737325212, 
38.7066196617741550 -28.8266827415760860)

I do :

GEOSBufferWithStyle(object, 22.532378519833863, 6, GEOSBUF_CAP_FLAT, GEOSBUF_JOIN_MITRE, 5)

The result is :

POLYGON ((
-85.0750607179665220 113.8654258494467400, 
64.3672965899103670 156.0107332916275600, 
137.3079656672400100 43.2577438927670460, 
87.8851662143294450 -9.3724347171667830, 
64.1043275247160270 12.5345351643778980, 
57.6290566127233890 11.8540587044160620, 
56.4515936228298330 23.0585489359124730, 
66.2862534590275200 31.8839277149233600, 
77.2983762851187630 29.5048162624378390, 
75.6128088072109530 21.7028799222997040, 
88.6113412524690600 -8.5991332777010179, 
55.1320522049615960 -44.2511194421583620, 
38.7066196617741550 -28.8266827415760860, 
20.0462661184433340 -41.4559854697147760, 
-85.0750607179665220 113.8654258494467400), 
(30.0425661643411640 24.1756403122601360, 
36.6948846784684620 54.9670302991890620, 
73.5550410624974380 58.8406085742523290, 
44.5925425701409350 103.6113561802426200, 
-12.7705879390574210 87.4339696968678620, 
30.0425661643411640 24.1756403122601360))

GEOSIsValid() on the result returns 1. But it is a self crossing polygon (near 88.6 -8.6).

Attachments (2)

MitreBuffer.png (29.6 KB ) - added by olivier80 12 years ago.
MitreBuffer-1.png (14.0 KB ) - added by Olivier80 11 years ago.

Download all attachments as: .zip

Change History (11)

by olivier80, 12 years ago

Attachment: MitreBuffer.png added

comment:1 by strk, 11 years ago

Milestone: 3.3.63.3.7

by Olivier80, 11 years ago

Attachment: MitreBuffer-1.png added

comment:3 by Olivier80, 11 years ago

No, I attached a second image showing that outer ring is self crossing by moving slightly one point to the left. This "hole" is there in the image because the winding number is 2 in it. Anyway, the buffer of the input linearing should not be what we see in the first image.

comment:4 by robe, 11 years ago

Milestone: 3.3.93.5.0

I'm pushing this to 3.5 to get it out of the 3.3.9 pool.

comment:5 by robe, 9 years ago

Milestone: 3.5.03.6.0

comment:6 by strk, 7 years ago

Milestone: 3.6.03.7.0

Ticket retargeted after milestone closed

comment:7 by robe, 6 years ago

Milestone: 3.7.0GEOS Future

comment:8 by robe, 6 years ago

Milestone: GEOS FutureGEOS Fund Me

Milestone renamed

comment:9 by dbaston, 20 months ago

Resolution: fixed
Status: newclosed

Both issues raised by this ticket (invalid polygon produced by buffering; polygon not recognized as invalid) have been fixed sometime in the last decade. Tests added to main branch at c68119c728487ce63ca125cc452e6f9217eee195/git

Note: See TracTickets for help on using tickets.