LuciadCPillar C# 2023.1.04
|
A Feature is a (partial) copy of a domain object. More...
Classes | |
class | Builder |
Allows the incremental creation of a Feature object. More... | |
Public Member Functions | |
Luciad.Models.Features.Feature.Builder | AsBuilder () |
Returns this Feature as a Feature::Builder. More... | |
void | Dispose () |
override bool | Equals (object other) |
Luciad.Geometries.Geometry | FindGeometry () |
Tries to find a geometry for this feature. More... | |
override int | GetHashCode () |
T | GetValue< T > (Luciad.Datamodels.DataPropertyPath propertyPath) |
Accesses the value for the given property. More... | |
bool | HasId () |
Returns if this Feature has an id. More... | |
Static Public Member Functions | |
static Luciad.Models.Features.Feature.Builder | NewBuilder () |
Returns a new Feature Builder. More... | |
Properties | |
Luciad.Datamodels.DataType | DataType [get] |
ulong | Id [get] |
A Feature is a (partial) copy of a domain object.
It allows the rest of the API to easily access the domain object's properties, including any geometry. If you do a query on the model, and retrieve a Feature from it, the caller of the query receives ownership of the Feature. I.e. the caller can decide what to do with it, and when to dispose it. This means that the Map and Layer API's are allowed to keep references to a Feature and have unrestricted lock-less access to its properties. The caller of the IFeatureModel::query method is responsible for managing the lifetime of a Feature. To make Feature instances easy to use in a multi-threaded environment, they are
immutable
thread safe for reading
See article for more details on this class.
|
inline |
Returns this Feature as a Feature::Builder.
This makes it possible to copy a Feature, and modify values. Note that when using this builder, it is not possible to change the datatype. Only the values and the id of the Feature. Otherwise a LogicException will be thrown. this Feature as a Feature::Builder.
2020.1
|
inline |
|
inline |
|
inline |
Tries to find a geometry for this feature.
If this feature's data type is annotated with GeometryDataAnnotation, the value of the corresponding property is returned. Otherwise, the result will be nullptr. the annotated geometry, if any, else nullptr.
GeometryDataAnnotation::getPropertyPath
|
inline |
|
inline |
Accesses the value for the given property.
Example
T
the supported types are bool, int32_t, int64_t, float, double, std::string, std::shared_ptr<luciad::Geometry> or a subtype of Geometry.
propertyPath
the property for which to return a value
the value for the given property. If the property does exist in the DataType, but is not set for this particular feature, std::nullopt is returned.
InvalidArgumentException
when the property is not of a known type, if it doesn't exist in the DataType, or when the type of the value doesn't correspond with the provided type parameter (for example when the property value is a Point geometry, but it is requested using ArcBand as type parameter).
|
inline |
Returns if this Feature has an id.
If this method returns false, it is not allowed to call Feature::getId. if this Feature has an id.
Feature::Builder::id
|
inlinestatic |
Returns a new Feature Builder.
|
get |
|
get |