public class DefaultDerivedCRS extends AbstractCRS implements DerivedCRS
DerivedCRS
can not be projected CRS themselves, but may be derived from a projected CRS
(for example in order to use a polar coordinate system).
A DerivedCRS
instance may also implement one of the interfaces listed below,
provided that the conditions in the right column are meet (derived from ISO 19162):
Type | Conditions |
---|---|
GeodeticCRS | Base CRS is also a GeodeticCRS and is associated to the same type of coordinate system. |
VerticalCRS | Base CRS is also a VerticalCRS and coordinate system is a VerticalCS . |
TemporalCRS | Base CRS is also a TemporalCRS and coordinate system is a TimeCS . |
ParametricCRS | Base CRS is also a ParametricCRS and coordinate system is a ParametricCS . |
EngineeringCRS | Base CRS is a GeodeticCRS , ProjectedCRS or EngineeringCRS . |
create(…)
static method.
Alternatively, users can create their own DefaultDerivedCRS
subclass implementing the desired interface.
GeneralDerivedCRS
instances created
using only SIS factories and static constants can be shared by many objects and passed between threads without
synchronization.GeodeticAuthorityFactory.createDerivedCRS(String)
,
Serialized FormDefined 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 |
DefaultDerivedCRS(DerivedCRS crs)
Constructs a new coordinate reference system with the same values than the specified one.
|
protected |
DefaultDerivedCRS(Map<String,?> properties,
SingleCRS baseCRS,
Conversion conversion,
CoordinateSystem derivedCS)
Creates a derived CRS from a defining conversion.
|
protected |
DefaultDerivedCRS(Map<String,?> properties,
SingleCRS baseCRS,
CoordinateReferenceSystem interpolationCRS,
OperationMethod method,
MathTransform baseToDerived,
CoordinateSystem derivedCS)
Creates a derived CRS from a math transform.
|
Modifier and Type | Method and Description |
---|---|
static DefaultDerivedCRS |
castOrCopy(DerivedCRS object)
Returns a SIS coordinate reference system implementation with the same values than the given
arbitrary implementation.
|
protected long |
computeHashCode()
Invoked by
hashCode() for computing the hash code when first needed. |
static DefaultDerivedCRS |
create(Map<String,?> properties,
SingleCRS baseCRS,
Conversion conversion,
CoordinateSystem derivedCS)
Creates a derived CRS from a defining conversion and a type inferred from the given arguments.
|
static DefaultDerivedCRS |
create(Map<String,?> properties,
SingleCRS baseCRS,
CoordinateReferenceSystem interpolationCRS,
OperationMethod method,
MathTransform baseToDerived,
CoordinateSystem derivedCS)
Creates a derived CRS from a math transform and a type inferred from the given arguments.
|
boolean |
equals(Object object,
ComparisonMode mode)
Compares this coordinate reference system with the specified object for equality.
|
DefaultDerivedCRS |
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.
|
SingleCRS |
getBaseCRS()
Returns the CRS on which the conversion is applied.
|
Conversion |
getConversionFromBase()
Returns the conversion from the base CRS to this CRS.
|
CoordinateSystem |
getCoordinateSystem()
Returns the coordinate system.
|
Datum |
getDatum()
Returns the datum of the base CRS.
|
Class<? extends DerivedCRS> |
getInterface()
Returns the GeoAPI interface implemented by this class.
|
castOrCopy
getDomainOfValidity, getScope
castOrCopy, equals, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForName
print, toString, toString, toWKT
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getDomainOfValidity, getScope
getAlias, getIdentifiers, getName, getRemarks, toWKT
protected DefaultDerivedCRS(Map<String,?> properties, SingleCRS baseCRS, Conversion conversion, CoordinateSystem derivedCS) throws MismatchedDimensionException
Property name | Value type | Returned by |
---|---|---|
"name" | Identifier or String |
AbstractIdentifiedObject.getName() |
"alias" | GenericName or CharSequence (optionally as array) |
AbstractIdentifiedObject.getAlias() |
"identifiers" | Identifier (optionally as array) |
AbstractIdentifiedObject.getIdentifiers() |
"remarks" | InternationalString or String |
AbstractIdentifiedObject.getRemarks() |
"domainOfValidity" | Extent |
AbstractReferenceSystem.getDomainOfValidity() |
"scope" | InternationalString or String |
AbstractReferenceSystem.getScope() |
conversion
argument shall not includes the operation steps
for performing unit
conversions and change of axis order since those operations will be inferred by this constructor.properties
- the properties to be given to the new derived CRS object.baseCRS
- coordinate reference system to base the derived CRS on.conversion
- the defining conversion from a normalized
base to a normalized derived CRS.derivedCS
- the coordinate system for the derived CRS. The number of axes must match
the target dimension of the baseToDerived
transform.MismatchedDimensionException
- if the source and target dimensions of baseToDerived
do not match the dimensions of base
and derivedCS
respectively.create(Map, SingleCRS, Conversion, CoordinateSystem)
protected DefaultDerivedCRS(Map<String,?> properties, SingleCRS baseCRS, CoordinateReferenceSystem interpolationCRS, OperationMethod method, MathTransform baseToDerived, CoordinateSystem derivedCS)
MathTransform
shall transform coordinate
values specifically from the baseCRS
to this
CRS (optionally with an interpolation CRS);
there is no consideration about “normalized CRS” in this constructor.
properties
map given in argument can contain any entries documented in the
above constructor,
together with any entries documented by the conversion constructor provided that the Conversion
entry keys are prefixed by "conversion."
.
In particular, the two first properties listed below are mandatory:
Property name | Value type | Returned by |
---|---|---|
"name" | Identifier or String |
this.getName() |
"conversion.name" | Identifier or String |
conversionFromBase.getName() |
Optional properties (non exhaustive list) | ||
"identifiers" | Identifier (optionally as array) |
this.getIdentifiers() |
"domainOfValidity" | Extent |
conversionFromBase.getDomainOfValidity() |
properties
- the properties to be given to the DefaultConversion
object
(with keys prefixed by "conversion."
) and to the new derived CRS object.baseCRS
- coordinate reference system to base the derived CRS on.interpolationCRS
- the CRS of additional coordinates needed for the operation, or null
if none.method
- the coordinate operation method (mandatory in all cases).baseToDerived
- transform from positions in the base CRS to positions in this target CRS.derivedCS
- the coordinate system for the derived CRS.IllegalArgumentException
- if at least one argument has an incompatible number of dimensions.create(Map, SingleCRS, CoordinateReferenceSystem, OperationMethod, MathTransform, CoordinateSystem)
protected DefaultDerivedCRS(DerivedCRS crs)
This constructor performs a shallow copy, i.e. the properties are not cloned.
crs
- the coordinate reference system to copy.castOrCopy(DerivedCRS)
public static DefaultDerivedCRS create(Map<String,?> properties, SingleCRS baseCRS, Conversion conversion, CoordinateSystem derivedCS) throws MismatchedDimensionException
DerivedCRS
instance returned by this method may additionally implement
the GeodeticCRS
, VerticalCRS
, TemporalCRS
, ParametricCRS
or
EngineeringCRS
interface.
See the class javadoc for more information.properties
- the properties to be given to the new derived CRS object.baseCRS
- coordinate reference system to base the derived CRS on.conversion
- the defining conversion from a normalized base to a normalized derived CRS.derivedCS
- the coordinate system for the derived CRS. The number of axes
must match the target dimension of the baseToDerived
transform.MismatchedDimensionException
- if the source and target dimensions of baseToDerived
do not match the dimensions of base
and derivedCS
respectively.DefaultDerivedCRS(Map, SingleCRS, Conversion, CoordinateSystem)
,
GeodeticObjectFactory.createDerivedCRS(Map, CoordinateReferenceSystem, Conversion, CoordinateSystem)
public static DefaultDerivedCRS create(Map<String,?> properties, SingleCRS baseCRS, CoordinateReferenceSystem interpolationCRS, OperationMethod method, MathTransform baseToDerived, CoordinateSystem derivedCS)
DerivedCRS
instance returned by this method may additionally implement
the GeodeticCRS
, VerticalCRS
, TemporalCRS
, ParametricCRS
or
EngineeringCRS
interface.
See the class javadoc for more information.properties
- the properties to be given to the DefaultConversion
object
(with keys prefixed by "conversion."
) and to the new derived CRS object.baseCRS
- coordinate reference system to base the derived CRS on.interpolationCRS
- the CRS of additional coordinates needed for the operation, or null
if none.method
- the coordinate operation method (mandatory in all cases).baseToDerived
- transform from positions in the base CRS to positions in this target CRS.derivedCS
- the coordinate system for the derived CRS.IllegalArgumentException
- if at least one argument has an incompatible number of dimensions.DefaultDerivedCRS(Map, SingleCRS, CoordinateReferenceSystem, OperationMethod, MathTransform, CoordinateSystem)
public static DefaultDerivedCRS castOrCopy(DerivedCRS 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 DerivedCRS> getInterface()
DerivedCRS.class
.
DerivedCRS
sub-interface. Overriding possibility is left mostly for implementors who wish to extend GeoAPI with
their own set of interfaces.DerivedCRS.class
or a user-defined sub-interface.public Datum getDatum()
getDatum
in interface SingleCRS
public SingleCRS getBaseCRS()
getBaseCRS
in interface GeneralDerivedCRS
public Conversion getConversionFromBase()
this
CRS.this
CRS.
null
.getConversionFromBase
in interface GeneralDerivedCRS
public CoordinateSystem getCoordinateSystem()
getCoordinateSystem
in interface CoordinateReferenceSystem
getCoordinateSystem
in interface SingleCRS
getCoordinateSystem
in class AbstractCRS
public DefaultDerivedCRS forConvention(AxesConvention convention)
this
.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)
ComparisonMode
is IGNORE_METADATA
or APPROXIMATIVE
,
then axis order of the base CRS are ignored
(but not axis order of this derived CRS).equals
in interface LenientComparable
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.protected String formatTo(Formatter formatter)
formatTo
in class AbstractCRS
formatter
- the formatter where to format the inner content of this WKT element."Fitted_CS"
(WKT 1) or a type-dependent keyword (WKT 2).Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.