public static class DefaultMathTransformFactory.Context extends Object implements Serializable
DefaultMathTransformFactory
uses this information for:
"semi_major"
and "semi_minor"
parameters in map projections.OperationMethod
,
for example "Longitude rotation" (EPSG:9601) for changing the prime meridian.Defined in the sis-referencing
module
Constructor and Description |
---|
Context()
Creates a new context with all properties initialized to
null . |
Modifier and Type | Method and Description |
---|---|
ParameterValueGroup |
getCompletedParameters()
Returns the parameter values used for the math transform creation, including the parameters completed
by the factory.
|
Matrix |
getMatrix(ContextualParameters.MatrixRole role)
Returns the matrix that represent the affine transform to concatenate before or after
the parameterized transform.
|
CoordinateSystem |
getSourceCS()
Returns the source coordinate system, or
null if unspecified. |
Ellipsoid |
getSourceEllipsoid()
Returns the ellipsoid of the source ellipsoidal coordinate system, or
null if it does not apply. |
CoordinateSystem |
getTargetCS()
Returns the target coordinate system, or
null if unspecified. |
Ellipsoid |
getTargetEllipsoid()
Returns the ellipsoid of the target ellipsoidal coordinate system, or
null if it does not apply. |
void |
setSource(CoordinateSystem cs)
Sets the source coordinate system to the given value.
|
void |
setSource(EllipsoidalCS cs,
Ellipsoid ellipsoid)
Sets the source coordinate system and its associated ellipsoid to the given value.
|
void |
setTarget(CoordinateSystem cs)
Sets the target coordinate system to the given value.
|
void |
setTarget(EllipsoidalCS cs,
Ellipsoid ellipsoid)
Sets the target coordinate system and its associated ellipsoid to the given value.
|
public Context()
null
.public void setSource(CoordinateSystem cs)
null
.cs
- the coordinate system to set as the source (can be null
).public void setSource(EllipsoidalCS cs, Ellipsoid ellipsoid)
CoordinateReferenceSystem
for making clear that MathTransformFactory
does not perform any geodetic
datum analysis. For coordinate operations that take datum changes in account (including change
of prime meridian), see DefaultCoordinateOperationFactory
.
This policy helps to enforce a separation of concerns.cs
- the coordinate system to set as the source, or null
.ellipsoid
- the ellipsoid associated to the given coordinate system, or null
.public void setTarget(CoordinateSystem cs)
null
.cs
- the coordinate system to set as the target (can be null
).public void setTarget(EllipsoidalCS cs, Ellipsoid ellipsoid)
setSource(EllipsoidalCS, Ellipsoid)
.cs
- the coordinate system to set as the source, or null
.ellipsoid
- the ellipsoid associated to the given coordinate system, or null
.public CoordinateSystem getSourceCS()
null
if unspecified.null
.public Ellipsoid getSourceEllipsoid()
null
if it does not apply.
This information is valid only if getSourceCS()
returns an instance of EllipsoidalCS
.null
if it does not apply.public CoordinateSystem getTargetCS()
null
if unspecified.null
.public Ellipsoid getTargetEllipsoid()
null
if it does not apply.
This information is valid only if getTargetCS()
returns an instance of EllipsoidalCS
.null
if it does not apply.public Matrix getMatrix(ContextualParameters.MatrixRole role) throws FactoryException
role
argument specifies which matrix is desired:
NORMALIZATION
for the conversion from the source coordinate system to
a normalized coordinate system, usually with
(longitude, latitude) axis order in degrees or
(easting, northing) in metres.
This normalization needs to be applied before the parameterized transform.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
and
INVERSE_DENORMALIZATION
are also supported but rarely used.DefaultMathTransformFactory.swapAndScaleAxes(MathTransform, Context)
.
Users an override this method if they need to customize the normalization process.role
- whether the normalization or denormalization matrix is desired.null
if this Context
has no information about the coordinate system.FactoryException
- if an error occurred while computing the matrix.DefaultMathTransformFactory.createAffineTransform(Matrix)
,
DefaultMathTransformFactory.createParameterizedTransform(ParameterValueGroup, Context)
public ParameterValueGroup getCompletedParameters()
IllegalStateException
- if DefaultMathTransformFactory.createParameterizedTransform(ParameterValueGroup, Context)
has not yet been invoked.Copyright © 2010–2017 The Apache Software Foundation. All rights reserved.