public class DefaultCompoundCRS extends AbstractCRS implements CompoundCRS
Flat list | Hierarchical structure |
---|---|
|
|
getSingleComponents()
or getComponents()
respectively.
GeographicCRS
or ProjectedCRS
or EngineeringCRS
).VerticalCRS
or a ParametricCRS
(but not both).TemporalCRS
.VerticalCRS
+ TemporalCRS
(without horizontal component) is accepted.GeocentricCRS
or three-dimensional GeographicCRS
can be combined with TemporalCRS
.CoordinateReferenceSystem
instances given to the constructor are also immutable.
Unless otherwise noted in the javadoc, this condition holds if all components were created using only
SIS factories and static constants.Defined in the sis-referencing
module
DEPRECATED_KEY, LOCALE_KEY
DOMAIN_OF_VALIDITY_KEY, SCOPE_KEY
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
Modifier | Constructor and Description |
---|---|
protected |
DefaultCompoundCRS(CompoundCRS crs)
Constructs a new coordinate reference system with the same values than the specified one.
|
|
DefaultCompoundCRS(Map<String,?> properties,
CoordinateReferenceSystem... components)
Constructs a compound CRS from the given properties and CRS.
|
Modifier and Type | Method and Description |
---|---|
static DefaultCompoundCRS |
castOrCopy(CompoundCRS object)
Returns a SIS CRS 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 this coordinate reference system with the specified object for equality.
|
DefaultCompoundCRS |
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 this CRS as a Well Known Text
CompoundCRS[…] element. |
List<CoordinateReferenceSystem> |
getComponents()
Returns the ordered list of coordinate reference systems.
|
Class<? extends CompoundCRS> |
getInterface()
Returns the GeoAPI interface implemented by this class.
|
List<SingleCRS> |
getSingleComponents()
Returns the ordered list of single coordinate reference systems.
|
castOrCopy, getCoordinateSystem
getDomainOfValidity, getScope
castOrCopy, equals, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForName
print, toString, toString, toWKT
getCoordinateSystem
getDomainOfValidity, getScope
getAlias, getIdentifiers, getName, getRemarks, toWKT
public DefaultCompoundCRS(Map<String,?> properties, CoordinateReferenceSystem... components)
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.components
- The sequence of coordinate reference systems making this compound CRS.protected DefaultCompoundCRS(CompoundCRS crs)
This constructor performs a shallow copy, i.e. the properties are not cloned.
crs
- The coordinate reference system to copy.public static DefaultCompoundCRS castOrCopy(CompoundCRS 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 attribute 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 CompoundCRS> getInterface()
CompoundCRS.class
.
CompoundCRS
sub-interface. Overriding possibility is left mostly for implementors who wish to extend GeoAPI with their
own set of interfaces.getInterface
in class AbstractCRS
CompoundCRS.class
or a user-defined sub-interface.public List<CoordinateReferenceSystem> getComponents()
CompoundCRS
instances, as described in class Javadoc.
For a flattened list of SingleCRS
instances, see getSingleComponents()
.getComponents
in interface CompoundCRS
public List<SingleCRS> getSingleComponents()
SingleCRS
objects.
See class Javadoc for more information.CRS.getSingleComponents(CoordinateReferenceSystem)
public DefaultCompoundCRS forConvention(AxesConvention convention)
this
.
If the given convention is AxesConvention.CONVENTIONALLY_ORIENTED
or
AxesConvention.NORMALIZED
, then this method will also reorder the components
with horizontal CRS (geodetic or projected) first, then vertical CRS, then temporal CRS.
forConvention
in class AbstractCRS
convention
- The axes convention for which a coordinate reference system is desired.this
).AbstractCS.forConvention(AxesConvention)
public boolean equals(Object object, ComparisonMode mode)
equals
in interface LenientComparable
equals
in class AbstractCRS
object
- 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.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 AbstractCRS
protected String formatTo(Formatter formatter)
CompoundCRS[…]
element.
GeographicCRS
or ProjectedCRS
or EngineeringCRS
).VerticalCRS
or a ParametricCRS
(but not both).TemporalCRS
.formatTo
in class AbstractCRS
formatter
- The formatter where to format the inner content of this WKT element."CompoundCRS"
(WKT 2) or "Compd_CS"
(WKT 1).Copyright © 2010–2015 The Apache Software Foundation. All rights reserved.