LuciadCPillar C# 2023.1.04
Luciad.Models.Features.Feature Class Reference

A Feature is a (partial) copy of a domain object. More...

Inheritance diagram for Luciad.Models.Features.Feature:

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 ()
 
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]
 

Detailed Description

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.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Feature.

Member Function Documentation

◆ AsBuilder()

Luciad.Models.Features.Feature.Builder Luciad.Models.Features.Feature.AsBuilder ( )
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

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Feature::asBuilder.

◆ Dispose()

void Luciad.Models.Features.Feature.Dispose ( )
inline

◆ Equals()

override bool Luciad.Models.Features.Feature.Equals ( object  other)
inline

◆ FindGeometry()

Luciad.Geometries.Geometry Luciad.Models.Features.Feature.FindGeometry ( )
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

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Feature::findGeometry.

◆ GetHashCode()

override int Luciad.Models.Features.Feature.GetHashCode ( )
inline

◆ GetValue< T >()

T Luciad.Models.Features.Feature.GetValue< T > ( Luciad.Datamodels.DataPropertyPath  propertyPath)
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).

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Feature::getValue.

◆ HasId()

bool Luciad.Models.Features.Feature.HasId ( )
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

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Feature::hasId.

◆ NewBuilder()

Luciad.Models.Features.Feature.Builder Luciad.Models.Features.Feature.NewBuilder ( )
inlinestatic

Returns a new Feature Builder.

a new Feature Builder.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Feature::newBuilder.

Property Documentation

◆ DataType

Luciad.Datamodels.DataType Luciad.Models.Features.Feature.DataType
get

◆ Id

ulong Luciad.Models.Features.Feature.Id
get