22 #include <geos/geom/Coordinate.h>
23 #include <geos/geom/CoordinateSequence.h>
24 #include <geos/geom/PrecisionModel.h>
55 double minimumVertexDistance;
67 if(ptList->
size() < 1) {
71 double ptDist = pt.distance(lastPt);
72 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(std::size_t i = 0, n = pts.
size(); i < n; ++i) {
150 for(std::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?)";
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:56
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:88
double makePrecise(double val) const
Rounds a numeric value to the PrecisionModel grid.
Definition: OffsetSegmentString.h:41
void closeRing()
Definition: OffsetSegmentString.h:160
geom::CoordinateSequence * getCoordinates()
Definition: OffsetSegmentString.h:183
const T & front() const
Return first Coordinate in the sequence.
Definition: CoordinateSequence.h:356
const T & back() const
Return last Coordinate in the sequence.
Definition: CoordinateSequence.h:342
void add(const T &c)
Definition: CoordinateSequence.h:412
size_t size() const
Returns the number of Coordinates.
Definition: CoordinateSequence.h:185
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25