15 #ifndef GEOS_GEOM_COORDINATE_H
16 #define GEOS_GEOM_COORDINATE_H
18 #include <geos/export.h>
19 #include <geos/constants.h>
20 #include <geos/inline.h>
29 #pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
35 struct CoordinateLessThen;
60 class GEOS_DLL Coordinate {
64 static Coordinate _nullCoord;
68 typedef std::set<const Coordinate*, CoordinateLessThen> ConstSet;
71 typedef std::vector<const Coordinate*> ConstVect;
74 typedef std::stack<const Coordinate*> ConstStack;
77 typedef std::vector<Coordinate> Vect;
94 Coordinate(
double xNew = 0.0,
double yNew = 0.0,
double zNew = DoubleNotANumber);
108 std::string toString()
const;
116 double distanceSquared(
const Coordinate& p)
const;
118 struct GEOS_DLL HashCode {
119 size_t operator()(
const Coordinate & c)
const;
125 struct GEOS_DLL CoordinateLessThen {
127 bool operator()(
const Coordinate* a,
const Coordinate* b)
const;
128 bool operator()(
const Coordinate& a,
const Coordinate& b)
const;
134 operator<(
const Coordinate& a,
const Coordinate& b)
136 return CoordinateLessThen()(a, b);
140 GEOS_DLL std::ostream&
operator<< (std::ostream& os,
const Coordinate& c);
143 GEOS_DLL
bool operator==(
const Coordinate& a,
const Coordinate& b);
146 GEOS_DLL
bool operator!=(
const Coordinate& a,
const Coordinate& b);
158 # include "geos/geom/Coordinate.inl"
161 #endif // ndef GEOS_GEOM_COORDINATE_H
std::ostream & operator<<(std::ostream &os, const Coordinate &c)
Output function.
bool operator!=(const Coordinate &a, const Coordinate &b)
Inequality operator for Coordinate. 2D only.
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
bool operator==(const Coordinate &a, const Coordinate &b)
Equality operator for Coordinate. 2D only.
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:84
bool operator<(const Coordinate &a, const Coordinate &b)
Strict weak ordering operator for Coordinate.
Definition: Coordinate.h:158