Cesium for Unreal 2.15.0
Loading...
Searching...
No Matches
CesiumUrlTemplateRasterOverlay.h
Go to the documentation of this file.
1// Copyright 2020-2024 CesiumGS, Inc. and Contributors
2
3#pragma once
4
6#include "Components/ActorComponent.h"
7#include "CoreMinimal.h"
8#include "CesiumUrlTemplateRasterOverlay.generated.h"
9
10/**
11 * Specifies the type of projection used for projecting a URL template
12 * raster overlay.
13 */
14UENUM(BlueprintType)
16 /**
17 * The raster overlay is projected using Web Mercator.
18 */
20
21 /**
22 * The raster overlay is projected using a geographic projection.
23 */
25};
26
27/**
28 * A raster overlay that loads tiles from a templated URL.
29 */
30UCLASS(ClassGroup = Cesium, meta = (BlueprintSpawnableComponent))
31class CESIUMRUNTIME_API UCesiumUrlTemplateRasterOverlay
32 : public UCesiumRasterOverlay {
33 GENERATED_BODY()
34
35public:
36 /**
37 * @brief The URL containing template parameters that will be substituted when
38 * loading tiles.
39 *
40 * The following template parameters are supported in `url`:
41 * - `{x}` - The tile X coordinate in the tiling scheme, where 0 is the
42 * westernmost tile.
43 * - `{y}` - The tile Y coordinate in the tiling scheme, where 0 is the
44 * nothernmost tile.
45 * - `{z}` - The level of the tile in the tiling scheme, where 0 is the root
46 * of the quadtree pyramid.
47 * - `{reverseX}` - The tile X coordinate in the tiling scheme, where 0 is the
48 * easternmost tile.
49 * - `{reverseY}` - The tile Y coordinate in the tiling scheme, where 0 is the
50 * southernmost tile.
51 * - `{reverseZ}` - The tile Z coordinate in the tiling scheme, where 0 is
52 * equivalent to `urlTemplateOptions.maximumLevel`.
53 * - `{westDegrees}` - The western edge of the tile in geodetic degrees.
54 * - `{southDegrees}` - The southern edge of the tile in geodetic degrees.
55 * - `{eastDegrees}` - The eastern edge of the tile in geodetic degrees.
56 * - `{northDegrees}` - The northern edge of the tile in geodetic degrees.
57 * - `{minimumX}` - The minimum X coordinate of the tile's projected
58 * coordinates.
59 * - `{minimumY}` - The minimum Y coordinate of the tile's projected
60 * coordinates.
61 * - `{maximumX}` - The maximum X coordinate of the tile's projected
62 * coordinates.
63 * - `{maximumY}` - The maximum Y coordinate of the tile's projected
64 * coordinates.
65 * - `{width}` - The width of each tile in pixels.
66 * - `{height}` - The height of each tile in pixels.
67 */
68 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
69 FString TemplateUrl;
70
71 /**
72 * The type of projection used to project the imagery onto the globe.
73 * For instance, EPSG:4326 uses geographic projection and EPSG:3857 uses Web
74 * Mercator.
75 */
76 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
79
80 /**
81 * Set this to true to specify the quadtree tiling scheme according to the
82 * specified root tile numbers and projected bounding rectangle. If false, the
83 * tiling scheme will be deduced from the projection.
84 */
85 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
87
88 /**
89 * If specified, this determines the number of tiles at the
90 * root of the quadtree tiling scheme in the X direction.
91 *
92 * Only applicable if "Specify Tiling Scheme" is set to true.
93 */
94 UPROPERTY(
95 EditAnywhere,
96 BlueprintReadWrite,
97 Category = "Cesium",
98 meta = (EditCondition = "bSpecifyTilingScheme", ClampMin = 1))
99 int32 RootTilesX = 1;
100
101 /**
102 * If specified, this determines the number of tiles at the
103 * root of the quadtree tiling scheme in the Y direction.
104 *
105 * Only applicable if "Specify Tiling Scheme" is set to true.
106 */
107 UPROPERTY(
108 EditAnywhere,
109 BlueprintReadWrite,
110 Category = "Cesium",
111 meta = (EditCondition = "bSpecifyTilingScheme", ClampMin = 1))
112 int32 RootTilesY = 1;
113
114 /**
115 * The west boundary of the bounding rectangle used for the quadtree tiling
116 * scheme. Specified in longitude degrees in the range [-180, 180].
117 *
118 * Only applicable if "Specify Tiling Scheme" is set to true.
119 */
120 UPROPERTY(
121 Category = "Cesium",
122 EditAnywhere,
123 BlueprintReadWrite,
124 meta =
125 (EditCondition = "bSpecifyTilingScheme",
126 ClampMin = -180.0,
127 ClampMax = 180.0))
128 double RectangleWest = -180;
129
130 /**
131 * The south boundary of the bounding rectangle used for the quadtree tiling
132 * scheme. Specified in latitude degrees in the range [-90, 90].
133 *
134 * Only applicable if "Specify Tiling Scheme" is set to true.
135 */
136 UPROPERTY(
137 Category = "Cesium",
138 Category = "Cesium",
139 EditAnywhere,
140 BlueprintReadWrite,
141 meta =
142 (EditCondition = "bSpecifyTilingScheme",
143 ClampMin = -90.0,
144 ClampMax = 90.0))
145 double RectangleSouth = -90;
146
147 /**
148 * The east boundary of the bounding rectangle used for the quadtree tiling
149 * scheme. Specified in longitude degrees in the range [-180, 180].
150 *
151 * Only applicable if "Specify Tiling Scheme" is set to true.
152 */
153 UPROPERTY(
154 Category = "Cesium",
155 EditAnywhere,
156 BlueprintReadWrite,
157 meta =
158 (EditCondition = "bSpecifyTilingScheme",
159 ClampMin = -180.0,
160 ClampMax = 180.0))
161 double RectangleEast = 180;
162
163 /**
164 * The north boundary of the bounding rectangle used for the quadtree tiling
165 * scheme. Specified in latitude degrees in the range [-90, 90].
166 *
167 * Only applicable if "Specify Tiling Scheme" is set to true.
168 */
169 UPROPERTY(
170 Category = "Cesium",
171 EditAnywhere,
172 BlueprintReadWrite,
173 meta =
174 (EditCondition = "bSpecifyTilingScheme",
175 ClampMin = -90.0,
176 ClampMax = 90.0))
177 double RectangleNorth = 90;
178
179 /**
180 * Minimum zoom level.
181 *
182 * Take care when specifying this that the number of tiles at the minimum
183 * level is small, such as four or less. A larger number is likely to result
184 * in rendering problems.
185 */
186 UPROPERTY(
187 EditAnywhere,
188 BlueprintReadWrite,
189 Category = "Cesium",
190 meta = (ClampMin = 0))
191 int32 MinimumLevel = 0;
192
193 /**
194 * Maximum zoom level.
195 */
196 UPROPERTY(
197 EditAnywhere,
198 BlueprintReadWrite,
199 Category = "Cesium",
200 meta = (ClampMin = 0))
201 int32 MaximumLevel = 25;
202
203 /**
204 * The pixel width of the image tiles.
205 */
206 UPROPERTY(
207 EditAnywhere,
208 BlueprintReadWrite,
209 Category = "Cesium",
210 meta = (ClampMin = 64, ClampMax = 2048))
211 int32 TileWidth = 256;
212
213 /**
214 * The pixel height of the image tiles.
215 */
216 UPROPERTY(
217 EditAnywhere,
218 BlueprintReadWrite,
219 Category = "Cesium",
220 meta = (ClampMin = 64, ClampMax = 2048))
221 int32 TileHeight = 256;
222
223 /**
224 * HTTP headers to be attached to each request made for this raster overlay.
225 */
226 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium")
227 TMap<FString, FString> RequestHeaders;
228
229protected:
230 virtual std::unique_ptr<CesiumRasterOverlays::RasterOverlay> CreateOverlay(
231 const CesiumRasterOverlays::RasterOverlayOptions& options = {}) override;
232};
ECesiumUrlTemplateRasterOverlayProjection
Specifies the type of projection used for projecting a URL template raster overlay.
@ WebMercator
The raster overlay is projected using Web Mercator.
@ Geographic
The raster overlay is projected using a geographic projection.
A raster overlay that loads tiles from a templated URL.
int32 RootTilesX
If specified, this determines the number of tiles at the root of the quadtree tiling scheme in the X ...
double RectangleNorth
The north boundary of the bounding rectangle used for the quadtree tiling scheme.
double RectangleWest
The west boundary of the bounding rectangle used for the quadtree tiling scheme.
int32 RootTilesY
If specified, this determines the number of tiles at the root of the quadtree tiling scheme in the Y ...
FString TemplateUrl
The URL containing template parameters that will be substituted when loading tiles.
double RectangleEast
The east boundary of the bounding rectangle used for the quadtree tiling scheme.
int32 TileHeight
The pixel height of the image tiles.
int32 TileWidth
The pixel width of the image tiles.
double RectangleSouth
The south boundary of the bounding rectangle used for the quadtree tiling scheme.
virtual std::unique_ptr< CesiumRasterOverlays::RasterOverlay > CreateOverlay(const CesiumRasterOverlays::RasterOverlayOptions &options={}) override
ECesiumUrlTemplateRasterOverlayProjection Projection
The type of projection used to project the imagery onto the globe.
TMap< FString, FString > RequestHeaders
HTTP headers to be attached to each request made for this raster overlay.
bool bSpecifyTilingScheme
Set this to true to specify the quadtree tiling scheme according to the specified root tile numbers a...
STL namespace.