LuciadCPillar C# 2024.0.02
|
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] |
The data type describing the feature properties. More... | |
ulong | Id [get] |
The id of this feature. More... | |
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
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 System.InvalidOperationException will be thrown.
Feature
as a Feature.Builder
.
|
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 null
.
null
.
|
inline |
|
inline |
Accesses the value for the given property.
propertyPath | the property for which to return a value |
T | the supported types are bool , int , long , float , double , string , Geometry or a subtype of Geometry . |
DataType
, but is not set for this particular feature, null
is returned. System.ArgumentException | 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.Id
.
Feature
has an id. Feature.Builder.Id
|
inlinestatic |
|
get |
The data type describing the feature properties.
Returns the data type describing the feature properties.
|
get |
The id of this feature.
Returns the id of this feature. A feature id should be unique across a model.
When no id is set
, this method will throw an exception.
System.InvalidOperationException | when the feature has no id. |