|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectFormattableObject
AbstractIdentifiedObject
AbstractCS
DefaultTimeCS
@Immutable public class DefaultTimeCS
A one-dimensional coordinate system containing a single time axis, used to describe the
temporal position of a point in the specified time units from a specified time origin.
A TimeCS shall have one axis.
| Used with CRS type(s) |
|---|
Temporal
|
| referencing/geotk-referencing (download) | View source code for this class |
| Field Summary | |
|---|---|
static DefaultTimeCS |
DAYS
A one-dimensional temporal CS with time, axis in day units. |
static DefaultTimeCS |
MILLISECONDS
A one-dimensional temporal CS with time, axis in millisecond units. |
static DefaultTimeCS |
SECONDS
A one-dimensional temporal CS with time, axis in second units. |
| Fields inherited from class FormattableObject |
|---|
EPSG, GEOTIFF, INTERNAL, OGC, SINGLE_LINE |
| Fields inherited from interface IdentifiedObject |
|---|
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY |
| Constructor Summary | |
|---|---|
DefaultTimeCS(Map<String,?> properties,
CoordinateSystemAxis axis)
Constructs a coordinate system from a set of properties. |
|
DefaultTimeCS(String name,
CoordinateSystemAxis axis)
Constructs a coordinate system from a name. |
|
DefaultTimeCS(TimeCS cs)
Constructs a new coordinate system with the same values than the specified one. |
|
| Method Summary | |
|---|---|
static DefaultTimeCS |
castOrCopy(TimeCS object)
Returns a Geotk coordinate system implementation with the same values than the given arbitrary implementation. |
Measure |
distance(double[] coord1,
double[] coord2)
Computes the time difference between two points. |
protected boolean |
isCompatibleDirection(AxisDirection direction)
Returns true if the specified axis direction is allowed for this coordinate
system. |
protected boolean |
isCompatibleUnit(AxisDirection direction,
Unit<?> unit)
Returns true if the specified unit is compatible with seconds. |
static DefaultTimeCS |
wrap(TimeCS object)
Deprecated. Renamed castOrCopy. |
| Methods inherited from class AbstractCS |
|---|
computeHashCode, equals, formatWKT, getAxis, getDimension, standard, swapAndScaleAxis |
| Methods inherited from class AbstractIdentifiedObject |
|---|
equals, getAlias, getIdentifier, getIdentifiers, getName, getName, getRemarks, hashCode, nameMatches |
| Methods inherited from class FormattableObject |
|---|
getDefaultIndentation, print, setDefaultIndentation, toString, toWKT, toWKT, toWKT |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface CoordinateSystem |
|---|
getAxis, getDimension |
| Methods inherited from interface IdentifiedObject |
|---|
getAlias, getIdentifiers, getName, getRemarks, toWKT |
| Field Detail |
|---|
public static final DefaultTimeCS DAYS
DefaultTemporalCRS.JULIAN,
DefaultTemporalCRS.MODIFIED_JULIAN,
DefaultTemporalCRS.TRUNCATED_JULIAN,
DefaultTemporalCRS.DUBLIN_JULIANpublic static final DefaultTimeCS SECONDS
DefaultTemporalCRS.UNIXpublic static final DefaultTimeCS MILLISECONDS
DefaultTemporalCRS.JAVA| Constructor Detail |
|---|
public DefaultTimeCS(TimeCS cs)
cs - The coordinate system to copy.
public DefaultTimeCS(String name,
CoordinateSystemAxis axis)
name - The coordinate system name.axis - The axis.
public DefaultTimeCS(Map<String,?> properties,
CoordinateSystemAxis axis)
properties - Set of properties. Should contains at least "name".axis - The axis.| Method Detail |
|---|
public static DefaultTimeCS castOrCopy(TimeCS object)
null, then this method returns null.
Otherwise if the given object is already a Geotk implementation, then the given object is
returned unchanged. Otherwise a new Geotk implementation is created and initialized to the
attribute values of the given object.
object - The object to get as a Geotk implementation, or null if none.
null if the argument was null.@Deprecated public static DefaultTimeCS wrap(TimeCS object)
castOrCopy.
object - The object to get as a Geotk implementation, or null if none.
protected boolean isCompatibleDirection(AxisDirection direction)
true if the specified axis direction is allowed for this coordinate
system. The default implementation accepts only temporal directions (i.e.
FUTURE and PAST).
isCompatibleDirection in class AbstractCSdirection - The direction to test for compatibility.
true if the given direction is compatible with this coordinate system.
protected boolean isCompatibleUnit(AxisDirection direction,
Unit<?> unit)
true if the specified unit is compatible with seconds.
This method is invoked at construction time for checking units compatibility.
isCompatibleUnit in class AbstractCSdirection - The direction of the axis having the given unit.unit - The unit to test for compatibility.
true if the given unit is compatible with this coordinate system.
public Measure distance(double[] coord1,
double[] coord2)
throws MismatchedDimensionException
distance in class AbstractCScoord1 - Coordinates of the first point.coord2 - Coordinates of the second point.
coord1 and coord2.
MismatchedDimensionException - if a coordinate doesn't have the expected dimension.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||