org.geotools.referencing.crs
Class DefaultTemporalCRS
java.lang.Object
org.geotools.referencing.wkt.Formattable
org.geotools.referencing.AbstractIdentifiedObject
org.geotools.referencing.AbstractReferenceSystem
org.geotools.referencing.crs.AbstractCRS
org.geotools.referencing.crs.AbstractSingleCRS
org.geotools.referencing.crs.DefaultTemporalCRS
- All Implemented Interfaces:
- org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.IdentifiedObject, org.opengis.referencing.ReferenceSystem, java.io.Serializable, org.opengis.referencing.crs.SingleCRS, org.opengis.referencing.crs.TemporalCRS
- public class DefaultTemporalCRS
- extends AbstractSingleCRS
- implements org.opengis.referencing.crs.TemporalCRS
A 1D coordinate reference system used for the recording of time.
Used with CS type(s) |
Time
|
- Since:
- 2.1
- Version:
- $Id: DefaultTemporalCRS.java 17672 2006-01-19 00:25:55Z desruisseaux $
- Author:
- Martin Desruisseaux
- See Also:
- Serialized Form
Field Summary |
static javax.units.Unit |
MILLISECOND
Unit for milliseconds. |
Fields inherited from interface org.opengis.referencing.ReferenceSystem |
SCOPE_KEY, VALID_AREA_KEY |
Fields inherited from interface org.opengis.referencing.IdentifiedObject |
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY |
Constructor Summary |
DefaultTemporalCRS(java.util.Map properties,
org.opengis.referencing.datum.TemporalDatum datum,
org.opengis.referencing.cs.TimeCS cs)
Constructs a temporal CRS from a set of properties. |
DefaultTemporalCRS(java.lang.String name,
org.opengis.referencing.datum.TemporalDatum datum,
org.opengis.referencing.cs.TimeCS cs)
Constructs a temporal CRS from a name. |
DefaultTemporalCRS(org.opengis.referencing.crs.TemporalCRS crs)
Constructs a new temporal CRS with the same values than the specified one.
|
Method Summary |
int |
hashCode()
Returns a hash value for this geographic CRS. |
java.util.Date |
toDate(double value)
Convert the given value into a Date object.
|
double |
toValue(java.util.Date time)
Convert the given date into a value in this axis unit.
|
static DefaultTemporalCRS |
wrap(org.opengis.referencing.crs.TemporalCRS crs)
Wraps an arbitrary temporal CRS into a Geotools implementation. |
Methods inherited from class org.geotools.referencing.AbstractIdentifiedObject |
asSet, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, nameMatches, nameMatches |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.opengis.referencing.crs.SingleCRS |
getCoordinateSystem, getDatum |
Methods inherited from interface org.opengis.referencing.ReferenceSystem |
getScope, getValidArea |
Methods inherited from interface org.opengis.referencing.IdentifiedObject |
getAlias, getIdentifiers, getName, getRemarks, toWKT |
MILLISECOND
public static javax.units.Unit MILLISECOND
- Unit for milliseconds. Usefull for conversion from and to
Date
objects.
DefaultTemporalCRS
public DefaultTemporalCRS(org.opengis.referencing.crs.TemporalCRS crs)
- Constructs a new temporal CRS with the same values than the specified one.
This copy constructor provides a way to wrap an arbitrary implementation into a
Geotools one or a user-defined one (as a subclass), usually in order to leverage
some implementation-specific API. This constructor performs a shallow copy,
i.e. the properties are not cloned.
- Since:
- 2.2
- See Also:
wrap(org.opengis.referencing.crs.TemporalCRS)
DefaultTemporalCRS
public DefaultTemporalCRS(java.lang.String name,
org.opengis.referencing.datum.TemporalDatum datum,
org.opengis.referencing.cs.TimeCS cs)
- Constructs a temporal CRS from a name.
- Parameters:
name
- The name.datum
- The datum.cs
- The coordinate system.
DefaultTemporalCRS
public DefaultTemporalCRS(java.util.Map properties,
org.opengis.referencing.datum.TemporalDatum datum,
org.opengis.referencing.cs.TimeCS cs)
- Constructs a temporal CRS from a set of properties. The properties are given unchanged to
the super-class constructor.
- Parameters:
properties
- Set of properties. Should contains at least "name"
.cs
- The coordinate system.datum
- The datum.
wrap
public static DefaultTemporalCRS wrap(org.opengis.referencing.crs.TemporalCRS crs)
- Wraps an arbitrary temporal CRS into a Geotools implementation. This method is usefull
if the user wants to take advantage of
toDate(double)
and toValue(java.util.Date)
methods.
If the supplied CRS is already an instance of or is ,
then it is returned unchanged.
toDate
public java.util.Date toDate(double value)
- Convert the given value into a
Date
object.
This method is the converse of toValue(java.util.Date)
.
- Parameters:
value
- A value in this axis unit.
- Returns:
- The value as a date.
toValue
public double toValue(java.util.Date time)
- Convert the given date into a value in this axis unit.
This method is the converse of
toDate(double)
.
- Parameters:
time
- The value as a date.
- Returns:
- value A value in this axis unit.
hashCode
public int hashCode()
- Returns a hash value for this geographic CRS.
- Overrides:
hashCode
in class AbstractSingleCRS
- Returns:
- The hash code value. This value doesn't need to be the same
in past or future versions of this class.
Copyright © GeoTools. All Rights Reserved.