22 #include <geos/geom/Coordinate.h>
23 #include <geos/export.h>
91 friend class io::Unload;
189 if(modelType == FLOATING) {
193 coord.x = makePrecise(coord.x);
194 coord.y = makePrecise(coord.y);
197 void makePrecise(CoordinateXY* coord)
const
200 return makePrecise(*coord);
234 assert(!(scale < 0));
249 return DoubleNotANumber;
316 std::string toString()
const;
348 void setScale(
double newScale);
363 double gridSize = 0.0;
PrecisionModel(Type nModelType)
double makePrecise(double val) const
Rounds a numeric value to the PrecisionModel grid.
int compareTo(const PrecisionModel *other) const
Compares this PrecisionModel object with the specified object for order.
double getGridSize() const
Definition: PrecisionModel.h:246
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:90
@ FLOATING
Definition: PrecisionModel.h:111
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
double getOffsetX() const
void makePrecise(CoordinateXY &coord) const
Rounds the given Coordinate to the PrecisionModel grid.
Definition: PrecisionModel.h:186
@ FIXED
Definition: PrecisionModel.h:104
PrecisionModel(void)
Creates a PrecisionModel with a default precision of FLOATING.
double getOffsetY() const
double getScale() const
Returns the multiplying factor used to obtain a precise coordinate.
Definition: PrecisionModel.h:232
Type
The types of Precision Model which GEOS supports.
Definition: PrecisionModel.h:96
PrecisionModel(double newScale)
Creates a PrecisionModel with Fixed precision.
Type getType() const
Definition: PrecisionModel.h:226
int getMaximumSignificantDigits() const
Returns the maximum number of significant digits provided by this precision model.
static const double maximumPreciseValue
Definition: PrecisionModel.h:171
PrecisionModel(double newScale, double newOffsetX, double newOffsetY)
Creates a PrecisionModel with Fixed precision.