[geos-devel] [GEOS] #960: Exception when creating geometry buffer

GEOS geos-trac at osgeo.org
Tue Mar 19 09:21:44 PDT 2019


#960: Exception when creating geometry buffer
--------------------------+---------------------------------------
 Reporter:  allenkim0129  |      Owner:  geos-devel@…
     Type:  defect        |     Status:  new
 Priority:  blocker       |  Milestone:
Component:  Default       |    Version:  3.6.2
 Severity:  Unassigned    |   Keywords:  Buffer, TopologyException
--------------------------+---------------------------------------
 Issue:\\
 I am getting the following exception from GEOS:\\
 {{{
 TopologyException: assigned depths do not match at 3.3333333333333357
 36.666666666666664
 }}}


 Steps to re-produce:\\

 {{{
 //1. Create GEOS Geometry
 std::string wkt = "MULTILINESTRING ((10 10, 20 20, 10 40), (40 40, 30 30,
 40 20, 30 10))";
 geos::io::WKTReader wkt_reader;
 geos::geom::Geometry* geom = wkt_reader.read(wkt);

 //2. BufferParameters
 geos::operation::buffer::BufferParameters param;
 param.setEndCapStyle(geos::operation::buffer::BufferParameters::CAP_FLAT);
 param.setQuadrantSegments(6);
 geos::operation::buffer::BufferBuilder builder(param);

 //3. Create Buffer
 double dist = 40;
 geos::geom::Geometry* geom_buffer = builder.buffer(geom, dist);


 }}}

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


More information about the geos-devel mailing list