Class DefaultFeatureGeometryProvider

java.lang.Object
com.luciad.models.features.DefaultFeatureGeometryProvider
All Implemented Interfaces:
IFeatureGeometryProvider, AutoCloseable

public final class DefaultFeatureGeometryProvider extends Object implements AutoCloseable, IFeatureGeometryProvider
Default geometry provider that works for Features with a DataType using a GeometryDataAnnotation.

It is implemented as follows:

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.