Debian Codegraph @

src/atlas/projection/detail/LambertAzimuthalEqualAreaProjection.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 #pragma once
12
13 #include "atlas/domain.h"
14 #include "atlas/projection/detail/ProjectionImpl.h"
15
16 namespace atlas {
17 namespace projection {
18 namespace detail {
19
20 class LambertAzimuthalEqualAreaProjection final : public ProjectionImpl {
21 public:
22 // constructor
23 LambertAzimuthalEqualAreaProjection(const eckit::Parametrisation&);
24
25 // projection name
26 static std::string static_type() { return "lambert_azimuthal_equal_area"; }
27 std::string type() const override { return static_type(); }
28
29 // projection and inverse projection
30 void xy2lonlat(double crd[]) const override;
31 void lonlat2xy(double crd[]) const override;
32
33 Jacobian jacobian(const PointLonLat&) const override;
34
35 bool strictlyRegional() const override { return true; }
36 RectangularLonLatDomain lonlatBoundingBox(const Domain& domain) const override {
37 return ProjectionImpl::lonlatBoundingBox(domain);
38 }
39
40 // specification
41 Spec spec() const override;
42
43 std::string units() const override { return "meters"; }
44
45 void hash(eckit::Hash&) const override;
46
47 private:
48 PointLonLat reference_; ///< central longitude/standard parallel [degree]/[degree]
49 double radius_; ///< sphere radius
50
51 double lambda0_; ///< central longitude [rad]
52 double phi1_; ///< standard parallel [rad]
53 double sin_phi1_;
54 double cos_phi1_;
55 double false_northing_{0};
56 double false_easting_{0};
57 };
58
59 } // namespace detail
60 } // namespace projection
61 } // namespace atlas