22 #include <geos/geom/Coordinate.h>
23 #include <geos/export.h>
89 friend class io::Unload;
187 if(modelType == FLOATING) {
191 coord.x = makePrecise(coord.x);
192 coord.y = makePrecise(coord.y);
195 void makePrecise(CoordinateXY* coord)
const
198 return makePrecise(*coord);
232 assert(!(scale < 0));
247 return DoubleNotANumber;
314 std::string toString()
const;
346 void setScale(
double newScale);
352 static double snapToInt(
double val,
double tolerance);
366 double gridSize = 0.0;
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:88
double getGridSize() const
Definition: PrecisionModel.h:244
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:230
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:169
PrecisionModel(void)
Creates a PrecisionModel with a default precision of FLOATING.
Type
The types of Precision Model which GEOS supports.
Definition: PrecisionModel.h:94
@ FIXED
Definition: PrecisionModel.h:102
@ FLOATING
Definition: PrecisionModel.h:109
void makePrecise(CoordinateXY &coord) const
Rounds the given Coordinate to the PrecisionModel grid.
Definition: PrecisionModel.h:184
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:224
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25