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;
Specifies the precision model of the Coordinate in a Geometry.
Definition PrecisionModel.h:90
double getGridSize() const
Definition PrecisionModel.h:246
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:232
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:171
PrecisionModel(void)
Creates a PrecisionModel with a default precision of FLOATING.
Type
The types of Precision Model which GEOS supports.
Definition PrecisionModel.h:96
@ FIXED
Definition PrecisionModel.h:104
@ FLOATING
Definition PrecisionModel.h:111
void makePrecise(CoordinateXY &coord) const
Rounds the given Coordinate to the PrecisionModel grid.
Definition PrecisionModel.h:186
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:226
Basic namespace for all GEOS functionalities.
Definition geos.h:39