20 #include <initializer_list> 22 #include "eckit/geometry/Point2.h" 23 #include "eckit/geometry/Point3.h" 25 #include "atlas/util/Earth.h" 29 using Point2 = eckit::geometry::Point2;
30 using Point3 = eckit::geometry::Point3;
32 inline bool operator==(
const Point2& p1,
const Point2& p2 ) {
33 return eckit::geometry::points_equal( p1, p2 );
35 inline bool operator!=(
const Point2& p1,
const Point2& p2 ) {
36 return !eckit::geometry::points_equal( p1, p2 );
40 class PointXY :
public eckit::geometry::Point2 {
41 using array_t = std::array<double, 2>;
49 PointXY( std::initializer_list<double> list ) :
PointXY( list.begin() ) {}
52 double x()
const {
return x_[0]; }
53 double y()
const {
return x_[1]; }
54 double& x() {
return x_[0]; }
55 double& y() {
return x_[1]; }
59 void assign(
double x,
double y ) {
66 class PointXYZ :
public eckit::geometry::Point3 {
67 using array_t = std::array<double, 3>;
84 double x()
const {
return x_[0]; }
85 double y()
const {
return x_[1]; }
86 double z()
const {
return x_[2]; }
87 double& x() {
return x_[0]; }
88 double& y() {
return x_[1]; }
89 double& z() {
return x_[2]; }
93 void assign(
double x,
double y,
double z ) {
104 using array_t = std::array<double, 2>;
107 using Point2::Point2;
116 double lon()
const {
return x_[0]; }
117 double lat()
const {
return x_[1]; }
118 double& lon() {
return x_[0]; }
119 double& lat() {
return x_[1]; }
121 using Point2::assign;
123 void assign(
double lon,
double lat ) {
136 void normalise(
double west );
138 void normalise(
double west,
double east );
143 #ifndef DOXYGEN_SHOULD_SKIP_THIS 150 class VectorPrintSimple;
151 template <
typename T>
155 typedef VectorPrintSimple selector;
159 typedef VectorPrintSimple selector;
163 typedef VectorPrintSimple selector;
167 typedef VectorPrintSimple selector;
171 typedef VectorPrintSimple selector;
Point in arbitrary XYZ-coordinate system.
Definition: Point.h:66
Point in longitude-latitude coordinate system.
Definition: Point.h:103
Point in arbitrary XY-coordinate system.
Definition: Point.h:40
Contains all atlas classes and methods.
Definition: atlas-grids.cc:33