Class DefaultMathTransformFactory.Context
Object
Context
- All Implemented Interfaces:
Serializable
,MathTransformProvider.Context
- Enclosing class:
DefaultMathTransformFactory
@Deprecated(since="1.5",
forRemoval=true)
public static class DefaultMathTransformFactory.Context
extends Object
implements MathTransformProvider.Context, Serializable
Deprecated, for removal: This API element is subject to removal in a future version.
Source and target coordinate systems for which a new parameterized transform is going to be used.
- Since:
- 0.7
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionContext()
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new context with all properties initialized tonull
. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Returns the matrix that represent the affine transform to concatenate before or after the parameterized transform.Deprecated, for removal: This API element is subject to removal in a future version.Replaced byMathTransformBuilder.getMethod()
.Deprecated, for removal: This API element is subject to removal in a future version.Returns the source coordinate system, ornull
if unspecified.Deprecated, for removal: This API element is subject to removal in a future version.Returns the ellipsoid used together with the source coordinate system, ornull
if none.Deprecated, for removal: This API element is subject to removal in a future version.Returns the target coordinate system, ornull
if unspecified.Deprecated, for removal: This API element is subject to removal in a future version.Returns the ellipsoid used together with the target coordinate system, ornull
if none.void
setSource
(GeodeticCRS crs) Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.void
setTarget
(GeodeticCRS crs) Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Returns a string representation of this context for debugging purposes.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface MathTransformProvider.Context
getFactory, getSourceCSType, getSourceDimensions, getTargetCSType, getTargetDimensions
-
Constructor Details
-
Context
public Context()Deprecated, for removal: This API element is subject to removal in a future version.Creates a new context with all properties initialized tonull
.
-
-
Method Details
-
setSource
Deprecated, for removal: This API element is subject to removal in a future version.Sets the source coordinate system to the given value. The source ellipsoid is unconditionally set tonull
.- Parameters:
cs
- the coordinate system to set as the source (can benull
).
-
setSource
Deprecated, for removal: This API element is subject to removal in a future version.Sets the source coordinate system and related ellipsoid to the components of given CRS. TheEllipsoid
, fetched from the geodetic reference frame, is often used together with anEllipsoidalCS
, but not necessarily. The geodetic CRS may also be associated with a spherical or Cartesian coordinate system, and the ellipsoid information may still be needed even with those non-ellipsoidal coordinate systems.This method is not for datum shifts. All datum information other than the ellipsoid are ignored.
- Parameters:
crs
- the coordinate system and ellipsoid to set as the source, ornull
.- Since:
- 1.3
-
setTarget
Deprecated, for removal: This API element is subject to removal in a future version.Sets the target coordinate system to the given value. The target ellipsoid is unconditionally set tonull
.- Parameters:
cs
- the coordinate system to set as the target (can benull
).
-
setTarget
Deprecated, for removal: This API element is subject to removal in a future version.Sets the target coordinate system and related ellipsoid to the components of given CRS. TheEllipsoid
, fetched from the geodetic reference frame, is often used together with anEllipsoidalCS
, but not necessarily. The geodetic CRS may also be associated with a spherical or Cartesian coordinate system, and the ellipsoid information may still be needed even with those non-ellipsoidal coordinate systems.This method is not for datum shifts. All datum information other than the ellipsoid are ignored.
- Parameters:
crs
- the coordinate system and ellipsoid to set as the target, ornull
.- Since:
- 1.3
-
getSourceCS
Deprecated, for removal: This API element is subject to removal in a future version.Returns the source coordinate system, ornull
if unspecified.- Returns:
- the source coordinate system, or
null
.
-
getSourceEllipsoid
Deprecated, for removal: This API element is subject to removal in a future version.Returns the ellipsoid used together with the source coordinate system, ornull
if none.- Returns:
- the ellipsoid used together with the source coordinate system, or
null
if none.
-
getTargetCS
Deprecated, for removal: This API element is subject to removal in a future version.Returns the target coordinate system, ornull
if unspecified.- Returns:
- the target coordinate system, or
null
.
-
getTargetEllipsoid
Deprecated, for removal: This API element is subject to removal in a future version.Returns the ellipsoid used together with the target coordinate system, ornull
if none.- Returns:
- the ellipsoid used together with the target coordinate system, or
null
if none.
-
getMatrix
Deprecated, for removal: This API element is subject to removal in a future version.Returns the matrix that represent the affine transform to concatenate before or after the parameterized transform. Therole
argument specifies which matrix is desired:NORMALIZATION
for the conversion from the source coordinate system to ainvalid reference
normalized
DENORMALIZATION
for the conversion from a normalized coordinate system to the target coordinate system, for example with (latitude, longitude) axis order. This denormalization needs to be applied after the parameterized transform.INVERSE_NORMALIZATION
andINVERSE_DENORMALIZATION
are also supported but rarely used.
DefaultMathTransformFactory.swapAndScaleAxes(MathTransform, Context)
. Users can override this method if they need to customize the normalization process.- Parameters:
role
- whether the normalization or denormalization matrix is desired.- Returns:
- the requested matrix, or
null
if thisContext
has no information about the coordinate system. - Throws:
FactoryException
- if an error occurred while computing the matrix.- See Also:
-
getMethodUsed
Deprecated, for removal: This API element is subject to removal in a future version.Replaced byMathTransformBuilder.getMethod()
.Returns the operation method used for the math transform creation. This is the same information asDefaultMathTransformFactory.getLastMethodUsed()
but more stable (not affected by transforms created with other contexts).- Returns:
- the operation method used by the factory.
- Throws:
IllegalStateException
- ifDefaultMathTransformFactory.createParameterizedTransform(ParameterValueGroup, Context)
has not yet been invoked.- Since:
- 1.3
-
getContextualParameters
Deprecated, for removal: This API element is subject to removal in a future version.Returns the names of parameters that have been inferred from the context. The set of keys can contain any of"dim"
,"semi_major"
,"semi_minor"
,"src_semi_major"
,"src_semi_minor"
,"tgt_semi_major"
,"tgt_semi_minor"
and/or"inverse_flattening"
, depending on the operation method used. The parameters named in that set are included in the parameters returned bygetCompletedParameters()
.Associated Boolean values
The associated Boolean in the map tells whether the named parameter value is really contextual. The Boolean isFALSE
if the user explicitly specified a value in the parameters given to theDefaultMathTransformFactory.createParameterizedTransform(ParameterValueGroup, Context)
method, and that value is different than the value inferred from the context. Such inconsistencies are also logged atLevel.WARNING
. In all other cases (no value specified by the user, or a value was specified but is consistent with the context), the associated Boolean in the map isTRUE
.- Specified by:
getContextualParameters
in interfaceMathTransformProvider.Context
- Returns:
- names of parameters inferred from context.
- Since:
- 1.3
-
getCompletedParameters
Deprecated, for removal: This API element is subject to removal in a future version.Returns the parameter values used for the math transform creation, including the parameters completed by the factory. This is the union ofparameters
withgetContextualParameters()
. The completed parameters may only have additional parameters compared to the user-supplied parameters. Parameter values that were explicitly set by the user are not overwritten.After this method has been invoked, the
invalid reference
setSourceAxes(…)
invalid reference
setTargetAxes(…)
- Specified by:
getCompletedParameters
in interfaceMathTransformProvider.Context
- Returns:
- the parameter values used by the factory.
-
toString
Deprecated, for removal: This API element is subject to removal in a future version.Returns a string representation of this context for debugging purposes. The current implementation writes the name of source/target coordinate systems and ellipsoids. If the contextual parameters have already been inferred, then their names are appended with inconsistent parameters (if any) written on a separated line.
-
DefaultMathTransformFactory.builder(String)
.