5#include "CesiumUtility/IntrusivePointer.h"
6#include "CesiumVectorData/GeoJsonDocument.h"
7#include "CesiumVectorData/GeoJsonObject.h"
9#include "JsonObjectWrapper.h"
10#include "Kismet/BlueprintFunctionLibrary.h"
11#include "Templates/SharedPointer.h"
13#include <glm/ext/vector_double3.hpp>
16#include "CesiumGeoJsonObject.generated.h"
36 const std::shared_ptr<CesiumVectorData::GeoJsonDocument>& doc,
37 const CesiumVectorData::GeoJsonObject* pObject)
38 : _pDocument(doc), _pObject(pObject) {}
40 const std::shared_ptr<CesiumVectorData::GeoJsonDocument>&
42 return this->_pDocument;
45 const CesiumVectorData::GeoJsonObject*
getObject()
const {
46 return this->_pObject;
50 std::shared_ptr<CesiumVectorData::GeoJsonDocument> _pDocument;
51 const CesiumVectorData::GeoJsonObject* _pObject;
87 const
std::shared_ptr<CesiumVectorData::GeoJsonDocument>& document,
88 const CesiumVectorData::GeoJsonFeature* feature);
91 std::shared_ptr<CesiumVectorData::GeoJsonDocument> _pDocument;
92 const CesiumVectorData::GeoJsonFeature* _pFeature;
127 Category =
"Cesium|Vector|Feature")
138 Category =
"Cesium|Vector|Feature")
148 Category =
"Cesium|Vector|Feature")
157 Category =
"Cesium|Vector|Feature")
158 static FJsonObjectWrapper
168 Category =
"Cesium|Vector|Feature")
178 Category =
"Cesium|Vector|Feature")
186USTRUCT(BlueprintType)
201 const std::shared_ptr<CesiumVectorData::GeoJsonDocument>& document,
202 const std::vector<std::vector<glm::dvec3>>* rings)
203 : _document(document), _rings(rings) {}
206 std::shared_ptr<CesiumVectorData::GeoJsonDocument> _document;
207 const std::vector<std::vector<glm::dvec3>>* _rings;
215USTRUCT(BlueprintType)
233 UPROPERTY(BlueprintReadOnly, Category =
"Cesium|Vector|Polygon")
239 : public UBlueprintFunctionLibrary {
248 UFUNCTION(BlueprintCallable, Category =
"Cesium|Vector|Polygon")
249 static TArray<FCesiumGeoJsonLineString>
275 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Cesium|Vector|Object")
282 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Cesium|Vector|Object")
292 Category =
"Cesium|Vector|Object",
293 Meta = (ExpandEnumAsExecs =
"Branches"))
303 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Cesium|Vector|Object")
304 static FJsonObjectWrapper
311 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Cesium|Vector|Object")
319 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Cesium|Vector|Object")
320 static TArray<FVector>
328 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Cesium|Vector|Object")
337 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Cesium|Vector|Object")
346 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Cesium|Vector|Object")
355 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Cesium|Vector|Object")
364 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Cesium|Vector|Object")
373 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Cesium|Vector|Object")
382 UFUNCTION(BlueprintCallable, BlueprintPure, Category =
"Cesium|Vector|Object")
393 Category =
"Cesium|Vector|Object",
394 Meta = (ExpandEnumAsExecs =
"Branches"))
401 UFUNCTION(BlueprintCallable, Category =
"Cesium|Vector|Object")
414 UFUNCTION(BlueprintCallable, Category =
"Cesium|Vector|Object")
ECesiumGeoJsonObjectType
The supported GeoJSON object types.
ECesiumGeoJsonFeatureIdType
The type of a feature's ID field.
@ String
The feature's ID is a string.
@ Integer
The feature's ID is an integer.
EHasValue
Enum used for branching when a UFUNCTION could return a value or could return no value.
static FCesiumGeoJsonObject GetGeometry(const FCesiumGeoJsonFeature &InFeature)
Obtains the FCesiumGeoJsonObject specified as the geometry of this feature, if any.
static ECesiumGeoJsonFeatureIdType GetIdType(const FCesiumGeoJsonFeature &InFeature)
Returns true if this feature's.
static FString GetIdAsString(const FCesiumGeoJsonFeature &InFeature)
Returns the ID of the provided feature, or an empty string if no ID was present.
static FJsonObjectWrapper GetProperties(const FCesiumGeoJsonFeature &InFeature)
Obtains the properties attached to this feature, if any.
static bool IsValid(const FCesiumGeoJsonFeature &InFeature)
Checks if this FCesiumGeoJsonFeature is valid or not.
static int64 GetIdAsInteger(const FCesiumGeoJsonFeature &InFeature)
Returns the ID of the provided feature, or -1 if no ID was present or if the ID is not an integer.
A Blueprint Funciton Library for interacting with FCesiumVectorNode values.
static FCesiumGeoJsonPolygon GetObjectAsPolygon(const FCesiumGeoJsonObject &InObject)
If this object is a GeoJSON Polygon type, this returns a FCesiumGeoJsonPolygon representing that line...
static void ClearStyle(UPARAM(Ref) FCesiumGeoJsonObject &InObject)
Removes any existing style on the given GeoJSON object.
static void SetStyle(UPARAM(Ref) FCesiumGeoJsonObject &InObject, const FCesiumVectorStyle &InStyle)
Sets the style of the given FCesiumGeoJsonObject.
static TArray< FVector > GetObjectAsMultiPoint(const FCesiumGeoJsonObject &InObject)
If this object is a GeoJSON MultiPoint type, this returns the array of coordinates on that MultiPoint...
static FCesiumGeoJsonLineString GetObjectAsLineString(const FCesiumGeoJsonObject &InObject)
If this object is a GeoJSON LineString type, this returns a FCesiumGeoJsonLineString representing tha...
static TArray< FCesiumGeoJsonFeature > GetObjectAsFeatureCollection(const FCesiumGeoJsonObject &InObject)
If this object is a GeoJSON FeatureCollection type, this returns an array of FCesiumGeoJsonFeature ob...
static FJsonObjectWrapper GetForeignMembers(const FCesiumGeoJsonObject &InObject)
Obtains any foreign members on this GeoJSON object.
static FBox GetBoundingBox(const FCesiumGeoJsonObject &InObject, EHasValue &Branches)
Attempts to obtain this GeoJSON object's bounding box.
static TArray< FCesiumGeoJsonObject > GetObjectAsGeometryCollection(const FCesiumGeoJsonObject &InObject)
If this object is a GeoJSON GeometryCollection type, this returns an array of FCesiumGeoJsonObject ob...
static FCesiumGeoJsonFeature GetObjectAsFeature(const FCesiumGeoJsonObject &InObject)
If this object is a GeoJSON Feature type, this returns a FCesiumGeoJsonFeature representing that feat...
static bool IsValid(const FCesiumGeoJsonObject &InObject)
Checks if the provided GeoJSON object is valid.
static FVector GetObjectAsPoint(const FCesiumGeoJsonObject &InObject)
If this object is a GeoJSON Point type, this returns the coordinates of that Point.
static FCesiumVectorStyle GetStyle(const FCesiumGeoJsonObject &InObject, EHasValue &Branches)
Returns the FCesiumVectorStyle attached to this object, if any.
static TArray< FCesiumGeoJsonLineString > GetObjectAsMultiLineString(const FCesiumGeoJsonObject &InObject)
If this object is a GeoJSON MultiLineString type, this returns an array of FCesiumGeoJsonLineString o...
static ECesiumGeoJsonObjectType GetObjectType(const FCesiumGeoJsonObject &InObject)
Returns the ECesiumGeoJsonObjectType of the GeoJSON value this object represents.
static TArray< FCesiumGeoJsonPolygon > GetObjectAsMultiPolygon(const FCesiumGeoJsonObject &InObject)
If this object is a GeoJSON MultiPolygon type, this returns an array of FCesiumGeoJsonPolygon objects...
static TArray< FCesiumGeoJsonLineString > GetPolygonRings(const FCesiumGeoJsonPolygon &InPolygon)
Returns the linear rings that make up this composite polygon.
a GeoJson "Feature" object.
friend class UCesiumGeoJsonFeatureBlueprintLibrary
FCesiumGeoJsonFeature()
Creates a new FCesiumVectorPrimitive with an empty primitive.
A FCesiumGeoJsonLineString is a set of points representing a line.
FCesiumGeoJsonLineString()
Creates a new FCesiumGeoJsonLineString with an empty line string.
FCesiumGeoJsonLineString(TArray< FVector > &&InPoints)
Creates a new FCesiumGeoJsonLineString from a set of Longitude-Latitude-Height points.
TArray< FVector > Points
The Longitude-Latitude-Height points of this polygon.
A single object in the GeoJSON document.
FCesiumGeoJsonObject()
Creates a new FCesiumGeoJsonObject containing an empty GeoJSON object.
const std::shared_ptr< CesiumVectorData::GeoJsonDocument > & getDocument() const
FCesiumGeoJsonObject(const std::shared_ptr< CesiumVectorData::GeoJsonDocument > &doc, const CesiumVectorData::GeoJsonObject *pObject)
Creates a new FCesiumGeoJsonObject wrapping the provided CesiumVectorData::GeoJsonObject.
const CesiumVectorData::GeoJsonObject * getObject() const
friend class UCesiumGeoJsonObjectBlueprintLibrary
A FCesiumGeoJsonPolygon is a polygon made up of one or more linear rings.
FCesiumGeoJsonPolygon()
Creates a new FCesiumGeoJsonPolygon with an empty composite polygon.
friend class UCesiumGeoJsonPolygonBlueprintFunctionLibrary
FCesiumGeoJsonPolygon(const std::shared_ptr< CesiumVectorData::GeoJsonDocument > &document, const std::vector< std::vector< glm::dvec3 > > *rings)
Creates a new FCesiumGeoJsonPolygon wrapping the provided CesiumGeospatial::CompositeCartographicPoly...
Style information to use when drawing vector data.