Opened 8 years ago

Last modified 2 years ago

#590 new defect

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 8 years ago.
MitreBuffer-1.png (14.0 KB) - added by Olivier80 8 years ago.

Download all attachments as: .zip

Change History (10)

Changed 8 years ago by olivier80

Attachment: MitreBuffer.png added

comment:1 Changed 8 years ago by strk

Milestone: 3.3.63.3.7

Changed 8 years ago by Olivier80

Attachment: MitreBuffer-1.png added

comment:3 Changed 8 years ago by Olivier80

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 Changed 7 years ago by robe

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 Changed 5 years ago by robe

Milestone: 3.5.03.6.0

comment:6 Changed 4 years ago by strk

Milestone: 3.6.03.7.0

Ticket retargeted after milestone closed

comment:7 Changed 2 years ago by robe

Milestone: 3.7.0GEOS Future

comment:8 Changed 2 years ago by robe

Milestone: GEOS FutureGEOS Fund Me

Milestone renamed

Note: See TracTickets for help on using tickets.