21 #ifndef GEOS_OP_BUFFER_BUFFEROP_H
22 #define GEOS_OP_BUFFER_BUFFEROP_H
24 #include <geos/export.h>
25 #include <geos/operation/buffer/BufferParameters.h>
27 #include <geos/util/TopologyException.h>
31 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
78 class GEOS_DLL BufferOp {
89 static const int MAX_PRECISION_DIGITS = 12;
107 static double precisionScaleFactor(
const geom::Geometry* g,
108 double distance,
int maxPrecisionDigits);
110 const geom::Geometry* argGeom;
112 util::TopologyException saveException;
118 BufferParameters bufParams;
120 geom::Geometry* resultGeometry;
122 void computeGeometry();
124 void bufferOriginalPrecision();
126 void bufferReducedPrecision(
int precisionDigits);
128 void bufferReducedPrecision();
130 void bufferFixedPrecision(
const geom::PrecisionModel& fixedPM);
160 static geom::Geometry* bufferOp(
const geom::Geometry* g,
162 int quadrantSegments =
171 BufferOp(
const geom::Geometry* g)
175 resultGeometry(nullptr)
187 BufferOp(
const geom::Geometry* g,
const BufferParameters& params)
191 resultGeometry(nullptr)
203 inline void setEndCapStyle(
int nEndCapStyle);
210 inline void setQuadrantSegments(
int nQuadrantSegments);
232 inline void setSingleSided(
bool isSingleSided);
241 geom::Geometry* getResultGeometry(
double nDistance);
272 #endif // ndef GEOS_OP_BUFFER_BUFFEROP_H
void setEndCapStyle(int nEndCapStyle)
Specifies the end cap style of the generated buffer.
Definition: BufferOp.h:252
EndCapStyle
End cap styles.
Definition: BufferParameters.h:61
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:24
void setQuadrantSegments(int nQuadrantSegments)
Sets the number of segments used to approximate a angle fillet.
Definition: BufferOp.h:246
void setQuadrantSegments(int quadSegs)
Sets the number of line segments used to approximate an angle fillet.
Specifies a square line buffer end cap style.
Definition: BufferParameters.h:70
Specifies a flat line buffer end cap style.
Definition: BufferParameters.h:67
void setSingleSided(bool isSingleSided)
Sets whether the computed buffer should be single-sided.
Definition: BufferOp.h:258
Specifies a round line buffer end cap style.
Definition: BufferParameters.h:64
void setSingleSided(bool p_isSingleSided)
Definition: BufferParameters.h:280
void setEndCapStyle(EndCapStyle style)
Specifies the end cap style of the generated buffer.
Definition: BufferParameters.h:203
static const int DEFAULT_QUADRANT_SEGMENTS
The default number of facets into which to divide a fillet of 90 degrees.
Definition: BufferParameters.h:94