Package org.apache.sis.internal.feature
Class MovingFeatures
java.lang.Object
org.apache.sis.internal.feature.MovingFeatures
Utility methods for instantiating features where the geometry is a trajectory
and some property values may change with time.
This class is not thread-safe.
- Since:
- 0.8
- Version:
- 1.1
- Author:
- Martin Desruisseaux (Geomatys)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DefaultAttributeType<Instant> Definition of characteristics containing a list of instants, without duplicates. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DefaultAttributeType<?> characteristic(boolean hasCRS) Returns the "datetimes" characteristic to add on an attribute type.final voidsetInstants(AbstractAttribute<?> dest, long[] millis) Sets the "datetimes" characteristic on the given attribute as a list ofInstantinstances.static voidsetTimes(AbstractAttribute<?> dest, Vector values, DefaultTemporalCRS converter) Sets the "datetimes" characteristic on the given attribute.
-
Field Details
-
TIME_AS_INSTANTS
Definition of characteristics containing a list of instants, without duplicates. Should be in chronological order, but this is not verified.
-
-
Constructor Details
-
MovingFeatures
Creates a new builder.- Parameters:
share- other builder that may share time vectors, ornullif none.
-
-
Method Details
-
characteristic
Returns the "datetimes" characteristic to add on an attribute type. The characteristic will expect eitherInstantorNumbervalues, depending on whether a temporal CRS is available or not.- Parameters:
hasCRS- whether a temporal CRS is available.- Returns:
- the "datetimes" characteristic.
-
setInstants
Sets the "datetimes" characteristic on the given attribute as a list ofInstantinstances. Should be in chronological order, but this is not verified.- Parameters:
dest- the attribute on which to set time characteristic.millis- times in milliseconds since the epoch.
-
setTimes
Sets the "datetimes" characteristic on the given attribute. If theconverteris non-null, it will be used for converting values toInstantinstances. Otherwise values are stored as-is as time elapsed in arbitrary units since an arbitrary epoch.Values should be in chronological order, but this is not verified. Current implementation does not cache the values, but this policy may be revisited in a future version.
- Parameters:
dest- the attribute on which to set time characteristic.values- times in arbitrary units since an arbitrary epoch.converter- the CRS to use for converting values toInstantinstances, ornull.
-