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>
58 double minimumVertexDistance;
69 if (ptList->size() < 1)
73 if (ptDist < minimumVertexDistance)
87 minimumVertexDistance (0.0)
98 if ( ptList ) ptList->
clear();
101 precisionModel = NULL;
102 minimumVertexDistance = 0.0;
107 precisionModel = nPrecisionModel;
110 void setMinimumVertexDistance(
double nMinVertexDistance)
112 minimumVertexDistance = nMinVertexDistance;
117 assert(precisionModel);
122 if (isRedundant(bufPt))
129 ptList->
add(bufPt,
true);
135 for (
size_t i=0, n=pts.size(); i<n; ++i) {
139 for (
size_t i=pts.size(); i>0; --i) {
150 if (ptList->size() < 1)
return;
153 if (startPt.
equals(lastPt))
return;
155 ptList->
add(startPt,
true);
174 inline size_t size()
const {
return ptList ? ptList->size() : 0 ; }
178 inline std::ostream& operator<< (std::ostream& os,
179 const OffsetSegmentString& lst)
187 os <<
"empty (consumed?)";
197 #endif // ndef GEOS_OP_BUFFER_OFFSETSEGMENTSTRING_H
The default implementation of CoordinateSequence.
Definition: CoordinateArraySequence.h:37
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:88
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:148
geom::CoordinateSequence * getCoordinates()
Get coordinates by taking ownership of them.
Definition: OffsetSegmentString.h:166
void add(const Coordinate &c)
Add a Coordinate to the list.
bool equals(const Coordinate &other) const
2D only
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:59
void clear()
Reset this CoordinateArraySequence to the empty state.
Definition: CoordinateArraySequence.h:78
const Coordinate & front() const
Return first Coordinate in the sequence.
Definition: CoordinateSequence.h:93