26#include <geos/export.h>
27#include <geos/operation/buffer/BufferParameters.h>
29#include <geos/util/TopologyException.h>
33#pragma warning(disable: 4251)
91 static constexpr int MAX_PRECISION_DIGITS = 12;
101 std::unique_ptr<geom::Geometry> resultGeometry;
103 bool isInvertOrientation =
false;
122 double distance,
int maxPrecisionDigits);
125 void computeGeometry();
127 void bufferOriginalPrecision();
129 void bufferReducedPrecision(
int precisionDigits);
131 void bufferReducedPrecision();
135 static void extractPolygons(
137 std::vector<std::unique_ptr<geom::Geometry>>& polys);
173 static std::unique_ptr<geom::Geometry>
bufferOp(
187 resultGeometry(nullptr),
188 isInvertOrientation(false)
204 resultGeometry(nullptr),
205 isInvertOrientation(false)
217 inline void setEndCapStyle(
int nEndCapStyle);
224 inline void setQuadrantSegments(
int nQuadrantSegments);
246 inline void setSingleSided(
bool isSingleSided);
276 bool isBothOrientations);
284 bufParams.setQuadrantSegments(q);
296 bufParams.setSingleSided(isSingleSided);
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:186
Specifies the precision model of the Coordinate in a Geometry.
Definition PrecisionModel.h:88
void setQuadrantSegments(int nQuadrantSegments)
Sets the number of segments used to approximate a angle fillet.
Definition BufferOp.h:282
std::unique_ptr< geom::Geometry > getResultGeometry(double nDistance)
Returns the buffer computed for a geometry for a given buffer distance.
@ CAP_ROUND
Definition BufferOp.h:144
@ CAP_BUTT
Definition BufferOp.h:148
@ CAP_SQUARE
Definition BufferOp.h:152
void setEndCapStyle(int nEndCapStyle)
Specifies the end cap style of the generated buffer.
Definition BufferOp.h:288
static std::unique_ptr< geom::Geometry > bufferOp(const geom::Geometry *g, double distance, int quadrantSegments=BufferParameters::DEFAULT_QUADRANT_SEGMENTS, int endCapStyle=BufferParameters::CAP_ROUND)
Computes the buffer for a geometry for a given buffer distance and accuracy of approximation.
void setSingleSided(bool isSingleSided)
Sets whether the computed buffer should be single-sided.
Definition BufferOp.h:294
BufferOp(const geom::Geometry *g, const BufferParameters ¶ms)
Initializes a buffer computation for the given geometry with the given set of parameters.
Definition BufferOp.h:200
BufferOp(const geom::Geometry *g)
Initializes a buffer computation for the given geometry.
Definition BufferOp.h:183
static std::unique_ptr< geom::Geometry > bufferByZero(const geom::Geometry *geom, bool isBothOrientations)
Contains the parameters which describe how a buffer should be constructed.
Definition BufferParameters.h:56
EndCapStyle
End cap styles.
Definition BufferParameters.h:61
@ CAP_SQUARE
Specifies a square line buffer end cap style.
Definition BufferParameters.h:70
@ CAP_ROUND
Specifies a round line buffer end cap style.
Definition BufferParameters.h:64
@ CAP_FLAT
Specifies a flat line buffer end cap style.
Definition BufferParameters.h:67
static const int DEFAULT_QUADRANT_SEGMENTS
The default number of facets into which to divide a fillet of 90 degrees.
Definition BufferParameters.h:94
Indicates an invalid or inconsistent topological situation encountered during processing.
Definition TopologyException.h:34
Provides classes for computing buffers of geometries.
Definition namespaces.h:182
Provides classes for implementing operations on geometries.
Definition LargestEmptyCircle.h:42
Basic namespace for all GEOS functionalities.
Definition geos.h:39