public interface IFeatureGeometryProvider
Geometry
associated with a Feature
, and apply Geometry
changes on that Feature
.
this can for example be used to specify the Geometry
that is used to edit or create a Feature
.
See the related guide for an overview of the editing API.
See DefaultFeatureGeometryProvider
for a default implementation that works for Features that use GeometryDataAnnotation
.
The provided geometry is not necessarily the same geometry as the one used for painting. An example would be to modify the location and orientation of a vessel by editing it as an Ellipse
, which also has a location and an orientation. This could be implemented by:
getGeometry
return an Ellipse
geometry based on the location and orientation stored in a Feature
applyGeometry
map the new Ellipse
geometry back to a location and an orientation, and modify the Feature
accordingly.
Similarly, a vessel feature could be created by creating an Ellipse
geometry.
Modifier and Type | Method and Description |
---|---|
Feature |
applyGeometry(Feature originalFeature,
Geometry newGeometry)
|
Geometry |
getGeometry(Feature feature)
|
@Nullable Geometry getGeometry(@NotNull Feature feature)
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.
@Nullable Feature applyGeometry(@NotNull Feature originalFeature, @NotNull Geometry newGeometry)
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.