Debian Codegraph @

src/atlas/projection/detail/LambertConformalConicProjection.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 LambertConformalConicProjection final : public ProjectionImpl {
21 public:
22 // constructor
23 LambertConformalConicProjection(const eckit::Parametrisation&);
24
25 // projection name
26 static std::string static_type() { return "lambert_conformal_conic"; }
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
37 RectangularLonLatDomain lonlatBoundingBox(const Domain& domain) const override {
38 return ProjectionImpl::lonlatBoundingBox(domain);
39 }
40
41 // specification
42 Spec spec() const override;
43
44 std::string units() const override { return "meters"; }
45
46 void hash(eckit::Hash&) const override;
47
48 private:
49 double radius_; ///< sphere radius
50 double lat1_; ///< first latitude from the pole at which the secant cone cuts the sphere
51 double lat2_; ///< second latitude from the pole at which the secant cone cuts the sphere
52 double lat0_; ///< latitude of origin, where Dx and Dy are specified
53 double lon0_; ///< longitude of origin, meridian parallel to y-axis along which latitude increases
54 /// as the y-coordinate increases
55
56 double F_;
57 double n_;
58 double inv_n_;
59 double rho0_;
60 double sign_;
61 };
62
63 } // namespace detail
64 } // namespace projection
65 } // namespace atlas