[geos-devel] [GEOS] #589: GEOSBufferWithStyle with mitre style on LinearRing

GEOS geos-trac at osgeo.org
Wed Sep 12 03:47:39 PDT 2012


#589: GEOSBufferWithStyle with mitre style on LinearRing
------------------------+---------------------------------------------------
 Reporter:  olivier80   |       Owner:  geos-devel@…              
     Type:  defect      |      Status:  new                       
 Priority:  major       |   Milestone:  3.3.6                     
Component:  Default     |     Version:  3.3.5                     
 Severity:  Unassigned  |    Keywords:                            
------------------------+---------------------------------------------------
 I’m not sure if it is a bug or if it is normal behaviour.

 Consider this linearring.

 {{{
 LINEARRING (
 10.0000000000000000 10.0000000000000000,
 20.0000000000000000 10.0000000000000000,
 20.0000000000000000 20.0000000000000000,
 10.0000000000000000 20.0000000000000000,
 10.0000000000000000 10.0000000000000000)
 }}}

 Now I do :

 {{{
 GEOSBufferWithStyle(linearring, 1, 3, GEOSBUF_CAP_FLAT,
 GEOSBUF_JOIN_MITRE, 5)
 }}}

 Result :


 {{{
 POLYGON ((
 10.0000000000000000 10.0000000000000000,
 9.0000000000000000 10.0000000000000000,
 9.0000000000000000 21.0000000000000000,
 21.0000000000000000 21.0000000000000000,
 21.0000000000000000 9.0000000000000000,
 10.0000000000000000 9.0000000000000000,
 10.0000000000000000 10.0000000000000000),
 (11.0000000000000000 11.0000000000000000,
 19.0000000000000000 11.0000000000000000,
 19.0000000000000000 19.0000000000000000,
 11.0000000000000000 19.0000000000000000,
 11.0000000000000000 11.0000000000000000))
 }}}


 The first and last points of my buffer are in flat style. I think on a
 linearring, geos should use the join style, not the cap style for the
 closing point.
 Otherwise, how can I mitre the first point and last points on a linearring
 ?

-- 
Ticket URL: <http://trac.osgeo.org/geos/ticket/589>
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