public class DefaultCoordinateSystemAxis extends AbstractIdentifiedObject implements CoordinateSystemAxis
GeographicCRS
. Conversely, these names shall not be used
in any other context. See the GeoAPI CoordinateSystemAxis
javadoc for more information.
AbstractCS
,
Unit
,
Serialized FormDefined in the sis-referencing
module
Modifier and Type | Field and Description |
---|---|
static String |
MAXIMUM_VALUE_KEY
Key for the
"maximumValue" property to be given to the constructor. |
static String |
MINIMUM_VALUE_KEY
Key for the
"minimumValue" property to be given to the constructor. |
static String |
RANGE_MEANING_KEY
Key for the
"rangeMeaning" property to be given to the constructor. |
LOCALE_KEY
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
Modifier | Constructor and Description |
---|---|
protected |
DefaultCoordinateSystemAxis(CoordinateSystemAxis axis)
Creates 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 axis from a set of properties.
|
Modifier and Type | Method and Description |
---|---|
static DefaultCoordinateSystemAxis |
castOrCopy(CoordinateSystemAxis object)
Returns a SIS axis implementation with the same values than the given arbitrary implementation.
|
protected long |
computeHashCode()
Invoked by
hashCode() for computing the hash code when first needed. |
boolean |
equals(Object object,
ComparisonMode mode)
Compares the specified object with this axis for equality.
|
protected String |
formatTo(Formatter formatter)
Formats this axis as a Well Known Text
Axis[…] element. |
String |
getAbbreviation()
Returns the abbreviation used for this coordinate system axes.
|
AxisDirection |
getDirection()
Returns the direction of this coordinate system axis.
|
Class<? extends CoordinateSystemAxis> |
getInterface()
Returns the GeoAPI interface implemented by this class.
|
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.
|
RangeMeaning |
getRangeMeaning()
|
Unit<?> |
getUnit()
Returns the unit of measure used for this coordinate system axis.
|
boolean |
isHeuristicMatchForName(String name)
Returns
true if either the primary name or at least
one alias matches the given string according heuristic rules. |
castOrCopy, equals, getAlias, getIdentifiers, getName, getRemarks, hashCode, isDeprecated
print, toString, toString, toWKT
getAlias, getIdentifiers, getName, getRemarks, toWKT
public static final String MINIMUM_VALUE_KEY
"minimumValue"
property to be given to the constructor.
This is used for setting the value to be returned by getMinimumValue()
.public static final String MAXIMUM_VALUE_KEY
"maximumValue"
property to be given to the constructor.
This is used for setting the value to be returned by getMaximumValue()
.public static final String RANGE_MEANING_KEY
"rangeMeaning"
property to be given to the constructor.
This is used for setting the value to be returned by getRangeMeaning()
.public DefaultCoordinateSystemAxis(Map<String,?> properties, String abbreviation, AxisDirection direction, Unit<?> unit)
Property name | Value type | Returned by |
---|---|---|
"minimumValue" | Number |
getMinimumValue() |
"maximumValue" | Number |
getMaximumValue() |
"rangeMeaning" | RangeMeaning |
getRangeMeaning() |
Defined in parent class (reminder) | ||
"name" | ReferenceIdentifier or String |
AbstractIdentifiedObject.getName() |
"alias" | GenericName or CharSequence (optionally as array) |
AbstractIdentifiedObject.getAlias() |
"identifiers" | ReferenceIdentifier (optionally as array) |
AbstractIdentifiedObject.getIdentifiers() |
"remarks" | InternationalString or String |
AbstractIdentifiedObject.getRemarks() |
properties
map are considered ignorable metadata
(except the axis name) while information provided as explicit arguments may have an impact on coordinate
transformation results. Exceptions to this rule are the minimumValue
and maximumValue
in
the particular case where rangeMeaning
is RangeMeaning.WRAPAROUND
.
If no minimum, maximum and range meaning are specified, then this constructor will infer them from the axis unit and direction.
properties
- The properties to be given to the identified object.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.protected DefaultCoordinateSystemAxis(CoordinateSystemAxis axis)
This constructor performs a shallow copy, i.e. the properties are not cloned.
axis
- The coordinate system axis to copy.castOrCopy(CoordinateSystemAxis)
public static DefaultCoordinateSystemAxis castOrCopy(CoordinateSystemAxis object)
null
, then this method returns null
. Otherwise if the
given object is already a SIS implementation, then the given object is returned unchanged.
Otherwise a new SIS implementation is created and initialized to the values of the given object.object
- The object to get as a SIS implementation, or null
if none.null
if the argument was null.public Class<? extends CoordinateSystemAxis> getInterface()
CoordinateSystemAxis.class
.
CoordinateSystemAxis
sub-interface. Overriding possibility is left mostly for implementors who wish to extend GeoAPI with their own
set of interfaces.getInterface
in class AbstractIdentifiedObject
CoordinateSystemAxis.class
or a user-defined sub-interface.public AxisDirection getDirection()
getDirection
in interface CoordinateSystemAxis
public String getAbbreviation()
getAbbreviation
in interface CoordinateSystemAxis
public Unit<?> getUnit()
CoordinateSystemAxis
was given by CoordinateSystem.getAxis
(i)
, then all ordinate
values at dimension i in a coordinate tuple shall be recorded using this unit of measure.getUnit
in interface CoordinateSystemAxis
public double getMinimumValue()
getMinimumValue
in interface CoordinateSystemAxis
public double getMaximumValue()
getMaximumValue
in interface CoordinateSystemAxis
public RangeMeaning getRangeMeaning()
getRangeMeaning
in interface CoordinateSystemAxis
null
if unspecified.public boolean isHeuristicMatchForName(String name)
true
if either the primary name or at least
one alias matches the given string according heuristic rules.
This method performs the comparison documented in the
super-class
,
with an additional flexibility for latitudes and longitudes:
"Lat"
, "Latitude"
and "Geodetic latitude"
are considered equivalent."Lon"
, "Longitude"
and "Geodetic longitude"
are considered equivalent.isHeuristicMatchForName
in class AbstractIdentifiedObject
name
- The name to compare.true
if the primary name of at least one alias matches the specified name
.IdentifiedObjects.isHeuristicMatchForName(IdentifiedObject, String)
public boolean equals(Object object, ComparisonMode mode)
getRangeMeaning()
is WRAPAROUND
, then getMinimumValue()
and getMaximumValue()
are considered non-ignorable metadata and will be compared for every modes.
All other properties are compared only for modes stricter than ComparisonMode.IGNORE_METADATA
.equals
in interface LenientComparable
equals
in class AbstractIdentifiedObject
object
- The object to compare to this
.mode
- STRICT
for performing a strict comparison, or
IGNORE_METADATA
for comparing only properties
relevant to coordinate transformations.true
if both objects are equal.AbstractIdentifiedObject.computeHashCode()
,
Utilities.deepEquals(Object, Object, ComparisonMode)
protected long computeHashCode()
hashCode()
for computing the hash code when first needed.
See AbstractIdentifiedObject.computeHashCode()
for more information.computeHashCode
in class AbstractIdentifiedObject
protected String formatTo(Formatter formatter)
Axis[…]
element.
CoordinateSystemAxis
javadoc for some of
those. The current Apache SIS implementation does not verify whether this axis name and abbreviation are
compliant; we assume that the user created a valid axis.
The only actions (derived from ISO 19162 rules) taken by this method are:
formatTo
in class AbstractIdentifiedObject
formatter
- The formatter where to format the inner content of this WKT element."Axis"
.FormattableObject.toWKT()
,
FormattableObject.toString()
Copyright © 2010–2015 The Apache Software Foundation. All rights reserved.