17#include <geos/export.h>
18#include <geos/geom/GeometryFactory.h>
19#include <geos/index/chain/MonotoneChainSelectAction.h>
20#include <geos/operation/buffer/BufferParameters.h>
25#pragma warning(disable: 4251)
97 static constexpr int NEARNESS_FACTOR = 10000;
103 double matchDistance;
108 std::unique_ptr<LineString> computeCurve(
const LineString& lineGeom,
double distance);
110 std::unique_ptr<LineString> offsetSegment(
const CoordinateSequence* pts,
double distance);
121 static std::unique_ptr<Polygon> extractMaxAreaPolygon(
const Geometry& geom);
123 static std::unique_ptr<LinearRing> extractLongestHole(
const Polygon& poly);
125 std::unique_ptr<LineString> computeCurve(
127 std::vector<CoordinateSequence*>& rawOffsetList);
131 std::vector<bool>& isInCurve);
146 std::vector<bool>& isExtracted, std::vector<Coordinate>& extractedPoints);
148 static std::size_t next(std::size_t i, std::size_t size);
160 double matchDistance;
161 std::vector<bool>& isInCurve;
163 int minCurveIndex = -1;
167 MatchCurveSegmentAction(
170 std::vector<bool>& p_isInCurve)
173 , bufferPts(p_bufferPts)
174 , matchDistance(p_matchDistance)
175 , isInCurve(p_isInCurve)
183 int getMinCurveIndex() {
return minCurveIndex; }
202 , matchDistance(std::abs(dist)/NEARNESS_FACTOR)
203 , geomFactory(geom.getFactory())
219 , matchDistance(std::abs(dist)/NEARNESS_FACTOR)
220 , geomFactory(geom.getFactory())
238 static std::unique_ptr<Geometry> getCurve(
const Geometry& geom,
double dist);
239 std::unique_ptr<Geometry> getCurve();
257 static void rawOffset(
const LineString& geom,
double dist, std::vector<CoordinateSequence*>& lineList);
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:44
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:58
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:66
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
Definition: LineSegment.h:60
Definition: LineString.h:66
Models an OGC SFS LinearRing. A LinearRing is a LineString which is both closed and simple.
Definition: LinearRing.h:55
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
Definition: MonotoneChainSelectAction.h:44
Monotone Chains are a way of partitioning the segments of a linestring to allow for fast searching of...
Definition: index/chain/MonotoneChain.h:85
Contains the parameters which describe how a buffer should be constructed.
Definition: BufferParameters.h:56
JoinStyle
Join styles.
Definition: BufferParameters.h:74
Definition: OffsetCurve.h:91
OffsetCurve(const Geometry &geom, double dist, BufferParameters &bp)
Definition: OffsetCurve.h:215
static std::unique_ptr< Geometry > getCurve(const Geometry &geom, double dist, int quadSegs, BufferParameters::JoinStyle joinStyle, double mitreLimit)
static void rawOffset(const LineString &geom, double dist, BufferParameters &bufParams, std::vector< CoordinateSequence * > &lineList)
OffsetCurve(const Geometry &geom, double dist)
Definition: OffsetCurve.h:199
Basic namespace for all GEOS functionalities.
Definition: geos.h:39