Cesium for Unreal 2.18.0
Loading...
Searching...
No Matches
CesiumGeoJsonObjectIterator.h
Go to the documentation of this file.
1#pragma once
2
4
5#include "CesiumGeoJsonObjectIterator.generated.h"
6
7/**
8 * Iterates over a GeoJSON object, returning the object itself and all of its
9 * children (and their children, and so on).
10 */
11USTRUCT(BlueprintType)
13 GENERATED_BODY()
14
15 /** @brief Creates an iterator that will return no objects. */
17
18 /** @brief Creates a new iterator to iterate over the given object. */
20
21private:
23 CesiumVectorData::ConstGeoJsonObjectIterator _iterator;
24
26};
27
28UCLASS()
30 : public UBlueprintFunctionLibrary {
31 GENERATED_BODY()
32
33public:
34 /**
35 * Creates an iterator over the GeoJSON object that will return this object
36 * and any children (and children of those children, and so on).
37 */
38 UFUNCTION(
39 BlueprintCallable,
40 Category = "Cesium|Vector|Object",
41 meta = (DisplayName = "Create GeoJSON Object Iterator"))
44
45 /**
46 * Moves the iterator to the next available GeoJSON object and returns that
47 * object. If no more objects are available, an invalid FCesiumGeoJsonObject
48 * is returned.
49 */
50 UFUNCTION(
51 BlueprintCallable,
52 Category = "Cesium|Vector|Iterator",
53 meta = (DisplayName = "Next (Object Iterator)"))
54 static FCesiumGeoJsonObject Next(UPARAM(Ref)
56
57 /**
58 * Checks if this iterator has ended (no further objects available).
59 */
60 UFUNCTION(
61 BlueprintCallable,
62 BlueprintPure,
63 Category = "Cesium|Vector|Iterator",
64 meta = (DisplayName = "Is Ended (Object Iterator)"))
65 static bool IsEnded(const FCesiumGeoJsonObjectIterator& Iterator);
66
67 /**
68 * Gets the feature the current object belongs to, if any.
69 *
70 * This will be the first parent of this object that is a feature.
71 * For example, with a document with a hierarchy like:
72 * - FeatureCollection -> Feature -> GeometryCollection -> Point
73 * Calling GetFeature on the Point, GeometryCollection, or Feature will both
74 * return the same Feature object. Calling GetFeature on the FeatureCollection
75 * will return an invalid feature as there is no parent feature.
76 */
77 UFUNCTION(
78 BlueprintCallable,
79 Category = "Cesium|Vector|Iterator",
80 meta = (DisplayName = "Get Feature From GeoJSON Object Iterator"))
83};
84
85/**
86 * Iterates over every Point value in a GeoJSON object and all of its children.
87 */
88USTRUCT(BlueprintType)
90 GENERATED_BODY()
91
92 /** @brief Creates an iterator that will return no points. */
94
95 /** @brief Creates a new iterator to iterate over the given object. */
97
98private:
100 CesiumVectorData::ConstGeoJsonPointIterator _iterator;
101
103};
104
105UCLASS()
107 : public UBlueprintFunctionLibrary {
108 GENERATED_BODY()
109
110public:
111 /**
112 * Creates an iterator over the GeoJSON object that will return any point
113 * values in the object and any of its children.
114 */
115 UFUNCTION(
116 BlueprintCallable,
117 Category = "Cesium|Vector|Object",
118 meta = (DisplayName = "Create GeoJSON Point Iterator"))
121
122 /**
123 * Moves the iterator to the next available point value and returns that
124 * point. If no more points are available, a zero vector is returned.
125 */
126 UFUNCTION(
127 BlueprintCallable,
128 Category = "Cesium|Vector|Iterator",
129 meta = (DisplayName = "Next (Point Iterator)"))
130 static FVector Next(UPARAM(Ref) FCesiumGeoJsonPointIterator& Iterator);
131
132 /**
133 * Checks if this iterator has ended (no further points available).
134 */
135 UFUNCTION(
136 BlueprintCallable,
137 BlueprintPure,
138 Category = "Cesium|Vector|Iterator",
139 meta = (DisplayName = "Is Ended (Point Iterator)"))
140 static bool IsEnded(const FCesiumGeoJsonPointIterator& Iterator);
141};
142
143/**
144 * Iterates over every LineString value in a GeoJSON object and all of its
145 * children.
146 */
147USTRUCT(BlueprintType)
149 GENERATED_BODY()
150
151 /** @brief Creates an iterator that will return no line strings. */
153
154 /** @brief Creates a new iterator to iterate over the given object. */
156
157private:
158 FCesiumGeoJsonObject _object;
159 CesiumVectorData::ConstGeoJsonLineStringIterator _iterator;
160
162};
163
164UCLASS()
166 : public UBlueprintFunctionLibrary {
167 GENERATED_BODY()
168
169public:
170 /**
171 * Creates an iterator over the GeoJSON object that will return any line
172 * string values in the object and any of its children.
173 */
174 UFUNCTION(
175 BlueprintCallable,
176 Category = "Cesium|Vector|Object",
177 meta = (DisplayName = "Create GeoJSON LineString Iterator"))
180
181 /**
182 * Moves the iterator to the next available line string value and returns that
183 * line string. If no more line strings are available, an empty line is
184 * returned.
185 */
186 UFUNCTION(
187 BlueprintCallable,
188 Category = "Cesium|Vector|Iterator",
189 meta = (DisplayName = "Next (LineString Iterator)"))
192
193 /**
194 * Checks if this iterator has ended (no further line strings available).
195 */
196 UFUNCTION(
197 BlueprintCallable,
198 BlueprintPure,
199 Category = "Cesium|Vector|Iterator",
200 meta = (DisplayName = "Is Ended (LineString Iterator)"))
201 static bool IsEnded(const FCesiumGeoJsonLineStringIterator& Iterator);
202};
203
204/**
205 * Iterates over every Polygon value in a GeoJSON object and all of its
206 * children.
207 */
208USTRUCT(BlueprintType)
210 GENERATED_BODY()
211
212 /** @brief Creates an iterator that will return no polygons. */
214
215 /** @brief Creates a new iterator to iterate over the given object. */
217
218private:
219 FCesiumGeoJsonObject _object;
220 CesiumVectorData::ConstGeoJsonPolygonIterator _iterator;
221
223};
224
225UCLASS()
227 : public UBlueprintFunctionLibrary {
228 GENERATED_BODY()
229
230public:
231 /**
232 * Creates an iterator over the GeoJSON object that will return any polygon
233 * values in the object and any of its children.
234 */
235 UFUNCTION(
236 BlueprintCallable,
237 Category = "Cesium|Vector|Object",
238 meta = (DisplayName = "Create GeoJSON Polygon Iterator"))
241
242 /**
243 * Moves the iterator to the next available polygon value and returns that
244 * polygon. If no more polygons are available, an empty polygon is
245 * returned.
246 */
247 UFUNCTION(
248 BlueprintCallable,
249 Category = "Cesium|Vector|Iterator",
250 meta = (DisplayName = "Next (Polygon Iterator)"))
252 Next(UPARAM(Ref) FCesiumGeoJsonPolygonIterator& Iterator);
253
254 /**
255 * Checks if this iterator has ended (no further polygons available).
256 */
257 UFUNCTION(
258 BlueprintCallable,
259 BlueprintPure,
260 Category = "Cesium|Vector|Iterator",
261 meta = (DisplayName = "Is Ended (Polygon Iterator)"))
262 static bool IsEnded(const FCesiumGeoJsonPolygonIterator& Iterator);
263};
static FCesiumGeoJsonLineStringIterator Iterate(const FCesiumGeoJsonObject &Object)
Creates an iterator over the GeoJSON object that will return any line string values in the object and...
static bool IsEnded(const FCesiumGeoJsonLineStringIterator &Iterator)
Checks if this iterator has ended (no further line strings available).
static FCesiumGeoJsonLineString Next(UPARAM(Ref) FCesiumGeoJsonLineStringIterator &Iterator)
Moves the iterator to the next available line string value and returns that line string.
static FCesiumGeoJsonObject Next(UPARAM(Ref) FCesiumGeoJsonObjectIterator &Iterator)
Moves the iterator to the next available GeoJSON object and returns that object.
static FCesiumGeoJsonFeature GetFeature(UPARAM(Ref) FCesiumGeoJsonObjectIterator &Iterator)
Gets the feature the current object belongs to, if any.
static bool IsEnded(const FCesiumGeoJsonObjectIterator &Iterator)
Checks if this iterator has ended (no further objects available).
static FCesiumGeoJsonObjectIterator Iterate(const FCesiumGeoJsonObject &Object)
Creates an iterator over the GeoJSON object that will return this object and any children (and childr...
static bool IsEnded(const FCesiumGeoJsonPointIterator &Iterator)
Checks if this iterator has ended (no further points available).
static FVector Next(UPARAM(Ref) FCesiumGeoJsonPointIterator &Iterator)
Moves the iterator to the next available point value and returns that point.
static FCesiumGeoJsonPointIterator Iterate(const FCesiumGeoJsonObject &Object)
Creates an iterator over the GeoJSON object that will return any point values in the object and any o...
static FCesiumGeoJsonPolygonIterator Iterate(const FCesiumGeoJsonObject &Object)
Creates an iterator over the GeoJSON object that will return any polygon values in the object and any...
static FCesiumGeoJsonPolygon Next(UPARAM(Ref) FCesiumGeoJsonPolygonIterator &Iterator)
Moves the iterator to the next available polygon value and returns that polygon.
static bool IsEnded(const FCesiumGeoJsonPolygonIterator &Iterator)
Checks if this iterator has ended (no further polygons available).
a GeoJson "Feature" object.
Iterates over every LineString value in a GeoJSON object and all of its children.
FCesiumGeoJsonLineStringIterator()
Creates an iterator that will return no line strings.
A FCesiumGeoJsonLineString is a set of points representing a line.
Iterates over a GeoJSON object, returning the object itself and all of its children (and their childr...
FCesiumGeoJsonObjectIterator()
Creates an iterator that will return no objects.
A single object in the GeoJSON document.
Iterates over every Point value in a GeoJSON object and all of its children.
FCesiumGeoJsonPointIterator()
Creates an iterator that will return no points.
Iterates over every Polygon value in a GeoJSON object and all of its children.
FCesiumGeoJsonPolygonIterator()
Creates an iterator that will return no polygons.
A FCesiumGeoJsonPolygon is a polygon made up of one or more linear rings.