|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectFormattableObject
AbstractIdentifiedObject
DefaultCoordinateSystemAxis
@Immutable public class DefaultCoordinateSystemAxis
Definition of a coordinate system axis. This is used to label axes, and indicate the orientation. See axis name constraints.
In some case, the axis name is constrained by ISO 19111 depending on the coordinate reference system type. These constraints are identified in the javadoc by "ISO 19111 name is..." sentences. This constraint works in two directions; for example the names "geodetic latitude" and "geodetic longitude" shall be used to designate the coordinate axis names associated with a geographic coordinate reference system. Conversely, these names shall not be used in any other context.
AbstractCS,
Unit,
Serialized Form
| referencing/geotk-referencing (download) | View source code for this class |
| Field Summary | |
|---|---|
static DefaultCoordinateSystemAxis |
ALTITUDE
The default axis for altitude values. |
static DefaultCoordinateSystemAxis |
COLUMN
A default axis for column indices in a grid coverage. |
static DefaultCoordinateSystemAxis |
DEPTH
The default axis for depth. |
static DefaultCoordinateSystemAxis |
DISPLAY_X
A default axis for x values in a display device. |
static DefaultCoordinateSystemAxis |
DISPLAY_Y
A default axis for y values in a display device. |
static DefaultCoordinateSystemAxis |
EASTING
Default axis info for Easting values in a projected CRS. |
static DefaultCoordinateSystemAxis |
ELLIPSOIDAL_HEIGHT
The default axis for height values above the ellipsoid in a geographic CRS. |
static DefaultCoordinateSystemAxis |
GEOCENTRIC_RADIUS
Default axis info for radius in a geocentric CRS using spherical CS. |
static DefaultCoordinateSystemAxis |
GEOCENTRIC_X
Default axis info for x values in a geocentric CRS using Cartesian CS. |
static DefaultCoordinateSystemAxis |
GEOCENTRIC_Y
Default axis info for y values in a geocentric CRS using Cartesian CS. |
static DefaultCoordinateSystemAxis |
GEOCENTRIC_Z
Default axis info for z values in a geocentric CRS using Cartesian CS. |
static DefaultCoordinateSystemAxis |
GEODETIC_LATITUDE
Default axis info for geodetic latitudes in a geographic CRS. |
static DefaultCoordinateSystemAxis |
GEODETIC_LONGITUDE
Default axis info for geodetic longitudes in a geographic CRS. |
static DefaultCoordinateSystemAxis |
GRAVITY_RELATED_HEIGHT
The default axis for height values measured from gravity. |
static DefaultCoordinateSystemAxis |
LATITUDE
Default axis info for latitudes. |
static DefaultCoordinateSystemAxis |
LONGITUDE
Default axis info for longitudes. |
static DefaultCoordinateSystemAxis |
NORTHING
Default axis info for Northing values in a projected CRS. |
static DefaultCoordinateSystemAxis |
ROW
A default axis for row indices in a grid coverage. |
static DefaultCoordinateSystemAxis |
SOUTHING
Default axis info for Southing values in a projected CRS. |
static DefaultCoordinateSystemAxis |
SPHERICAL_LATITUDE
Default axis info for latitudes in a geocentric CRS using spherical CS. |
static DefaultCoordinateSystemAxis |
SPHERICAL_LONGITUDE
Default axis info for longitudes in a geocentric CRS using spherical CS. |
static DefaultCoordinateSystemAxis |
TIME
A default axis for time values in a time CS. |
static DefaultCoordinateSystemAxis |
UNDEFINED
Undefined or unknown axis. |
static DefaultCoordinateSystemAxis |
WESTING
Default axis info for Westing values in a projected CRS. |
static DefaultCoordinateSystemAxis |
X
Default axis info for x values in a Cartesian CS. |
static DefaultCoordinateSystemAxis |
Y
Default axis info for y values in a Cartesian CS. |
static DefaultCoordinateSystemAxis |
Z
Default axis info for z values in a Cartesian CS. |
| 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 | |
|---|---|
DefaultCoordinateSystemAxis(CharSequence name,
String abbreviation,
AxisDirection direction,
Unit<?> unit)
Constructs an axis with the given name and abbreviation. |
|
DefaultCoordinateSystemAxis(CoordinateSystemAxis axis)
Constructs a new coordinate system axis with the same values than the specified one. |
|
DefaultCoordinateSystemAxis(Map<String,?> properties,
String abbreviation,
AxisDirection direction,
Unit<?> unit)
Constructs an unbounded axis from a set of properties. |
|
DefaultCoordinateSystemAxis(Map<String,?> properties,
String abbreviation,
AxisDirection direction,
Unit<?> unit,
double minimum,
double maximum,
RangeMeaning rangeMeaning)
Constructs an axis from a set of properties. |
|
DefaultCoordinateSystemAxis(String abbreviation,
AxisDirection direction,
Unit<?> unit)
Constructs an axis with the same name as the abbreviation. |
|
| Method Summary | |
|---|---|
static DefaultCoordinateSystemAxis |
castOrCopy(CoordinateSystemAxis object)
Returns a Geotk axis 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)
Compares the specified object with this axis for equality. |
String |
formatWKT(Formatter formatter)
Format the inner part of a Well Known Text (WKT) element. |
String |
getAbbreviation()
The abbreviation used for this coordinate system axes. |
static double |
getAngle(AxisDirection source,
AxisDirection target)
Returns the arithmetic (counterclockwise) angle from the first direction to the second direction, in decimal degrees. |
AxisDirection |
getDirection()
Direction of this coordinate system axis. |
static AxisDirection |
getDirection(String direction)
Returns an axis direction constants from its name. |
double |
getMaximumValue()
Returns the maximum value normally allowed for this axis, in the unit of measure for the axis. |
double |
getMinimumValue()
Returns the minimum value normally allowed for this axis, in the unit of measure for the axis. |
static DefaultCoordinateSystemAxis |
getPredefined(String name,
AxisDirection direction)
Returns one of the predefined axis for the given name and direction, or null if
none. |
RangeMeaning |
getRangeMeaning()
Returns the meaning of axis value range specified by the minimum and maximum values. |
Unit<?> |
getUnit()
The unit of measure used for this coordinate system axis. |
static boolean |
isCompassDirection(AxisDirection direction)
Returns true if the specified direction is a compass direction. |
boolean |
nameMatches(String name)
Returns true if either the primary name or at least
one alias matches the specified string. |
static boolean |
perpendicular(AxisDirection first,
AxisDirection second)
Returns true if the specified directions are perpendicular. |
static DefaultCoordinateSystemAxis |
wrap(CoordinateSystemAxis object)
Deprecated. Renamed castOrCopy. |
| Methods inherited from class AbstractIdentifiedObject |
|---|
equals, getAlias, getIdentifier, getIdentifiers, getName, getName, getRemarks, hashCode |
| 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 DefaultCoordinateSystemAxis GEODETIC_LONGITUDE
This axis is usually part of a GEODETIC_LONGITUDE, GEODETIC_LATITUDE,
ELLIPSOIDAL_HEIGHT set.
LONGITUDE,
SPHERICAL_LONGITUDE,
GEODETIC_LATITUDEpublic static final DefaultCoordinateSystemAxis GEODETIC_LATITUDE
This axis is usually part of a GEODETIC_LONGITUDE, GEODETIC_LATITUDE,
ELLIPSOIDAL_HEIGHT set.
LATITUDE,
SPHERICAL_LATITUDE,
GEODETIC_LONGITUDEpublic static final DefaultCoordinateSystemAxis LONGITUDE
This axis is usually part of a LONGITUDE, LATITUDE, ALTITUDE set.
GEODETIC_LONGITUDE,
SPHERICAL_LONGITUDE,
LATITUDEpublic static final DefaultCoordinateSystemAxis LATITUDE
This axis is usually part of a LONGITUDE, LATITUDE, ALTITUDE set.
GEODETIC_LATITUDE,
SPHERICAL_LATITUDE,
LONGITUDEpublic static final DefaultCoordinateSystemAxis ELLIPSOIDAL_HEIGHT
This axis is usually part of a GEODETIC_LONGITUDE, GEODETIC_LATITUDE,
ELLIPSOIDAL_HEIGHT set.
ALTITUDE,
GEOCENTRIC_RADIUS,
GRAVITY_RELATED_HEIGHT,
DEPTHpublic static final DefaultCoordinateSystemAxis GRAVITY_RELATED_HEIGHT
ALTITUDE,
ELLIPSOIDAL_HEIGHT,
GEOCENTRIC_RADIUS,
DEPTHpublic static final DefaultCoordinateSystemAxis ALTITUDE
This axis is usually part of a LONGITUDE, LATITUDE, ALTITUDE set.
ELLIPSOIDAL_HEIGHT,
GEOCENTRIC_RADIUS,
GRAVITY_RELATED_HEIGHT,
DEPTHpublic static final DefaultCoordinateSystemAxis DEPTH
ALTITUDE,
ELLIPSOIDAL_HEIGHT,
GEOCENTRIC_RADIUS,
GRAVITY_RELATED_HEIGHTpublic static final DefaultCoordinateSystemAxis GEOCENTRIC_RADIUS
This axis is usually part of a SPHERICAL_LONGITUDE, SPHERICAL_LATITUDE,
GEOCENTRIC_RADIUS set.
ALTITUDE,
ELLIPSOIDAL_HEIGHT,
GRAVITY_RELATED_HEIGHT,
DEPTHpublic static final DefaultCoordinateSystemAxis SPHERICAL_LONGITUDE
This axis is usually part of a SPHERICAL_LONGITUDE, SPHERICAL_LATITUDE,
GEOCENTRIC_RADIUS set.
LONGITUDE,
GEODETIC_LONGITUDE,
SPHERICAL_LATITUDEpublic static final DefaultCoordinateSystemAxis SPHERICAL_LATITUDE
This axis is usually part of a SPHERICAL_LONGITUDE, SPHERICAL_LATITUDE,
GEOCENTRIC_RADIUS set.
LATITUDE,
GEODETIC_LATITUDE,
SPHERICAL_LONGITUDEpublic static final DefaultCoordinateSystemAxis X
This axis is usually part of a X, Y, Z set.
EASTING,
WESTING,
GEOCENTRIC_X,
DISPLAY_X,
COLUMNpublic static final DefaultCoordinateSystemAxis Y
This axis is usually part of a X, Y, Z set.
NORTHING,
SOUTHING,
GEOCENTRIC_Y,
DISPLAY_Y,
ROWpublic static final DefaultCoordinateSystemAxis Z
This axis is usually part of a X, Y, Z set.
public static final DefaultCoordinateSystemAxis GEOCENTRIC_X
GEOCENTRIC_X. In legacy OGC 01-009
specification (still in use for WKT format), it was OTHER).
The units are metres. The ISO 19111 name is "geocentric X" and the abbreviation is upper case "X".
This axis is usually part of a GEOCENTRIC_X, GEOCENTRIC_Y,
GEOCENTRIC_Z set.
public static final DefaultCoordinateSystemAxis GEOCENTRIC_Y
GEOCENTRIC_Y. In legacy OGC 01-009 specification
(still in use for WKT format), it was EAST).
The units are metres. The ISO 19111 name is "geocentric Y" and the abbreviation is upper case "Y".
This axis is usually part of a GEOCENTRIC_X, GEOCENTRIC_Y,
GEOCENTRIC_Z set.
public static final DefaultCoordinateSystemAxis GEOCENTRIC_Z
GEOCENTRIC_Z. In legacy OGC 01-009 specification
(still in use for WKT format), it was NORTH).
The units are metres. The ISO 19111 name is "geocentric Z" and the abbreviation is upper case "Z".
This axis is usually part of a GEOCENTRIC_X, GEOCENTRIC_Y,
GEOCENTRIC_Z set.
public static final DefaultCoordinateSystemAxis EASTING
This axis is usually part of a EASTING, NORTHING set.
X,
EASTING,
WESTINGpublic static final DefaultCoordinateSystemAxis WESTING
X,
EASTING,
WESTINGpublic static final DefaultCoordinateSystemAxis NORTHING
This axis is usually part of a EASTING, NORTHING set.
Y,
NORTHING,
SOUTHINGpublic static final DefaultCoordinateSystemAxis SOUTHING
Y,
NORTHING,
SOUTHINGpublic static final DefaultCoordinateSystemAxis TIME
public static final DefaultCoordinateSystemAxis COLUMN
public static final DefaultCoordinateSystemAxis ROW
public static final DefaultCoordinateSystemAxis DISPLAY_X
public static final DefaultCoordinateSystemAxis DISPLAY_Y
public static final DefaultCoordinateSystemAxis UNDEFINED
OTHER
and the unit is dimensionless. This constant is sometime used as a placeholder
for axes that were not properly defined.
| Constructor Detail |
|---|
public DefaultCoordinateSystemAxis(CoordinateSystemAxis axis)
axis - The coordinate system axis to copy.
public DefaultCoordinateSystemAxis(Map<String,?> properties,
String abbreviation,
AxisDirection direction,
Unit<?> unit,
double minimum,
double maximum,
RangeMeaning rangeMeaning)
properties - Set of properties. Should contains at least "name".abbreviation - The abbreviation used for this
coordinate system axes.direction - The direction of this coordinate system axis.unit - The unit of measure used for this coordinate
system axis.minimum - The minimum value normally allowed for this axis.maximum - The maximum value normally allowed for this axis.rangeMeaning - The meaning of axis value range specified by the minimum and
maximum values.
public DefaultCoordinateSystemAxis(Map<String,?> properties,
String abbreviation,
AxisDirection direction,
Unit<?> unit)
properties - Set of properties. Should contains at least "name".abbreviation - The abbreviation used for this
coordinate system axes.direction - The direction of this coordinate system axis.unit - The unit of measure used for this coordinate
system axis.
public DefaultCoordinateSystemAxis(String abbreviation,
AxisDirection direction,
Unit<?> unit)
abbreviation - The abbreviation used for this
coordinate system axes.direction - The direction of this coordinate system axis.unit - The unit of measure used for this coordinate
system axis.
public DefaultCoordinateSystemAxis(CharSequence name,
String abbreviation,
AxisDirection direction,
Unit<?> unit)
If the given name is an international string,
then the name of this identified object is set to the unlocalized
version of the name argument, as given by
name.toString(null).
The same name argument is also stored as an alias,
which allows fetching localized versions of the name.
Otherwise, name.toString() is used as the primary name and
no alias is defined.
name - The name of this axis. Also stored as an alias for localization purpose.abbreviation - The abbreviation used for this
coordinate system axis.direction - The direction of this coordinate system axis.unit - The unit of measure used for this coordinate
system axis.| Method Detail |
|---|
public static DefaultCoordinateSystemAxis castOrCopy(CoordinateSystemAxis 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 DefaultCoordinateSystemAxis wrap(CoordinateSystemAxis object)
castOrCopy.
object - The object to get as a Geotk implementation, or null if none.
public static DefaultCoordinateSystemAxis getPredefined(String name,
AxisDirection direction)
null if
none. This method searches only in predefined constants like GEODETIC_LATITUDE,
not in any custom axis instantiated by a public constructor. The name of those constants
match ISO 19111 names or some names commonly found in Well Known Text (WKT)
formats.
This method first checks if the specified name matches the abbreviation of a predefined axis. The comparison is case-sensitive (for example the
GEOCENTRIC_X abbreviation is uppercase "X", while the abbreviation for
the generic X axis is lowercase "x").
If the specified name doesn't match any abbreviation, then this method compares the name against predefined axis name in a case-insensitive manner. Examples of valid names are "Geodetic latitude" and "Northing".
The direction argument is optional and can be used in order to resolve ambiguity like
X and DISPLAY_X axis. If this argument is null, then the first
axis with a matching name or abbreviation will be returned.
name - The axis name or abbreviation.direction - An optional direction, or null.
null.
public static AxisDirection getDirection(String direction)
throws NoSuchElementException
direction - The direction name (e.g. "north", "east", etc.).
NoSuchElementException - if the given name is not a know axis direction.public AxisDirection getDirection()
Within any set of coordinate system axes, only one of each pair of terms can be used. For earth-fixed coordinate reference systems, this direction is often approximate and intended to provide a human interpretable meaning to the axis. When a geodetic datum is used, the precise directions of the axes may therefore vary slightly from this approximate direction.
Note that an DefaultEngineeringCRS often requires
specific descriptions of the directions of its coordinate system axes.
getDirection in interface CoordinateSystemAxispublic String getAbbreviation()
getAbbreviation in interface CoordinateSystemAxispublic Unit<?> getUnit()
getUnit in interface CoordinateSystemAxispublic double getMinimumValue()
getMinimumValue in interface CoordinateSystemAxispublic double getMaximumValue()
getMaximumValue in interface CoordinateSystemAxispublic RangeMeaning getRangeMeaning()
getRangeMeaning in interface CoordinateSystemAxispublic static boolean isCompassDirection(AxisDirection direction)
true if the specified direction is a compass direction.
Compass directions include "North", "North-North-East",
"North-East", etc.
direction - The axis direction to test.
true if the given direction is a compass direction.
public static double getAngle(AxisDirection source,
AxisDirection target)
NaN if no angle can be computed.
A positive angle denotes a right-handed system, while a negative angle denotes a left-handed system. Example:
source - The source axis direction.target - The target axis direction.
Double.NaN if this value can't be computed.
public static boolean perpendicular(AxisDirection first,
AxisDirection second)
true if the specified directions are perpendicular.
first - The first axis direction to test.second - The second axis direction to test.
true if the given axis direction are perpendicular.public boolean nameMatches(String name)
true if either the primary name or at least
one alias matches the specified string. This method performs
all the search done by the super-class, with the addition of special processing for latitudes and longitudes:
"Lat", "Latitude" and "Geodetic latitude" are considered
equivalent."Lon", "Longitude" and "Geodetic longitude" are considered
equivalent.The above special cases are needed in order to workaround a conflict in specifications: ISO 19111 states explicitly that the latitude and longitude axis names shall be "Geodetic latitude" and "Geodetic longitude", while the legacy OGC 01-009 (where the WKT format is defined) saids that the default values shall be "Lat" and "Lon".
nameMatches in class AbstractIdentifiedObjectname - The name to compare.
true if the primary name of at least one alias
matches the specified name.IdentifiedObjects.nameMatches(IdentifiedObject, String)
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)
toString method
and looks like AXIS["name", NORTH].
formatWKT in interface FormattableformatWKT in class FormattableObjectformatter - The formatter to use.
"AXIS".FormattableObject.toWKT(),
FormattableObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||