[geos-devel] [GEOS] #590: GEOSBufferWithStyle result isn't valid and GEOSIsValid() says it is

GEOS geos-trac at osgeo.org
Wed Sep 12 04:58:32 PDT 2012


#590: GEOSBufferWithStyle result isn't valid and GEOSIsValid() says it is
------------------------+---------------------------------------------------
 Reporter:  olivier80   |       Owner:  geos-devel@…              
     Type:  defect      |      Status:  new                       
 Priority:  major       |   Milestone:  3.3.6                     
Component:  Default     |     Version:  3.3.5                     
 Severity:  Unassigned  |    Keywords:                            
------------------------+---------------------------------------------------
 {{{
 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).

-- 
Ticket URL: <http://trac.osgeo.org/geos/ticket/590>
GEOS <http://geos.refractions.net/>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).


More information about the geos-devel mailing list