Debian Codegraph @

src/atlas/projection/detail/ProjProjection.h

raw
1 /*
2 * (C) Copyright 1996- 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
8 * nor does it submit to any jurisdiction.
9 */
10
11
12 #pragma once
13
14 #include <memory>
15
16 #include "atlas/projection/detail/ProjectionImpl.h"
17 #include "atlas/util/Config.h"
18
19 namespace atlas {
20 namespace projection {
21 namespace detail {
22
23 // Forward declaration of Proj, defined in ProjProjection.cc
24 struct Proj;
25
26 class ProjProjection final : public ProjectionImpl {
27 public:
28 ProjProjection(const eckit::Parametrisation&);
29
30 static std::string static_type() { return "proj"; }
31
32 // -- Overridden methods
33
34 std::string type() const override { return static_type(); }
35
36 void xy2lonlat(double[]) const override;
37 void lonlat2xy(double[]) const override;
38
39 Jacobian jacobian(const PointLonLat&) const override;
40
41 PointXYZ xyz(const PointLonLat&) const override;
42
43 bool strictlyRegional() const override { return false; }
44 RectangularLonLatDomain lonlatBoundingBox(const Domain&) const override;
45
46 Spec spec() const override;
47 std::string units() const override;
48 void hash(eckit::Hash&) const override;
49
50 private:
51 Normalise normalise_;
52 std::string proj_string_;
53 std::string source_;
54 std::string geocentric_;
55 bool source_encoded_;
56 bool geocentric_encoded_;
57
58 std::unique_ptr<Proj> proj_;
59
60 Spec extraSpec_;
61 };
62
63
64 } // namespace detail
65 } // namespace projection
66 } // namespace atlas