public class AbstractCRS extends AbstractReferenceSystem implements CoordinateReferenceSystem
Coordinate reference systems can have an arbitrary number of dimensions. The actual dimension of a given instance can be determined as below:
int dimension = crs.getCoordinateSystem().getDimension();However most subclasses restrict the allowed number of dimensions.
Default instead.
An exception to this rule may occur when it is not possible to identify the exact CRS type.
CoordinateReferenceSystem instances
created using only SIS factories and static constants can be shared by many objects and passed between threads
without synchronization.AbstractCS,
AbstractDatum,
Serialized FormDefined in the sis-referencing module
DEPRECATED_KEY, LOCALE_KEYDOMAIN_OF_VALIDITY_KEY, SCOPE_KEYALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCRS(CoordinateReferenceSystem crs)
Constructs a new coordinate reference system with the same values than the specified one.
|
|
AbstractCRS(Map<String,?> properties,
CoordinateSystem cs)
Creates a coordinate reference system from the given properties and coordinate system.
|
| Modifier and Type | Method and Description |
|---|---|
static AbstractCRS |
castOrCopy(CoordinateReferenceSystem object)
Returns a SIS coordinate reference system implementation with the values of 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 this coordinate reference system with the specified object for equality.
|
AbstractCRS |
forConvention(AxesConvention convention)
Returns a coordinate reference system equivalent to this one but with axes rearranged according the given
convention.
|
protected String |
formatTo(Formatter formatter)
Formats the inner part of the Well Known Text (WKT) representation of this CRS.
|
CoordinateSystem |
getCoordinateSystem()
Returns the coordinate system.
|
Class<? extends CoordinateReferenceSystem> |
getInterface()
Returns the GeoAPI interface implemented by this class.
|
getDomainOfValidity, getScopecastOrCopy, equals, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForNameprint, toString, toString, toWKTclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDomainOfValidity, getScopegetAlias, getIdentifiers, getName, getRemarks, toWKTpublic AbstractCRS(Map<String,?> properties, CoordinateSystem cs)
| Property name | Value type | Returned by |
|---|---|---|
| "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() |
| "domainOfValidity" | Extent |
AbstractReferenceSystem.getDomainOfValidity() |
| "scope" | InternationalString or String |
AbstractReferenceSystem.getScope() |
properties - the properties to be given to the coordinate reference system.cs - the coordinate system.protected AbstractCRS(CoordinateReferenceSystem crs)
This constructor performs a shallow copy, i.e. the properties are not cloned.
crs - the coordinate reference system to copy.castOrCopy(CoordinateReferenceSystem)public static AbstractCRS castOrCopy(CoordinateReferenceSystem object)
null, then this method returns null.GeodeticCRS (including the
GeographicCRS and
GeocentricCRS subtypes),
VerticalCRS,
TemporalCRS,
EngineeringCRS,
ImageCRS or
DefaultCompoundCS,
then this method delegates to the castOrCopy(…) method of the corresponding SIS subclass.
Note that if the given object implements more than one of the above-cited interfaces,
then the castOrCopy(…) method to be used is unspecified.AbstractCRS, then it is returned unchanged.AbstractCRS instance is created using the
copy constructor
and returned. Note that this is a shallow copy operation, since the other
properties contained in the given object are not recursively copied.object - the object to get as a SIS implementation, or null if none.null if the argument was null.public Class<? extends CoordinateReferenceSystem> getInterface()
CoordinateReferenceSystem.class.
Subclasses implementing a more specific GeoAPI interface shall override this method.getInterface in class AbstractReferenceSystempublic CoordinateSystem getCoordinateSystem()
getCoordinateSystem in interface CoordinateReferenceSystempublic AbstractCRS forConvention(AxesConvention convention)
this.convention - the axes convention for which a coordinate reference system is desired.this).AbstractCS.forConvention(AxesConvention)public boolean equals(Object object, ComparisonMode mode)
mode argument value is STRICT or
BY_CONTRACT, then all available properties are
compared including the domain of validity and
the scope.equals in interface LenientComparableequals in class AbstractReferenceSystemobject - 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 AbstractReferenceSystemprotected String formatTo(Formatter formatter)
formatTo in class AbstractIdentifiedObjectformatter - the formatter where to format the inner content of this WKT element.null if unknown.Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.