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

Default geometry provider that works for Features with a DataType using a GeometryDataAnnotation. More...

Inheritance diagram for Luciad.Models.Features.DefaultFeatureGeometryProvider:
Luciad.Models.Features.IFeatureGeometryProvider

Public Member Functions

 DefaultFeatureGeometryProvider ()
 
Luciad.Models.Features.Feature ApplyGeometry (Luciad.Models.Features.Feature originalFeature, Luciad.Geometries.Geometry newGeometry)
 Updates the original Feature using the modified Geometry, and returns it. More...
 
void Dispose ()
 
Luciad.Geometries.Geometry GetGeometry (Luciad.Models.Features.Feature feature)
 Return the geometry for a Feature (for example a Geometry using which a Geometry can be edited or created). More...
 
Luciad.Models.Features.Feature ApplyGeometry (Luciad.Models.Features.Feature originalFeature, Luciad.Geometries.Geometry newGeometry)
 Updates the original Feature using the modified Geometry, and returns it. More...
 
Luciad.Geometries.Geometry GetGeometry (Luciad.Models.Features.Feature feature)
 Return the geometry for a Feature (for example a Geometry using which a Geometry can be edited or created). More...
 

Detailed Description

Default geometry provider that works for Features with a DataType using a GeometryDataAnnotation.

It is implemented as follows: getGeometry: Calls Feature::findGeometry applyGeometry: Uses Feature::asBuilder to copy-and-edit a feature, and replaces the Geometry value of the property in the GeometryDataAnnotation by a new Geometry

This class should not be used when: The geometry of the feature is not exposed using Feature::findGeometry. The geometry isn't an explicit part of the feature, for example, but you can derive it from other properties on the feature. The returned geometry is not the same as the geometry exposed by Feature::findGeometry. It can be useful to display a distinct geometry when a user edits a feature. For example, when users edit the location and orientation of a vessel, you can show an Ellipse, which also has a location and an orientation. The feature has properties that are derived from the geometry. A simple example is a feature that has a Geometry property, and a property with the length of that geometry. When the Geometry property changes, the length property needs to change as well. You can do so by providing a custom implementation of IFeatureGeometryProvider::applyGeometry that changes the geometry, but also changes the length property.

In these cases, a custom IFeatureGeometryProvider implementation needs to be used. 2020.1

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

Constructor & Destructor Documentation

◆ DefaultFeatureGeometryProvider()

Luciad.Models.Features.DefaultFeatureGeometryProvider.DefaultFeatureGeometryProvider ( )
inline

Member Function Documentation

◆ ApplyGeometry()

Luciad.Models.Features.Feature Luciad.Models.Features.DefaultFeatureGeometryProvider.ApplyGeometry ( Luciad.Models.Features.Feature  originalFeature,
Luciad.Geometries.Geometry  newGeometry 
)
inline

Updates the original Feature using the modified Geometry, and returns it.

This Geometry is not necessarily the same geometry as the one used for painting. See IFeatureGeometryProvider for an example.

originalFeature

the original Feature

newGeometry

a new Geometry to apply on the Feature

a new Feature, based on a modified Geometry

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

Implements Luciad.Models.Features.IFeatureGeometryProvider.

◆ Dispose()

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

◆ GetGeometry()

Luciad.Geometries.Geometry Luciad.Models.Features.DefaultFeatureGeometryProvider.GetGeometry ( Luciad.Models.Features.Feature  feature)
inline

Return the geometry for a Feature (for example a Geometry using which a Geometry can be edited or created).

This Geometry is not necessarily the same geometry as the one used for painting. See IFeatureGeometryProvider for more information.

feature

the Feature to edit

the Geometry using which a Feature can be edited, or nullptr if the Feature can not be edited using a Geometry

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

Implements Luciad.Models.Features.IFeatureGeometryProvider.