22#include <geos/geom/Coordinate.h>
23#include <geos/export.h>
185 if(modelType == FLOATING) {
189 coord.x = makePrecise(coord.x);
190 coord.y = makePrecise(coord.y);
193 void makePrecise(CoordinateXY* coord)
const
196 return makePrecise(*coord);
230 assert(!(scale < 0));
245 return DoubleNotANumber;
312 std::string toString()
const;
344 void setScale(
double newScale);
350 static double snapToInt(
double val,
double tolerance);
364 double gridSize = 0.0;
Specifies the precision model of the Coordinate in a Geometry.
Definition PrecisionModel.h:87
double getGridSize() const
Definition PrecisionModel.h:242
double getOffsetY() const
int compareTo(const PrecisionModel *other) const
Compares this PrecisionModel object with the specified object for order.
PrecisionModel(double newScale, double newOffsetX, double newOffsetY)
Creates a PrecisionModel with Fixed precision.
double getScale() const
Returns the multiplying factor used to obtain a precise coordinate.
Definition PrecisionModel.h:228
int getMaximumSignificantDigits() const
Returns the maximum number of significant digits provided by this precision model.
double getOffsetX() const
static const double maximumPreciseValue
Definition PrecisionModel.h:167
PrecisionModel(void)
Creates a PrecisionModel with a default precision of FLOATING.
Type
The types of Precision Model which GEOS supports.
Definition PrecisionModel.h:92
@ FIXED
Definition PrecisionModel.h:100
@ FLOATING
Definition PrecisionModel.h:107
void makePrecise(CoordinateXY &coord) const
Rounds the given Coordinate to the PrecisionModel grid.
Definition PrecisionModel.h:182
PrecisionModel(double newScale)
Creates a PrecisionModel with Fixed precision.
PrecisionModel(Type nModelType)
double makePrecise(double val) const
Rounds a numeric value to the PrecisionModel grid.
Type getType() const
Definition PrecisionModel.h:222
Basic namespace for all GEOS functionalities.
Definition geos.h:38