21 #ifndef GEOS_OP_BUFFER_BUFFEROP_H 22 #define GEOS_OP_BUFFER_BUFFEROP_H 27 #include <geos/export.h> 28 #include <geos/operation/buffer/BufferParameters.h> 30 #include <geos/util/TopologyException.h> 34 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class 92 static constexpr
int MAX_PRECISION_DIGITS = 12;
102 std::unique_ptr<geom::Geometry> resultGeometry;
104 bool isInvertOrientation =
false;
123 double distance,
int maxPrecisionDigits);
126 void computeGeometry();
128 void bufferOriginalPrecision();
130 void bufferReducedPrecision(
int precisionDigits);
132 void bufferReducedPrecision();
136 static void extractPolygons(
138 std::vector<std::unique_ptr<geom::Geometry>>& polys);
168 static std::unique_ptr<geom::Geometry> bufferOp(
183 resultGeometry(nullptr),
184 isInvertOrientation(false)
200 resultGeometry(nullptr),
201 isInvertOrientation(false)
213 inline void setEndCapStyle(
int nEndCapStyle);
220 inline void setQuadrantSegments(
int nQuadrantSegments);
242 inline void setSingleSided(
bool isSingleSided);
251 std::unique_ptr<geom::Geometry> getResultGeometry(
double nDistance);
270 static std::unique_ptr<geom::Geometry> bufferByZero(
272 bool isBothOrientations);
303 #endif // ndef GEOS_OP_BUFFER_BUFFEROP_H EndCapStyle
End cap styles.
Definition: BufferParameters.h:62
BufferOp(const geom::Geometry *g)
Initializes a buffer computation for the given geometry.
Definition: BufferOp.h:179
void setSingleSided(bool p_isSingleSided)
Definition: BufferParameters.h:279
void setQuadrantSegments(int quadSegs)
Sets the number of line segments used to approximate an angle fillet.
void setQuadrantSegments(int nQuadrantSegments)
Sets the number of segments used to approximate a angle fillet.
Definition: BufferOp.h:278
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:87
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Specifies a round line buffer end cap style.
Definition: BufferParameters.h:65
void setEndCapStyle(int nEndCapStyle)
Specifies the end cap style of the generated buffer.
Definition: BufferOp.h:284
void setEndCapStyle(EndCapStyle style)
Definition: BufferParameters.h:202
Specifies a flat line buffer end cap style.
Definition: BufferParameters.h:68
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:196
Specifies a square line buffer end cap style.
Definition: BufferParameters.h:71
Computes the buffer of a geometry, for both positive and negative buffer distances.
Definition: BufferOp.h:81
Basic namespace for all GEOS functionalities.
Definition: Angle.h:26
Contains the parameters which describe how a buffer should be constructed.
Definition: BufferParameters.h:57
static const int DEFAULT_QUADRANT_SEGMENTS
The default number of facets into which to divide a fillet of 90 degrees.
Definition: BufferParameters.h:95
Indicates an invalid or inconsistent topological situation encountered during processing.
Definition: TopologyException.h:35
void setSingleSided(bool isSingleSided)
Sets whether the computed buffer should be single-sided.
Definition: BufferOp.h:290