|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectFormattableObject
AbstractIdentifiedObject
AbstractReferenceSystem
AbstractCRS
AbstractSingleCRS
AbstractDerivedCRS
@Immutable public class AbstractDerivedCRS
A coordinate reference system that is defined by its coordinate conversion from another CRS (not by a datum).
This class is conceptually abstract, even if it is technically possible to
instantiate it. Typical applications should create instances of the most specific subclass with
Default prefix instead. An exception to this rule may occurs when it is not possible to
identify the exact type.
| referencing/geotk-referencing (download) | View source code for this class |
| Field Summary | |
|---|---|
protected CoordinateReferenceSystem |
baseCRS
The base coordinate reference system. |
static String |
CONVERSION_TYPE_KEY
Key for the "conversionType" property to be given to the constructor. |
protected Conversion |
conversionFromBase
The conversion from the base CRS to this CRS. |
| Fields inherited from class AbstractIdentifiedObject |
|---|
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATOR |
| Fields inherited from class FormattableObject |
|---|
EPSG, GEOTIFF, INTERNAL, OGC, SINGLE_LINE |
| Fields inherited from interface ReferenceSystem |
|---|
DOMAIN_OF_VALIDITY_KEY, SCOPE_KEY |
| Fields inherited from interface IdentifiedObject |
|---|
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY |
| Constructor Summary | |
|---|---|
protected |
AbstractDerivedCRS(GeneralDerivedCRS crs)
Constructs a new derived CRS with the same values than the specified one. |
protected |
AbstractDerivedCRS(Map<String,?> properties,
Conversion conversionFromBase,
CoordinateReferenceSystem base,
MathTransform baseToDerived,
CoordinateSystem derivedCS)
Constructs a derived CRS from a defining conversion. |
protected |
AbstractDerivedCRS(Map<String,?> properties,
CoordinateReferenceSystem base,
MathTransform baseToDerived,
CoordinateSystem derivedCS)
Constructs a derived CRS from a set of properties. |
| Method Summary | |
|---|---|
protected int |
computeHashCode()
Computes a hash value for this identified object. |
boolean |
equals(Object object,
ComparisonMode mode)
Compares this coordinate reference system with the specified object for equality. |
String |
formatWKT(Formatter formatter)
Formats the inner part of a Well Known Text (WKT) element. |
CoordinateReferenceSystem |
getBaseCRS()
Returns the base coordinate reference system. |
Conversion |
getConversionFromBase()
Returns the conversion from the base CRS to this CRS. |
| Methods inherited from class AbstractSingleCRS |
|---|
getAxis, getDatum, getDimension |
| Methods inherited from class AbstractCRS |
|---|
distance, getCoordinateSystem |
| Methods inherited from class AbstractReferenceSystem |
|---|
getDomainOfValidity, getScope |
| Methods inherited from class AbstractIdentifiedObject |
|---|
equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, hashCode, nameMatches, nameMatches, nameMatches |
| Methods inherited from class FormattableObject |
|---|
getDefaultIndentation, print, setDefaultIndentation, toString, toWKT, toWKT, toWKT |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface SingleCRS |
|---|
getCoordinateSystem, getDatum |
| Methods inherited from interface ReferenceSystem |
|---|
getDomainOfValidity, getScope |
| Methods inherited from interface IdentifiedObject |
|---|
getAlias, getIdentifiers, getName, getRemarks, toWKT |
| Field Detail |
|---|
public static final String CONVERSION_TYPE_KEY
"conversionType" property to be given to the constructor.
The value should be one of
PlanarProjection.class,
CylindricalProjection.class or
ConicProjection.class.
This is a Geotk specific property used as a hint for creating a projection of proper type from a defining conversion. In many cases, this hint is not needed since Geotk is often capable to infer it. This hint is used mostly by advanced factories like the EPSG backed one.
DefaultConversion.create(org.opengis.referencing.operation.Conversion, org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.operation.MathTransform, java.lang.Class extends org.opengis.referencing.operation.Conversion>),
Constant Field Valuesprotected final CoordinateReferenceSystem baseCRS
protected final Conversion conversionFromBase
| Constructor Detail |
|---|
protected AbstractDerivedCRS(GeneralDerivedCRS crs)
crs - The coordinate reference system to copy.
protected AbstractDerivedCRS(Map<String,?> properties,
Conversion conversionFromBase,
CoordinateReferenceSystem base,
MathTransform baseToDerived,
CoordinateSystem derivedCS)
throws MismatchedDimensionException
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.
MismatchedDimensionException - if the source and target dimension of
baseToDerived don't match the dimension of base
and derivedCS respectively.
protected AbstractDerivedCRS(Map<String,?> properties,
CoordinateReferenceSystem base,
MathTransform baseToDerived,
CoordinateSystem derivedCS)
throws MismatchedDimensionException
The properties are given unchanged to the base class constructor. The following optional properties are also understood:
| Property name | Value type | Value given to |
|---|---|---|
"conversion.name" |
String |
getConversionFromBase().getName() |
Additional properties for the DefaultConversion object to be created can be
specified with the "conversion." prefix added in front of property names
(example: "conversion.remarks"). The same applies for operation method,
using the "method." prefix.
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.
MismatchedDimensionException - if the source and target dimension of
baseToDerived don't match the dimension of base
and derivedCS respectively.| Method Detail |
|---|
public CoordinateReferenceSystem getBaseCRS()
getBaseCRS in interface GeneralDerivedCRSpublic Conversion getConversionFromBase()
getConversionFromBase in interface GeneralDerivedCRS
public boolean equals(Object object,
ComparisonMode mode)
equals in interface LenientComparableequals in class AbstractSingleCRSobject - 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.protected int computeHashCode()
AbstractIdentifiedObject.hashCode() when first needed.
Implementation specific feature
In the Geotk implementation, the name, identifiers and remarks are not used for hash code computation.
Consequently two identified objects will return the same hash value if they are equal in the
sense of equals(…,
ComparisonMode.IGNORE_METADATA). This feature allows users to
implement metadata-insensitive HashMap.
computeHashCode in class AbstractSingleCRSpublic String formatWKT(Formatter formatter)
formatWKT in interface FormattableformatWKT in class AbstractCRSformatter - The formatter to use.
"FITTED_CS".FormattableObject.toWKT(),
FormattableObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||