|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectFormattableObject
AbstractIdentifiedObject
DefaultPrimeMeridian
@Immutable public class DefaultPrimeMeridian
A prime meridian defines the origin from which longitude values are determined.
The name initial value is "Greenwich", and that value shall be
used when the greenwich longitude value is
zero.
| referencing/geotk-referencing (download) | View source code for this class |
| Field Summary | |
|---|---|
static DefaultPrimeMeridian |
GREENWICH
The Greenwich meridian (EPSG:8901), with angular measurements in decimal degrees. |
| 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 | |
|---|---|
DefaultPrimeMeridian(Map<String,?> properties,
double greenwichLongitude,
Unit<Angle> angularUnit)
Constructs a prime meridian from a set of properties. |
|
DefaultPrimeMeridian(PrimeMeridian meridian)
Constructs a new prime meridian with the same values than the specified one. |
|
DefaultPrimeMeridian(String name,
double greenwichLongitude)
Constructs a prime meridian from a name. |
|
DefaultPrimeMeridian(String name,
double greenwichLongitude,
Unit<Angle> angularUnit)
Constructs a prime meridian from a name. |
|
| Method Summary | |
|---|---|
static DefaultPrimeMeridian |
castOrCopy(PrimeMeridian object)
Returns a Geotk prime meridian implementation with the same values than the given arbitrary implementation. |
protected int |
computeHashCode()
Computes a hash value for this identified object. |
boolean |
equals(Object object,
ComparisonMode mode)
Compare this prime meridian with the specified object for equality. |
String |
formatWKT(Formatter formatter)
Formats the inner part of a Well Known Text (WKT) element. |
Unit<Angle> |
getAngularUnit()
Returns the angular unit of the Greenwich longitude. |
double |
getGreenwichLongitude()
Longitude of the prime meridian measured from the Greenwich meridian, positive eastward. |
double |
getGreenwichLongitude(Unit<Angle> targetUnit)
Returns the longitude value relative to the Greenwich Meridian, expressed in the specified units. |
static DefaultPrimeMeridian |
wrap(PrimeMeridian object)
Deprecated. Renamed castOrCopy. |
| 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 IdentifiedObject |
|---|
getAlias, getIdentifiers, getName, getRemarks, toWKT |
| Field Detail |
|---|
public static final DefaultPrimeMeridian GREENWICH
| Constructor Detail |
|---|
public DefaultPrimeMeridian(PrimeMeridian meridian)
meridian - The prime meridian to copy.
public DefaultPrimeMeridian(String name,
double greenwichLongitude)
greenwichLongitude value
is assumed in decimal degrees.
name - The datum name.greenwichLongitude - The longitude value relative to the Greenwich Meridian.
public DefaultPrimeMeridian(String name,
double greenwichLongitude,
Unit<Angle> angularUnit)
name - The datum name.greenwichLongitude - The longitude value relative to the Greenwich Meridian.angularUnit - The angular unit of the longitude.
public DefaultPrimeMeridian(Map<String,?> properties,
double greenwichLongitude,
Unit<Angle> angularUnit)
properties - Set of properties. Should contains at least "name".greenwichLongitude - The longitude value relative to the Greenwich Meridian.angularUnit - The angular unit of the longitude.| Method Detail |
|---|
public static DefaultPrimeMeridian castOrCopy(PrimeMeridian 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 DefaultPrimeMeridian wrap(PrimeMeridian object)
castOrCopy.
object - The object to get as a Geotk implementation, or null if none.
public double getGreenwichLongitude()
greenwichLongitude initial value is zero, and that value shall be used
when the meridian name value is "Greenwich".
getGreenwichLongitude in interface PrimeMeridianpublic double getGreenwichLongitude(Unit<Angle> targetUnit)
getGreenwichLongitude(NonSI.DEGREE_ANGLE)), regardless of the underlying
angular units of this prime meridian.
targetUnit - The unit in which to express longitude.
public Unit<Angle> getAngularUnit()
getAngularUnit in interface PrimeMeridian
public boolean equals(Object object,
ComparisonMode mode)
equals in interface LenientComparableequals in class AbstractIdentifiedObjectobject - The object to compare to this.mode - STRICT for performing a strict comparison, or
IGNORE_METADATA for comparing only properties
relevant to transformations.
true if both objects are equal.protected int computeHashCode()
AbstractIdentifiedObject.hashCode() when first needed.
Implementation specific feature
In the Geotk implementation, the name, identifiers and remarks are not used for hash code computation.
Consequently two identified objects will return the same hash value if they are equal in the
sense of equals(…,
ComparisonMode.IGNORE_METADATA). This feature allows users to
implement metadata-insensitive HashMap.
computeHashCode in class AbstractIdentifiedObjectpublic String formatWKT(Formatter formatter)
formatWKT in interface FormattableformatWKT in class FormattableObjectformatter - The formatter to use.
"PRIMEM".FormattableObject.toWKT(),
FormattableObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||