LuciadCPillar C# 2023.1.04
Luciad.Models.Features.IFeatureModel Interface Reference

A feature model allows to uniformly access vector data. More...

Inheritance diagram for Luciad.Models.Features.IFeatureModel:
Luciad.Models.Model

Public Member Functions

void AddObserver (IFeatureModelObserver modelObserver)
 
FeatureModelMetadata GetFeatureModelMetadata ()
 
FeatureModelPersistenceManager GetPersistenceManager ()
 
IFeatureModelUpdater GetUpdater ()
 
void Query (FeatureQuery query, IFeatureQueryCallback callback)
 
void RemoveObserver (IFeatureModelObserver modelObserver)
 
- Public Member Functions inherited from Luciad.Models.Model
ModelMetadata GetModelMetadata ()
 Returns the meta data for this model. More...
 
Bounds QueryBounds ()
 Returns the bounds of this model, if available. More...
 

Detailed Description

A feature model allows to uniformly access vector data.

See article for more details on how to use and how to implement this class. Using a model

A user of a model:

Can use the query method on any thread

Can expect model change events on any thread. This means that the user of a model is responsible for creating a thread-safe observer implementation, and for possible rescheduling of the model events on a different thread if needed.

Implementing a model

The model implementation has multiple responsibilities.

Access the data uniformly. I.e. translate data storage entries into Feature instances.

Filter the data. When a user of the model queries the model, he can specify a filter. The model implementation must make sure that data is correctly filtered, as efficiently as possible.

All model implementations must be thread safe for reading, to allow multiples queries in parallel.

Make sure dynamic data (i.e. data that changes over time) is updated in a thread-safe way.

Make sure that notifications are sent when dynamic data changes.

Make sure that the data is presented in a consistent way. That is, after the model sends out a change event for a Feature, the query() method must also reflect that change. This can be guaranteed by making sure that model updates (internal updates + firing model change notifications) and calls to the query method are never executed simultaneously. Notifications must not be sent while the query() method is executing.

Persisting changes

Feature models can add support for persisting model changes. See this article for more information. Performance considerations

In order to optimize feature loading, it is recommended to follow these rules when creating a model:

The model should have bounds.

The features should contain a property whose value is a geometry.

Feature data types should have a GeometryDataAnnotation.

The reference used should not be geocentric.

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

Member Function Documentation

◆ AddObserver()

void Luciad.Models.Features.IFeatureModel.AddObserver ( IFeatureModelObserver  modelObserver)

◆ GetFeatureModelMetadata()

FeatureModelMetadata Luciad.Models.Features.IFeatureModel.GetFeatureModelMetadata ( )

◆ GetPersistenceManager()

FeatureModelPersistenceManager Luciad.Models.Features.IFeatureModel.GetPersistenceManager ( )

◆ GetUpdater()

IFeatureModelUpdater Luciad.Models.Features.IFeatureModel.GetUpdater ( )

◆ Query()

void Luciad.Models.Features.IFeatureModel.Query ( FeatureQuery  query,
IFeatureQueryCallback  callback 
)

◆ RemoveObserver()

void Luciad.Models.Features.IFeatureModel.RemoveObserver ( IFeatureModelObserver  modelObserver)