15#ifndef GEOS_GEOM_COORDINATE_H
16#define GEOS_GEOM_COORDINATE_H
18#include <geos/export.h>
19#include <geos/platform.h>
20#include <geos/inline.h>
29#pragma warning(disable: 4251)
60class GEOS_DLL Coordinate {
64 static Coordinate _nullCoord;
68 typedef std::set<const Coordinate *, CoordinateLessThen>
ConstSet;
77 typedef std::vector<Coordinate>
Vect;
90 static Coordinate& getNull();
94 Coordinate(
double xNew=0.0,
double yNew=0.0,
double zNew=DoubleNotANumber);
96 bool equals2D(
const Coordinate& other)
const;
99 bool equals(
const Coordinate& other)
const;
116 int hashCode()
const;
158# include "geos/geom/Coordinate.inl"
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
bool equals(const Coordinate &other) const
2D only
std::string toString() const
Returns a string of the form (x,y,z) .
std::vector< const Coordinate * > ConstVect
A vector of const Coordinate pointers.
Definition Coordinate.h:71
std::vector< Coordinate > Vect
A vector of Coordinate objects (real object, not pointers).
Definition Coordinate.h:77
static int hashCode(double d)
double distance(const Coordinate &p) const
double y
y-coordinate
Definition Coordinate.h:83
std::set< const Coordinate *, CoordinateLessThen > ConstSet
A set of const Coordinate pointers.
Definition Coordinate.h:68
double x
x-coordinate
Definition Coordinate.h:80
int compareTo(const Coordinate &other) const
TODO: deprecate this, move logic to CoordinateLessThen instead.
bool equals3D(const Coordinate &other) const
3D comparison
double z
z-coordinate
Definition Coordinate.h:86
std::stack< const Coordinate * > ConstStack
A stack of const Coordinate pointers.
Definition Coordinate.h:74
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
bool operator<(const Coordinate &a, const Coordinate &b)
Strict weak ordering operator for Coordinate.
Definition Coordinate.h:135
GEOS_DLL bool operator==(const Coordinate &a, const Coordinate &b)
Equality operator for Coordinate. 2D only.
GEOS_DLL bool operator!=(const Coordinate &a, const Coordinate &b)
Inequality operator for Coordinate. 2D only.
GEOS_DLL std::ostream & operator<<(std::ostream &os, const Coordinate &c)
Output function.
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25
Strict weak ordering Functor for Coordinate.
Definition Coordinate.h:127