Peano
Loading...
Searching...
No Matches
ProjectionAEA.h
Go to the documentation of this file.
1// This file is part of the ExaHyPE2 project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5#include <cstddef>
6
7// TODO: Using std=c++23 constexpr would be possible
8
9namespace projection::AEA {
10 namespace ellipsoid {
11 /*
12 * @brief
13 * Projects geographic coordinates (longitude, latitude) onto a planar surface
14 * using the Albers Equal-Area Conic projection for the WGS_1984 ellipsoid.
15 *
16 * This implementation is based on the equations provided in USGS Professional Paper 1395.
17 * It supports standard parallels and is suitable for regional-scale mapping where
18 * area preservation is important.
19 *
20 * @see https://doi.org/10.3133/pp1395
21 */
22 template <auto EllipsoidA, auto EllipsoidE, auto StdParallel1Deg, auto StdParallel2Deg, auto Lon0Deg, auto Lat0Deg>
23 static inline auto forward(const auto lonDeg, const auto latDeg);
24
35 template <
36 auto EllipsoidA,
37 auto EllipsoidE,
38 auto StdParallel1Deg,
39 auto StdParallel2Deg,
40 auto Lon0Deg,
41 auto Lat0Deg,
42 auto MaxIter = 10,
43 auto Tolerance = 1e-12>
44 static inline auto inverse(const auto x, const auto y);
45 } // namespace ellipsoid
46
47 namespace sphere {
58 template <auto Lon0Deg, auto Lat0Deg, auto StdParallel1Deg, auto StdParallel2Deg, auto EarthRadius>
59 static inline auto forward(const auto lon, const auto lat);
60
71 template <auto Lon0Deg, auto Lat0Deg, auto StdParallel1Deg, auto StdParallel2Deg, auto EarthRadius>
72 static inline auto inverse(const auto x, const auto y);
73 } // namespace sphere
74} // namespace projection::AEA
75
76#include "ProjectionAEA.cpph"
static auto forward(const auto lonDeg, const auto latDeg)
static auto inverse(const auto x, const auto y)
Inverts the Albers Equal-Area Conic projection for WGS_1984 and returns the geographic coordinates (l...
static auto forward(const auto lon, const auto lat)
Projects geographic coordinates (longitude, latitude) onto a planar surface using the Albers Equal-Ar...
static auto inverse(const auto x, const auto y)
Inverts the spherical Albers Equal-Area Conic projection and returns the geographic coordinates (long...