olp-cpp-sdk  1.22.0
TilingScheme.h
1 /*
2  * Copyright (C) 2019-2021 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/geo/tiling/ITilingScheme.h>
23 
24 namespace olp {
25 namespace geo {
26 
33 template <class TSubdivisionScheme, class TProjection>
34 class TilingScheme : public ITilingScheme {
35  public:
37  using SubdivisionScheme = TSubdivisionScheme;
39  using Projection = TProjection;
40 
41  TilingScheme() = default;
42  ~TilingScheme() override = default;
43 
45  const ISubdivisionScheme& GetSubdivisionScheme() const override {
46  return subdivision_scheme_;
47  }
48 
50  const IProjection& GetProjection() const override { return projection_; }
51 
52  private:
53  SubdivisionScheme subdivision_scheme_{};
54  Projection projection_{};
55 };
56 
57 } // namespace geo
58 } // namespace olp
The identity projection used to work with geographic and world coordinates.
Definition: IProjection.h:31
An abstract tiling subdivision scheme.
Definition: ISubdivisionScheme.h:33
Represents how data is tiled.
Definition: ITilingScheme.h:30
Represents how data is tiled.
Definition: TilingScheme.h:34
TSubdivisionScheme SubdivisionScheme
An alias for the subdivision scheme used by this tiling scheme.
Definition: TilingScheme.h:37
const ISubdivisionScheme & GetSubdivisionScheme() const override
Gets the subdivision scheme.
Definition: TilingScheme.h:45
const IProjection & GetProjection() const override
Gets the identity projection.
Definition: TilingScheme.h:50
TProjection Projection
An alias for the projection used by this tiling scheme.
Definition: TilingScheme.h:39
Rules all the other namespaces.
Definition: AppleSignInProperties.h:24