FV3 Bundle
GeoLocation.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2009-2016 ECMWF.
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  * In applying this licence, ECMWF does not waive the privileges and immunities
7  * granted to it by virtue of its status as an intergovernmental organisation nor
8  * does it submit to any jurisdiction.
9  */
10 
11 #ifndef OOPS_BASE_GEOLOCATION_H_
12 #define OOPS_BASE_GEOLOCATION_H_
13 
14 #include <string>
15 
16 #include "oops/util/Printable.h"
17 
18 namespace oops {
19 
20 class GeoLocation: public util::Printable {
21  public:
22  GeoLocation(const double lon, const double lat):lon_(lon), lat_(lat) {}
24 
25  void getLoc(double& lon, double& lat) const {lon = lon_; lat = lat_;}
26 
27  private:
28  void print(std::ostream & os) const { os << "location: " << lon_ << ", " << lat_ << std::endl; }
29  double lon_, lat_;
30 };
31 
32 } // namespace oops
33 
34 #endif // OOPS_BASE_GEOLOCATION_H_
void print(std::ostream &os) const
Definition: GeoLocation.h:28
real(fvprc), dimension(:), allocatable lon
The namespace for the main oops code.
real(fvprc), dimension(:), allocatable lat
void getLoc(double &lon, double &lat) const
Definition: GeoLocation.h:25
GeoLocation(const double lon, const double lat)
Definition: GeoLocation.h:22