SOCA
GeometryIterator.cc
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2019-2021 UCAR
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  */
7 
11 
12 #include "eckit/config/Configuration.h"
13 #include "eckit/geometry/Point2.h"
14 #include "oops/util/Logger.h"
15 
16 // -----------------------------------------------------------------------------
17 
18 namespace soca {
19 
20 
21 // -----------------------------------------------------------------------------
22 
25 }
26 
27 // -----------------------------------------------------------------------------
28 
30  const int & iindex, const int & jindex) {
31  soca_geom_iter_setup_f90(keyIter_, geom.toFortran(), iindex, jindex);
32 }
33 
34 
35 // -----------------------------------------------------------------------------
36 
39 }
40 
41 // -----------------------------------------------------------------------------
42 
44  int equals = 0;
46  return (equals == 1);
47 }
48 
49 // -----------------------------------------------------------------------------
50 
52  int equals = 0;
54  return (equals == 0);
55 }
56 
57 // -----------------------------------------------------------------------------
58 
59 eckit::geometry::Point2 GeometryIterator::operator*() const {
60  double lat, lon;
62  return eckit::geometry::Point2(lon, lat);
63 }
64 
65 // -----------------------------------------------------------------------------
66 
69  return *this;
70 }
71 
72 // -----------------------------------------------------------------------------
73 
74 void GeometryIterator::print(std::ostream & os) const {
75  double lat, lon;
77  os << "GeometryIterator, lat/lon: " << lat << " / " << lon << std::endl;
78 }
79 
80 // -----------------------------------------------------------------------------
81 
82 } // namespace soca
Geometry handles geometry for SOCA model.
Definition: Geometry.h:48
int & toFortran()
Definition: Geometry.h:61
void print(std::ostream &) const
GeometryIterator(const GeometryIterator &)
bool operator==(const GeometryIterator &) const
GeometryIterator & operator++()
eckit::geometry::Point2 operator*() const
bool operator!=(const GeometryIterator &) const
void soca_geom_iter_current_f90(const F90iter &, double &, double &)
void soca_geom_iter_next_f90(const F90iter &)
void soca_geom_iter_delete_f90(F90iter &)
void soca_geom_iter_setup_f90(F90iter &, const F90geom &, const int &, const int &)
void soca_geom_iter_equals_f90(const F90iter &, const F90iter &, int &)
void soca_geom_iter_clone_f90(F90iter &, const F90iter &)