org.geotoolkit.referencing.crs
Class DefaultDerivedCRS
Object
FormattableObject
AbstractIdentifiedObject
AbstractReferenceSystem
AbstractCRS
AbstractSingleCRS
AbstractDerivedCRS
DefaultDerivedCRS
- All Implemented Interfaces:
- Serializable, Formattable, LenientComparable, CoordinateReferenceSystem, DerivedCRS, GeneralDerivedCRS, SingleCRS, IdentifiedObject, ReferenceSystem
@Immutable
public class DefaultDerivedCRS
- extends AbstractDerivedCRS
- implements DerivedCRS
A coordinate reference system that is defined by its coordinate conversion from another
CRS but is not a projected CRS. This category includes coordinate reference systems derived
from a projected CRS, for example in order to use a PolarCS.
Note on the inclined case (two-dimensional)
Some methods like CRS.isHorizontalCRS(CoordinateReferenceSystem)
assume that the axes of the two-dimensional derived CRS are coplanar with the axes of the base CRS.
This is not always the case; for example it is possible to define a DerivedCRS on a plane
which is inclined relative to the base CRS. ISO 19111 does not specify how to handle such cases.
In Geotk we suggest a slight departure from the ISO standard: assign to the inclined DerivedCRS
a datum which is different than the base datum and which is not a
GeodeticDatum.
- Since:
- 2.0
- Version:
- 3.18
- Author:
- Martin Desruisseaux (IRD, Geomatys)
- See Also:
- Serialized Form
- Module:
- TODO:
- Provides an API for specifying the datum at construction time which is different
than the datum of the base CRS.
|
Constructor Summary |
DefaultDerivedCRS(DerivedCRS crs)
Constructs a new derived CRS with the same values than the specified one. |
DefaultDerivedCRS(Map<String,?> properties,
Conversion conversionFromBase,
CoordinateReferenceSystem base,
MathTransform baseToDerived,
CoordinateSystem derivedCS)
Constructs a derived CRS from a defining conversion. |
DefaultDerivedCRS(Map<String,?> properties,
CoordinateReferenceSystem base,
MathTransform baseToDerived,
CoordinateSystem derivedCS)
Constructs a derived CRS from a set of properties. |
DefaultDerivedCRS(String name,
CoordinateReferenceSystem base,
MathTransform baseToDerived,
CoordinateSystem derivedCS)
Constructs a derived CRS from a name. |
|
Method Summary |
static DefaultDerivedCRS |
wrap(DerivedCRS object)
Returns a Geotk CRS implementation with the same values than the given arbitrary
implementation. |
| Methods inherited from class AbstractIdentifiedObject |
equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, hashCode, nameMatches, nameMatches, nameMatches |
DefaultDerivedCRS
public DefaultDerivedCRS(DerivedCRS crs)
- Constructs a new derived CRS with the same values than the specified one.
This copy constructor provides a way to wrap an arbitrary implementation into a
Geotk 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.
- Parameters:
crs - The coordinate reference system to copy.- Since:
- 2.2
DefaultDerivedCRS
public DefaultDerivedCRS(String name,
CoordinateReferenceSystem base,
MathTransform baseToDerived,
CoordinateSystem derivedCS)
throws MismatchedDimensionException
- Constructs a derived CRS from a name. A default
operation method is inferred from the math transform.
This is a convenience constructor that is not guaranteed to work reliably for non-Geotk
implementations. Use the constructor expecting a defining
conversion for more determinist result.
- Parameters:
name - The name.base - Coordinate reference system to base the derived CRS on.baseToDerived - The transform from the base CRS to returned CRS.derivedCS - The coordinate system for the derived CRS. The number of axes
must match the target dimension of the transform baseToDerived.
- Throws:
MismatchedDimensionException - if the source and target dimension of
baseToDeviced don't match the dimension of base
and derivedCS respectively.- Since:
- 2.5
DefaultDerivedCRS
public DefaultDerivedCRS(Map<String,?> properties,
CoordinateReferenceSystem base,
MathTransform baseToDerived,
CoordinateSystem derivedCS)
throws MismatchedDimensionException
- Constructs a derived CRS from a set of properties. A default operation method is inferred from the math
transform. This is a convenience constructor that is not guaranteed to work reliably
for non-Geotk implementations. Use the constructor expecting a defining conversion for more determinist result.
The properties are given unchanged to the
super-class constructor.
- Parameters:
properties - Name and other properties to give to the new derived CRS object
and to the underlying conversion.base - Coordinate reference system to base the derived CRS on.baseToDerived - The transform from the base CRS to returned CRS.derivedCS - The coordinate system for the derived CRS. The number of axes
must match the target dimension of the transform baseToDerived.
- Throws:
MismatchedDimensionException - if the source and target dimension of
baseToDeviced don't match the dimension of base
and derivedCS respectively.- Since:
- 2.5
DefaultDerivedCRS
public DefaultDerivedCRS(Map<String,?> properties,
Conversion conversionFromBase,
CoordinateReferenceSystem base,
MathTransform baseToDerived,
CoordinateSystem derivedCS)
throws MismatchedDimensionException
- Constructs a derived CRS from a defining conversion. The
properties are given unchanged to the super-class constructor.
- Parameters:
properties - Name and other properties to give to the new derived CRS object.conversionFromBase - The defining conversion.base - Coordinate reference system to base the derived CRS on.baseToDerived - The transform from the base CRS to returned CRS.derivedCS - The coordinate system for the derived CRS. The number of axes
must match the target dimension of the transform baseToDerived.
- Throws:
MismatchedDimensionException - if the source and target dimension of
baseToDerived don't match the dimension of base
and derivedCS respectively.
wrap
public static DefaultDerivedCRS wrap(DerivedCRS object)
- Returns a Geotk CRS implementation with the same values than the given arbitrary
implementation. If the given object is
null, then this method returns null.
Otherwise if the given object is already a Geotk implementation, then the given object is
returned unchanged. Otherwise a new Geotk implementation is created and initialized to the
attribute values of the given object.
- Parameters:
object - The object to wrap in a Geotk implementation, or null if none.
- Returns:
- A Geotk implementation containing the values of the given object (may be the
given object itself), or
null if the argument was null. - Since:
- 3.18
Copyright © 2009-2011 Geotoolkit.org. All Rights Reserved.