| org.geotools.referencing.AbstractIdentifiedObject org.geotools.referencing.cs.DefaultCoordinateSystemAxis
DefaultCoordinateSystemAxis | public class DefaultCoordinateSystemAxis extends AbstractIdentifiedObject implements CoordinateSystemAxis(Code) | | Definition of a coordinate system axis. This is used to label axes, and indicate the orientation.
See
.
In some case, the axis name is constrained by ISO 19111 depending on the
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
.
Conversely, these names shall not be used in any other context.
since: 2.1 version: $Id: DefaultCoordinateSystemAxis.java 25778 2007-06-08 08:46:34Z desruisseaux $ author: Martin Desruisseaux See Also: AbstractCS See Also: Unit |
Constructor Summary | |
public | DefaultCoordinateSystemAxis(CoordinateSystemAxis axis) Constructs a new coordinate system axis 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. | public | DefaultCoordinateSystemAxis(Map properties, String abbreviation, AxisDirection direction, Unit unit, double minimum, double maximum, RangeMeaning rangeMeaning) Constructs an axis from a set of properties. | public | DefaultCoordinateSystemAxis(Map properties, String abbreviation, AxisDirection direction, Unit unit) Constructs an unbounded axis from a set of properties. | public | DefaultCoordinateSystemAxis(String abbreviation, AxisDirection direction, Unit unit) Constructs an axis with the same
as the abbreviation. | public | DefaultCoordinateSystemAxis(InternationalString name, String abbreviation, AxisDirection direction, Unit unit) Constructs an axis with a name as an
and an abbreviation. |
Method Summary | |
public boolean | equals(AbstractIdentifiedObject object, boolean compareMetadata) Compares the specified object with this axis for equality.
Parameters: object - The object to compare to this . Parameters: compareMetadata - true for performing a strict comparaison, or false for comparing only properties relevant to transformations. | final boolean | equals(DefaultCoordinateSystemAxis that, boolean compareMetadata, boolean compareUnit) Compares the specified object with this axis for equality, with optional comparaison
of units. | protected String | formatWKT(Formatter formatter) Format the inner part of a
Well
Known Text (WKT) element. | public String | getAbbreviation() The abbreviation used for this coordinate system axes. | public static double | getAngle(AxisDirection source, AxisDirection target) Returns the arithmetic (counterclockwise) angle from the first direction to the second
direction, in decimal degrees. | static int | getCompassAngle(AxisDirection source, AxisDirection target) Tests for angle on compass only (do not tests angle between direction along meridians). | public static AxisDirection | getDirection(String direction) Returns an axis direction constants from its name.
Parameters: direction - The direction name (e.g. | public AxisDirection | getDirection() Direction of this coordinate system axis. | public double | getMaximumValue() Returns the maximum value normally allowed for this axis, in the
. | public double | getMinimumValue() Returns the minimum value normally allowed for this axis, in the
. | final DefaultCoordinateSystemAxis | getOpposite() Returns an axis with the opposite direction of this one, or
null if unknown. | public static DefaultCoordinateSystemAxis | getPredefined(String name, AxisDirection direction) Returns one of the predefined axis for the given name and direction, or
null if
none. | static DefaultCoordinateSystemAxis | getPredefined(CoordinateSystemAxis axis) Returns a predefined axis similar to the specified one except for units. | public RangeMeaning | getRangeMeaning() Returns the meaning of axis value range specified by the
and
values. | public Unit | getUnit() The unit of measure used for this coordinate system axis. | public int | hashCode() Returns a hash value for this axis. | public static boolean | isCompassDirection(AxisDirection direction) Returns
true if the specified direction is a compass direction. | public boolean | nameMatches(String name) Returns
true if either the
or at least
one
matches the specified string. | public static boolean | perpendicular(AxisDirection first, AxisDirection second) Returns
true if the specified directions are perpendicular. | final DefaultCoordinateSystemAxis | usingUnit(Unit newUnit) Returns a new axis with the same properties than current axis except for the units.
Parameters: newUnit - The unit for the new axis. | static DefaultCoordinateSystemAxis[] | values() Returns the list of all predefined constants. |
COLUMN | final public static DefaultCoordinateSystemAxis COLUMN(Code) | | A default axis for column indices in a
. Increasing values go toward
.
The abbreviation is lower case "i".
|
COMPASS_DIRECTION_COUNT | final static int COMPASS_DIRECTION_COUNT(Code) | | Number of directions from "North", "North-North-East", "North-East", etc.
This is verified by
DefaultCoordinateSystemAxisTest.testCompass .
|
DISPLAY_X | final public static DefaultCoordinateSystemAxis DISPLAY_X(Code) | | A default axis for x values in a display device. Increasing values go toward
.
The abbreviation is lower case "x".
since: 2.2 |
DISPLAY_Y | final public static DefaultCoordinateSystemAxis DISPLAY_Y(Code) | | A default axis for y values in a display device. Increasing values go toward
.
The abbreviation is lower case "y".
since: 2.2 |
TIME | final public static DefaultCoordinateSystemAxis TIME(Code) | | A default axis for time values in a
.
Increasing time go toward
and units are
.
The abbreviation is lower case "t".
|
DefaultCoordinateSystemAxis | public DefaultCoordinateSystemAxis(CoordinateSystemAxis axis)(Code) | | Constructs a new coordinate system axis 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 |
DefaultCoordinateSystemAxis | public DefaultCoordinateSystemAxis(Map properties, String abbreviation, AxisDirection direction, Unit unit, double minimum, double maximum, RangeMeaning rangeMeaning)(Code) | | Constructs an axis from a set of properties. The properties map is given unchanged to the
.
Parameters: properties - Set of properties. Should contains at least "name" . Parameters: abbreviation - The used for thiscoordinate system axes. Parameters: direction - The of this coordinate system axis. Parameters: unit - The used for this coordinatesystem axis. Parameters: minimum - The minimum value normally allowed for this axis. Parameters: maximum - The maximum value normally allowed for this axis. Parameters: rangeMeaning - The meaning of axis value range specified by the minimum andmaximum values. since: 2.3 |
DefaultCoordinateSystemAxis | public DefaultCoordinateSystemAxis(Map properties, String abbreviation, AxisDirection direction, Unit unit)(Code) | | Constructs an unbounded axis from a set of properties. The properties map is given
unchanged to the
. The
and
values are inferred from the axis unit and
direction.
Parameters: properties - Set of properties. Should contains at least "name" . Parameters: abbreviation - The used for thiscoordinate system axes. Parameters: direction - The of this coordinate system axis. Parameters: unit - The used for this coordinatesystem axis. |
DefaultCoordinateSystemAxis | public DefaultCoordinateSystemAxis(String abbreviation, AxisDirection direction, Unit unit)(Code) | | Constructs an axis with the same
as the abbreviation.
Parameters: abbreviation - The used for thiscoordinate system axes. Parameters: direction - The of this coordinate system axis. Parameters: unit - The used for this coordinatesystem axis. |
DefaultCoordinateSystemAxis | public DefaultCoordinateSystemAxis(InternationalString name, String abbreviation, AxisDirection direction, Unit unit)(Code) | | Constructs an axis with a name as an
and an abbreviation. The
is set to the
unlocalized version of the
name argument, as given by
name.
(null) . The
same
name argument is also stored as an
, which
allows fetching localized versions of the name.
Parameters: name - The name of this axis. Also stored as an alias for localization purpose. Parameters: abbreviation - The used for thiscoordinate system axis. Parameters: direction - The of this coordinate system axis. Parameters: unit - The used for this coordinatesystem axis. |
equals | public boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)(Code) | | Compares the specified object with this axis for equality.
Parameters: object - The object to compare to this . Parameters: compareMetadata - true for performing a strict comparaison, or false for comparing only properties relevant to transformations. true if both objects are equal. |
getAbbreviation | public String getAbbreviation()(Code) | | The abbreviation used for this coordinate system axes. This abbreviation is also
used to identify the ordinates in coordinate tuple. Examples are "X"
and "Y".
The coordinate system axis abbreviation. |
getAngle | public static double getAngle(AxisDirection source, AxisDirection target)(Code) | | Returns the arithmetic (counterclockwise) angle from the first direction to the second
direction, in decimal degrees. This method returns a value between
-180° and +180°, or
Double.NaN 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:
- The angle from
to
is 90°
- The angle from
to
is -90°
- The angle from "North along 90 deg East" to
"North along 0 deg" is 90°.
since: 2.4 |
getCompassAngle | static int getCompassAngle(AxisDirection source, AxisDirection target)(Code) | | Tests for angle on compass only (do not tests angle between direction along meridians).
Returns
Integer.MIN_VALUE if the angle can't be computed.
|
getDirection | public static AxisDirection getDirection(String direction) throws NoSuchElementException(Code) | | Returns an axis direction constants from its name.
Parameters: direction - The direction name (e.g. "north", "east", etc.). The axis direction for the given name. throws: NoSuchElementException - if the given name is not a know axis direction. |
getDirection | public AxisDirection getDirection()(Code) | | Direction of this coordinate system axis. In the case of Cartesian projected
coordinates, this is the direction of this coordinate system axis locally.
Examples:
or
,
or
,
or
.
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
org.geotools.referencing.crs.DefaultEngineeringCRS often requires
specific descriptions of the directions of its coordinate system axes.
|
getMaximumValue | public double getMaximumValue()(Code) | | Returns the maximum value normally allowed for this axis, in the
. If there is no maximum value, then
this method returns
.
since: 2.3 |
getMinimumValue | public double getMinimumValue()(Code) | | Returns the minimum value normally allowed for this axis, in the
. If there is no minimum value, then
this method returns
.
since: 2.3 |
getOpposite | final DefaultCoordinateSystemAxis getOpposite()(Code) | | Returns an axis with the opposite direction of this one, or
null if unknown.
This method is not public because only a few predefined constants have this information.
|
getPredefined | public static DefaultCoordinateSystemAxis getPredefined(String name, AxisDirection direction)(Code) | | Returns one of the predefined axis for the given name and direction, or
null if
none. This method searchs only in predefined constants like
DefaultCoordinateSystemAxis.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
of a predefined axis. The comparaison is case-sensitive (for example the
DefaultCoordinateSystemAxis.GEOCENTRIC_X abbreviation is uppercase
"X" , while the abbreviation for
the generic
DefaultCoordinateSystemAxis.X axis is lowercase
"x" ).
If the specified name doesn't match any abbreviation, then this method compares the name
against predefined axis
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
DefaultCoordinateSystemAxis.X and
DefaultCoordinateSystemAxis.DISPLAY_X axis. If this argument is
null , then the first
axis with a matching name or abbreviation will be returned.
Parameters: name - The axis name or abbreviation. Parameters: direction - An optional direction, or null . One of the constants declared in this class, or null . since: 2.4 |
getPredefined | static DefaultCoordinateSystemAxis getPredefined(CoordinateSystemAxis axis)(Code) | | Returns a predefined axis similar to the specified one except for units.
Returns
null if no predefined axis match.
|
getRangeMeaning | public RangeMeaning getRangeMeaning()(Code) | | Returns the meaning of axis value range specified by the
and
values. This element shall be omitted
when both minimum and maximum values are omitted. It may be included when minimum and/or
maximum values are included. If this element is omitted when minimum or maximum values are
included, the meaning is unspecified.
since: 2.3 |
getUnit | public Unit getUnit()(Code) | | The unit of measure used for this coordinate system axis. The value of this
coordinate in a coordinate tuple shall be recorded using this unit of measure,
whenever those coordinates use a coordinate reference system that uses a
coordinate system that uses this axis.
|
hashCode | public int hashCode()(Code) | | Returns a hash value for this axis. This value doesn't need to be the same
in past or future versions of this class.
|
isCompassDirection | public static boolean isCompassDirection(AxisDirection direction)(Code) | | Returns
true if the specified direction is a compass direction.
Compass directions include "North", "North-North-East",
"North-East", etc.
since: 2.4 |
nameMatches | public boolean nameMatches(String name)(Code) | | Returns
true if either the
or at least
one
matches the specified string. This method performs
all the searh done by the
, 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 explicitly state that the latitude and longitude axis names shall be
"Geodetic latitude" and "Geodetic longitude", will legacy OGC 01-009 (where WKT is defined)
said that the default values shall be "Lat" and "Lon".
Parameters: name - The name to compare. true if the primary name of at least one aliasmatches the specified name . |
perpendicular | public static boolean perpendicular(AxisDirection first, AxisDirection second)(Code) | | Returns
true if the specified directions are perpendicular.
since: 2.4 |
Methods inherited from org.geotools.referencing.AbstractIdentifiedObject | protected static Set asSet(Object[] array)(Code)(Java Doc) protected static void ensureAngularUnit(Unit unit) throws IllegalArgumentException(Code)(Java Doc) protected static void ensureLinearUnit(Unit unit) throws IllegalArgumentException(Code)(Java Doc) protected static void ensureNonNull(String name, Object object) throws IllegalArgumentException(Code)(Java Doc) protected static void ensureNonNull(String name, Object[] array, int index) throws IllegalArgumentException(Code)(Java Doc) protected static void ensureTimeUnit(Unit unit) throws IllegalArgumentException(Code)(Java Doc) final public boolean equals(Object object)(Code)(Java Doc) public boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)(Code)(Java Doc) protected static boolean equals(IdentifiedObject object1, IdentifiedObject object2, boolean compareMetadata)(Code)(Java Doc) protected static boolean equals(IdentifiedObject[] array1, IdentifiedObject[] array2, boolean compareMetadata)(Code)(Java Doc) protected static boolean equals(Collection collection1, Collection collection2, boolean compareMetadata)(Code)(Java Doc) public Collection getAlias()(Code)(Java Doc) public ReferenceIdentifier getIdentifier(Citation authority)(Code)(Java Doc) public static ReferenceIdentifier getIdentifier(IdentifiedObject info, Citation authority)(Code)(Java Doc) public Set getIdentifiers()(Code)(Java Doc) public ReferenceIdentifier getName()(Code)(Java Doc) public String getName(Citation authority)(Code)(Java Doc) public static String getName(IdentifiedObject info, Citation authority)(Code)(Java Doc) public static Map getProperties(IdentifiedObject info)(Code)(Java Doc) public static Map getProperties(IdentifiedObject info, Citation authority)(Code)(Java Doc) public InternationalString getRemarks()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public boolean nameMatches(String name)(Code)(Java Doc) public static boolean nameMatches(IdentifiedObject object, String name)(Code)(Java Doc) public static boolean nameMatches(IdentifiedObject o1, IdentifiedObject o2)(Code)(Java Doc)
|
|
|