olp-cpp-sdk 1.24.0
Loading...
Searching...
No Matches
SphereProjection.h
1/*
2 * Copyright (C) 2019-2020 HERE Europe B.V.
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 * SPDX-License-Identifier: Apache-2.0
17 * License-Filename: LICENSE
18 */
19
20#pragma once
21
22#include <olp/core/CoreApi.h>
23#include <olp/core/geo/projection/IProjection.h>
24
25namespace olp {
26namespace geo {
27
41class CORE_API SphereProjection final : public IProjection {
42 public:
43 SphereProjection() = default;
44 ~SphereProjection() override = default;
45
46 GeoRectangle GetGeoBounds() const override;
47
48 WorldAlignedBox WorldExtent(double minimum_altitude,
49 double maximum_altitude) const override;
50
51 bool Project(const GeoCoordinates3d& geo_point,
52 WorldCoordinates& world_point) const override;
53
54 bool Unproject(const WorldCoordinates& world_point,
55 GeoCoordinates3d& geo_point) const override;
56};
57
58} // namespace geo
59} // namespace olp
Geodetic coordinates with longitude, latitude, and altitude.
Definition GeoCoordinates3d.h:31
A rectangular area in the WGS84 Coordinate System.
Definition GeoRectangle.h:33
The identity projection used to work with geographic and world coordinates.
Definition IProjection.h:31
A projection of geographic coordinates onto a sphere using the Earth radius.
Definition SphereProjection.h:41
bool Unproject(const WorldCoordinates &world_point, GeoCoordinates3d &geo_point) const override
Checks whether the world coordinates (x,y,z) of a point correspond to its geographic coordinates (lat...
bool Project(const GeoCoordinates3d &geo_point, WorldCoordinates &world_point) const override
Checks whether the geographic coordinates (latitude, longitude, altitude) of a point correspond to it...
WorldAlignedBox WorldExtent(double minimum_altitude, double maximum_altitude) const override
Creates the extent of world coordinates.
GeoRectangle GetGeoBounds() const override
Gets the geodetic bounds represented by the projection.
The aligned bounding-box implementation.
Definition AlignedBox.h:98
Rules all the other namespaces.
Definition AppleSignInProperties.h:24
Represents 3D vectors and points.
Definition Vector.h:86