20 #ifndef GEOS_OP_BUFFER_OFFSETSEGMENTSTRING_H
21 #define GEOS_OP_BUFFER_OFFSETSEGMENTSTRING_H
23 #include <geos/geom/Coordinate.h>
24 #include <geos/geom/CoordinateSequence.h>
25 #include <geos/geom/CoordinateArraySequence.h>
26 #include <geos/geom/PrecisionModel.h>
57 double minimumVertexDistance;
69 if(ptList->size() < 1) {
74 if(ptDist < minimumVertexDistance) {
88 precisionModel(
nullptr),
89 minimumVertexDistance(0.0)
108 precisionModel =
nullptr;
109 minimumVertexDistance = 0.0;
115 precisionModel = nPrecisionModel;
119 setMinimumVertexDistance(
double nMinVertexDistance)
121 minimumVertexDistance = nMinVertexDistance;
127 assert(precisionModel);
132 if(isRedundant(bufPt)) {
138 ptList->
add(bufPt,
true);
145 for(
size_t i = 0, n = pts.size(); i < n; ++i) {
150 for(
size_t i = pts.size(); i > 0; --i) {
162 if(ptList->size() < 1) {
167 if(startPt.
equals(lastPt)) {
171 ptList->
add(startPt,
true);
194 return ptList ? ptList->size() : 0 ;
200 operator<< (std::ostream& os,
201 const OffsetSegmentString& lst)
207 os <<
"empty (consumed?)";
217 #endif // ndef GEOS_OP_BUFFER_OFFSETSEGMENTSTRING_H
The default implementation of CoordinateSequence.
Definition: CoordinateArraySequence.h:37
void add(const Coordinate &c) override
Add a Coordinate to the list.
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
A dynamic list of the vertices in a constructed offset curve.
Definition: OffsetSegmentString.h:43
const Coordinate & back() const
Return last Coordinate in the sequence.
Definition: CoordinateSequence.h:89
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:87
void closeRing()
Check that points are a ring.
Definition: OffsetSegmentString.h:160
geom::CoordinateSequence * getCoordinates()
Get coordinates by taking ownership of them.
Definition: OffsetSegmentString.h:183
bool equals(const Coordinate &other) const
2D only
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
double makePrecise(double val) const
Rounds a numeric value to the PrecisionModel grid.
double distance(const Coordinate &p) const
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:58
void clear()
Reset this CoordinateArraySequence to the empty state.
Definition: CoordinateArraySequence.h:87
const Coordinate & front() const
Return first Coordinate in the sequence.
Definition: CoordinateSequence.h:96