olp-cpp-sdk 1.24.0
Loading...
Searching...
No Matches
TileKeyUtils.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 <cstdint>
23#include <vector>
24
25#include <olp/core/geo/coordinates/GeoCoordinates.h>
26#include <olp/core/geo/tiling/TileKey.h>
27
28namespace olp {
29namespace geo {
30
34class CORE_API TileKeyUtils {
35 public:
47 static TileKey GeoCoordinatesToTileKey(const ITilingScheme& tiling_scheme,
48 const GeoCoordinates& geo_point,
49 const std::uint32_t level);
50
61 static std::vector<TileKey> GeoRectangleToTileKeys(
62 const ITilingScheme& tiling_scheme, const GeoRectangle& geo_rectangle,
63 const std::uint32_t level);
64
75 std::uint32_t parent_level);
76
87 const TileKey& sub_tile);
88};
89
98math::AlignedBox3d CORE_API CalculateTileBox(const ITilingScheme& tiling_scheme,
99 const TileKey& tile_key);
100
101} // namespace geo
102} // namespace olp
A geographic location that uses the WGS84 Coordinate System.
Definition GeoCoordinates.h:38
A rectangular area in the WGS84 Coordinate System.
Definition GeoRectangle.h:33
Represents how data is tiled.
Definition ITilingScheme.h:30
Used to get geographic coordinates from tile keys and vise versa.
Definition TileKeyUtils.h:34
static TileKey GeoCoordinatesToTileKey(const ITilingScheme &tiling_scheme, const GeoCoordinates &geo_point, const std::uint32_t level)
Gets the key of the tile that contains geographic coordinates.
static std::vector< TileKey > GeoRectangleToTileKeys(const ITilingScheme &tiling_scheme, const GeoRectangle &geo_rectangle, const std::uint32_t level)
Gets the keys of the tile that overlaps with a geographic rectangle.
static TileKey GetRelativeSubTileKey(const geo::TileKey &key, std::uint32_t parent_level)
Gets the tile key that is a relative of a given parent.
static TileKey GetAbsoluteSubTileKey(const TileKey &parent, const TileKey &sub_tile)
Merges the given parent tile key and the child tile key into an absolute tile key.
Addresses a tile in a quadtree.
Definition TileKey.h:63
The aligned bounding-box implementation.
Definition AlignedBox.h:98
Rules all the other namespaces.
Definition AppleSignInProperties.h:24