21 #ifndef GEOS_OP_BUFFER_OFFSETSEGMENTSTRING_H
22 #define GEOS_OP_BUFFER_OFFSETSEGMENTSTRING_H
24 #include <geos/geom/Coordinate.h>
25 #include <geos/geom/CoordinateSequence.h>
26 #include <geos/geom/CoordinateArraySequence.h>
27 #include <geos/geom/PrecisionModel.h>
59 double minimumVertexDistance;
70 if (ptList->size() < 1)
74 if (ptDist < minimumVertexDistance)
88 minimumVertexDistance (0.0)
99 if ( ptList ) ptList->
clear();
102 precisionModel = NULL;
103 minimumVertexDistance = 0.0;
108 precisionModel = nPrecisionModel;
111 void setMinimumVertexDistance(
double nMinVertexDistance)
113 minimumVertexDistance = nMinVertexDistance;
118 assert(precisionModel);
123 if (isRedundant(bufPt))
130 ptList->
add(bufPt,
true);
136 for (
size_t i=0, n=pts.size(); i<n; ++i) {
140 for (
size_t i=pts.size(); i>0; --i) {
151 if (ptList->size() < 1)
return;
154 if (startPt.
equals(lastPt))
return;
156 ptList->
add(startPt,
true);
175 inline int size()
const {
return ptList ? ptList->size() : 0 ; }
179 inline std::ostream& operator<< (std::ostream& os,
180 const OffsetSegmentString& lst)
188 os <<
"empty (consumed?)";
198 #endif // ndef GEOS_OP_BUFFER_OFFSETSEGMENTSTRING_H
The default implementation of CoordinateSequence.
Definition: CoordinateArraySequence.h:38
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:61
A dynamic list of the vertices in a constructed offset curve.
Definition: OffsetSegmentString.h:44
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:88
void closeRing()
Check that points are a ring.
Definition: OffsetSegmentString.h:149
geom::CoordinateSequence * getCoordinates()
Get coordinates by taking ownership of them.
Definition: OffsetSegmentString.h:167
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:60
void clear()
Reset this CoordinateArraySequence to the empty state.
Definition: CoordinateArraySequence.h:77
const Coordinate & front() const
Return first Coordinate in the sequence.
Definition: CoordinateSequence.h:94