Loading...
Searching...
No Matches
projection_parameters.hpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2023, NVIDIA CORPORATION.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include <cuproj/ellipsoid.hpp>
20
21namespace cuproj {
22
31enum class hemisphere { NORTH, SOUTH };
32
41template <typename T>
44 ellipsoid<T> const& e, int utm_zone, hemisphere utm_hemisphere, T lam0, T prime_meridian_offset)
45 : ellipsoid_(e),
46 utm_zone_(utm_zone),
47 utm_hemisphere_{utm_hemisphere},
48 lam0_(lam0),
49 prime_meridian_offset_(prime_meridian_offset)
50 {
51 }
52
54 int utm_zone_{-1};
55 hemisphere utm_hemisphere_{hemisphere::NORTH};
56 T lam0_{};
58
59 T k0{}; // scaling
60 T phi0{}; // central parallel
61 T x0{}; // false easting
62 T y0{}; // false northing
63
64 struct tmerc_params {
65 T Qn{}; // Meridian quadrant, scaled to the projection
66 T Zb{}; // Radius vector in polar coord. systems
67 T cgb[6]{}; // Constants for Gauss -> Geo lat
68 T cbg[6]{}; // Constants for Geo lat -> Gauss
69 T utg[6]{}; // Constants for transverse Mercator -> geo
70 T gtu[6]{}; // Constants for geo -> transverse Mercator
71 };
72
73 tmerc_params tmerc_params_{};
74};
75
80} // namespace cuproj
hemisphere
Hemisphere identifier for projections.
Ellipsoid parameters.
Definition ellipsoid.hpp:35
T prime_meridian_offset_
Offset from Greenwich.
ellipsoid< T > ellipsoid_
Ellipsoid parameters.
hemisphere utm_hemisphere_
UTM hemisphere.