Package org.geotools.referencing.crs
Class DefaultDerivedCRS
- All Implemented Interfaces:
Serializable
,CoordinateReferenceSystem
,DerivedCRS
,GeneralDerivedCRS
,SingleCRS
,IdentifiedObject
,ReferenceSystem
A coordinate reference system that is defined by its coordinate conversion from another coordinate reference system
but is not a projected coordinate reference system. This category includes coordinate reference systems derived from
a projected coordinate reference system.
- Since:
- 2.1
- Author:
- Martin Desruisseaux (IRD)
- See Also:
-
Field Summary
Fields inherited from class AbstractDerivedCRS
_COMPARING, baseCRS, CONVERSION_TYPE_KEY, conversionFromBase
Fields inherited from class AbstractSingleCRS
datum
Fields inherited from class AbstractCRS
coordinateSystem
Fields inherited from class AbstractIdentifiedObject
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATOR
Fields inherited from class Formattable
SINGLE_LINE
Fields inherited from interface IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
Fields inherited from interface ReferenceSystem
DOMAIN_OF_VALIDITY_KEY, SCOPE_KEY
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultDerivedCRS
(String name, CoordinateReferenceSystem base, MathTransform baseToDerived, CoordinateSystem derivedCS) Constructs a derived CRS from a name.DefaultDerivedCRS
(Map<String, ?> properties, Conversion conversionFromBase, CoordinateReferenceSystem base, MathTransform baseToDerived, CoordinateSystem derivedCS) Constructs a derived CRS from a defining conversion.DefaultDerivedCRS
(Map<String, Object> properties, CoordinateReferenceSystem base, MathTransform baseToDerived, CoordinateSystem derivedCS) Constructs a derived CRS from a set of properties.DefaultDerivedCRS
(Map<String, Object> properties, OperationMethod method, CoordinateReferenceSystem base, MathTransform baseToDerived, CoordinateSystem derivedCS) Constructs a derived CRS from a set of properties.Constructs a new derived CRS with the same values than the specified one. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns a hash value for this derived CRS.Methods inherited from class AbstractDerivedCRS
equals, formatWKT, getBaseCRS, getConversionFromBase
Methods inherited from class AbstractSingleCRS
getAxis, getDatum, getDimension
Methods inherited from class AbstractCRS
distance, getCoordinateSystem, hashCode
Methods inherited from class AbstractReferenceSystem
getDomainOfValidity, getScope
Methods inherited from class AbstractIdentifiedObject
asSet, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, nameMatches, nameMatches, nameMatches
Methods inherited from class Formattable
cleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKT
Methods inherited from interface GeneralDerivedCRS
getBaseCRS, getConversionFromBase
Methods inherited from interface IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
Methods inherited from interface ReferenceSystem
getDomainOfValidity, getScope
Methods inherited from interface SingleCRS
getCoordinateSystem, getDatum
-
Constructor Details
-
DefaultDerivedCRS
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 Geotools 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 garanteed to work reliably for non-GeoTools 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 transformbaseToDerived
.- Throws:
MismatchedDimensionException
- if the source and target dimension ofbaseToDerived
don't match the dimension ofbase
andderivedCS
respectively.- Since:
- 2.5
-
DefaultDerivedCRS
public DefaultDerivedCRS(Map<String, Object> properties, CoordinateReferenceSystem base, MathTransform baseToDerived, CoordinateSystem derivedCS) throws MismatchedDimensionExceptionConstructs 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 garanteed to work reliably for non-GeoTools 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 transformbaseToDerived
.- Throws:
MismatchedDimensionException
- if the source and target dimension ofbaseToDerived
don't match the dimension ofbase
andderivedCS
respectively.- Since:
- 2.5
-
DefaultDerivedCRS
public DefaultDerivedCRS(Map<String, Object> properties, OperationMethod method, CoordinateReferenceSystem base, MathTransform baseToDerived, CoordinateSystem derivedCS) throws MismatchedDimensionExceptionConstructs a derived CRS from a set of properties. 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.method
- A description of the method for the 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 transformbaseToDerived
.- Throws:
MismatchedDimensionException
- if the source and target dimension ofbaseToDerived
don't match the dimension ofbase
andderivedCS
respectively.
-
DefaultDerivedCRS
public DefaultDerivedCRS(Map<String, ?> properties, Conversion conversionFromBase, CoordinateReferenceSystem base, MathTransform baseToDerived, CoordinateSystem derivedCS) throws MismatchedDimensionExceptionConstructs 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 transformbaseToDerived
.- Throws:
MismatchedDimensionException
- if the source and target dimension ofbaseToDerived
don't match the dimension ofbase
andderivedCS
respectively.
-
-
Method Details
-
calculateHashCode
public int calculateHashCode()Returns a hash value for this derived CRS.- Overrides:
calculateHashCode
in classAbstractDerivedCRS
- Returns:
- The hash code value. This value doesn't need to be the same in past or future versions of this class.
-