Skip to content

Commit

Permalink
Use DD algorithm in mitred buffer calculation: relatively low
Browse files Browse the repository at this point in the history
performance impact, and more stable output. References GH-933.
  • Loading branch information
pramsey committed Jun 30, 2023
1 parent fa3b4ef commit 01a976f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/operation/buffer/OffsetSegmentGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include <geos/geom/Coordinate.h>
#include <geos/geom/PrecisionModel.h>
#include <geos/algorithm/NotRepresentableException.h>
#include <geos/algorithm/Intersection.h>
#include <geos/algorithm/CGAlgorithmsDD.h>
#include <geos/util.h>

#ifndef GEOS_DEBUG
Expand Down Expand Up @@ -483,7 +483,7 @@ OffsetSegmentGenerator::addMitreJoin(const geom::Coordinate& cornerPt,
* However, this situation should have been eliminated earlier by the check
* for whether the offset segment endpoints are almost coincident
*/
CoordinateXY intPt = algorithm::Intersection::intersection(p_offset0.p0, p_offset0.p1, p_offset1.p0, p_offset1.p1);
CoordinateXY intPt = algorithm::CGAlgorithmsDD::intersection(p_offset0.p0, p_offset0.p1, p_offset1.p0, p_offset1.p1);

if (!intPt.isNull() && intPt.distance(cornerPt) <= mitreLimitDistance) {
segList.addPt(Coordinate(intPt));
Expand Down

0 comments on commit 01a976f

Please sign in to comment.