22 #include <geos/geom/Coordinate.h> 23 #include <geos/export.h> 89 friend class io::Unload;
146 PrecisionModel(
double newScale,
double newOffsetX,
double newOffsetY);
181 double makePrecise(
double val)
const;
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);
206 bool isFloating()
const;
218 int getMaximumSignificantDigits()
const;
232 assert(!(scale < 0));
247 return DoubleNotANumber;
261 double getOffsetX()
const;
269 double getOffsetY()
const;
314 std::string toString()
const;
346 void setScale(
double newScale);
352 static double snapToInt(
double val,
double tolerance);
366 double gridSize = 0.0;
void makePrecise(CoordinateXY &coord) const
Rounds the given Coordinate to the PrecisionModel grid.
Definition: PrecisionModel.h:184
static const double maximumPreciseValue
Definition: PrecisionModel.h:169
Definition: PrecisionModel.h:102
Specifies the precision model of the Coordinate in a Geometry.
Definition: PrecisionModel.h:88
double getScale() const
Returns the multiplying factor used to obtain a precise coordinate.
Definition: PrecisionModel.h:230
Type
The types of Precision Model which GEOS supports.
Definition: PrecisionModel.h:94
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25
Type getType() const
Definition: PrecisionModel.h:224
Definition: PrecisionModel.h:109
double getGridSize() const
Definition: PrecisionModel.h:244