olp-cpp-sdk  1.22.0
IdentityProjection.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 
25 namespace olp {
26 namespace geo {
34 class CORE_API IdentityProjection final : public IProjection {
35  public:
36  IdentityProjection() = default;
37  ~IdentityProjection() override = default;
38 
39  GeoRectangle GetGeoBounds() const override;
40 
41  WorldAlignedBox WorldExtent(double minimum_altitude,
42  double maximum_altitude) const override;
43 
44  bool Project(const GeoCoordinates3d& geo_point,
45  WorldCoordinates& world_point) const override;
46 
47  bool Unproject(const WorldCoordinates& world_point,
48  GeoCoordinates3d& geo_point) const override;
49 };
50 
51 } // namespace geo
52 } // 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
The identity projection used to work with geographic and world coordinates.
Definition: IdentityProjection.h:34
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.
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...
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