Class CoordinateSystemTransform
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.referencing.operation.transform.AbstractMathTransform
org.apache.sis.referencing.operation.transform.CoordinateSystemTransform
- All Implemented Interfaces:
Parameterized,LenientComparable,org.opengis.referencing.operation.MathTransform
- Direct Known Subclasses:
CartesianToPolar,CartesianToSpherical,PolarToCartesian,SphericalToCartesian
Base class of conversions between coordinate systems.
Each subclass should have a singleton instance.
- Since:
- 0.7
- Version:
- 1.1
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
AbstractMathTransform.Inverse -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.opengis.referencing.operation.MathTransformThe complete transform, including conversion between degrees and radians.(package private) final ContextualParametersAn empty contextual parameter, used only for representing conversion from degrees to radians.private final intNumber of input and output dimensions.private final org.opengis.referencing.operation.OperationMethodAn operation method that describe this coordinate system conversion.private final org.opengis.referencing.operation.OperationMethodThe method augmented with one pass through dimension.private org.opengis.referencing.operation.MathTransformThecompletetransform in aPassThroughTransformwith a 1 trailing coordinate.Fields inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
MAXIMUM_BUFFER_SIZE, MAXIMUM_FAILURES -
Constructor Summary
ConstructorsConstructorDescriptionCoordinateSystemTransform(String method, String method3D, int dimension) Creates a new conversion between two types of coordinate system. -
Method Summary
Modifier and TypeMethodDescription(package private) final org.opengis.referencing.operation.MathTransformcompleteTransform(org.opengis.referencing.operation.MathTransformFactory factory) Returns the complete transform, including conversion between degrees and radians units.(package private) static org.opengis.referencing.operation.MathTransformcreate(org.opengis.referencing.operation.MathTransformFactory factory, org.opengis.referencing.cs.CoordinateSystem source, org.opengis.referencing.cs.CoordinateSystem target, ThreadLocal<org.opengis.referencing.operation.OperationMethod> lastMethod) Implementation ofDefaultMathTransformFactory.createCoordinateSystemChange(CoordinateSystem, CoordinateSystem, Ellipsoid), defined here for reducing theDefaultMathTransformFactoryweight in the common case where the conversions handled by this class are not needed.protected final ContextualParametersReturns the contextual parameters.final org.opengis.parameter.ParameterValueGroupReturns the empty set of parameter values.final intReturns the number of dimensions in the source coordinate tuples.final intReturns the number of dimensions in the target coordinate tuples.private static org.opengis.referencing.operation.OperationMethodCreates an operation method of the given name.(package private) final org.opengis.referencing.operation.MathTransformpassthrough(org.opengis.referencing.operation.MathTransformFactory factory) Returns the cylindrical, including conversion between degrees and radians units.Methods inherited from class org.apache.sis.referencing.operation.transform.AbstractMathTransform
beforeFormat, computeHashCode, derivative, equals, equals, formatTo, getDomain, getParameterDescriptors, hashCode, inverse, isIdentity, isInverseEquals, mismatchedDimension, transform, transform, transform, transform, transform, transform, tryConcatenateMethods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toString, toWKTMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opengis.referencing.operation.MathTransform
toWKT
-
Field Details
-
dimension
private final int dimensionNumber of input and output dimensions. -
method
private final transient org.opengis.referencing.operation.OperationMethod methodAn operation method that describe this coordinate system conversion. This is used for providing a value inDefaultMathTransformFactory.getLastMethodUsed(). -
method3D
private final transient org.opengis.referencing.operation.OperationMethod method3DThe method augmented with one pass through dimension. May be the same instance thanmethodif that method is already 3D.Note: ifThis method is used formethodis "Polar to Cartesian", thenmethod3Dis "Cylindrical to Cartesian".CoordinateOperationWKT formatting. Contrarily tomethod, thismethod3Dis never used forMathTransformWKT. Instead, the latter case is represented by a concatenation ofmethodwith a pass-through. -
context
An empty contextual parameter, used only for representing conversion from degrees to radians. -
complete
private transient volatile org.opengis.referencing.operation.MathTransform completeThe complete transform, including conversion between degrees and radians.- See Also:
-
passthrough
private transient volatile org.opengis.referencing.operation.MathTransform passthroughThecompletetransform in aPassThroughTransformwith a 1 trailing coordinate. This is used for supporting the cylindrical case on top the polar case.- See Also:
-
-
Constructor Details
-
CoordinateSystemTransform
Creates a new conversion between two types of coordinate system. Subclasses may need to invokeContextualParameters.normalizeGeographicInputs(double)orContextualParameters.denormalizeGeographicOutputs(double)after this constructor.
-
-
Method Details
-
method
Creates an operation method of the given name. -
completeTransform
final org.opengis.referencing.operation.MathTransform completeTransform(org.opengis.referencing.operation.MathTransformFactory factory) throws org.opengis.util.FactoryException Returns the complete transform, including conversion between degrees and radians units.- Throws:
org.opengis.util.FactoryException
-
passthrough
final org.opengis.referencing.operation.MathTransform passthrough(org.opengis.referencing.operation.MathTransformFactory factory) throws org.opengis.util.FactoryException Returns the cylindrical, including conversion between degrees and radians units. This method is legal only forPolarToCartesianorCartesianToPolar.- Throws:
org.opengis.util.FactoryException
-
getSourceDimensions
public final int getSourceDimensions()Returns the number of dimensions in the source coordinate tuples. Shall be equal togetSourceCS().getDimension().- Specified by:
getSourceDimensionsin interfaceorg.opengis.referencing.operation.MathTransform- Specified by:
getSourceDimensionsin classAbstractMathTransform- Returns:
- the number of dimensions of input points.
- See Also:
-
getTargetDimensions
public final int getTargetDimensions()Returns the number of dimensions in the target coordinate tuples. Shall be equal togetTargetCS().getDimension().- Specified by:
getTargetDimensionsin interfaceorg.opengis.referencing.operation.MathTransform- Specified by:
getTargetDimensionsin classAbstractMathTransform- Returns:
- the number of dimensions of output points.
- See Also:
-
getParameterValues
public final org.opengis.parameter.ParameterValueGroup getParameterValues()Returns the empty set of parameter values.- Specified by:
getParameterValuesin interfaceParameterized- Overrides:
getParameterValuesin classAbstractMathTransform- Returns:
- the parameter values for this math transform, or
nullif unspecified. Note that those parameters may be normalized (e.g. represent a transformation of an ellipsoid of semi-major axis length of 1). - See Also:
-
getContextualParameters
Returns the contextual parameters. This is used for telling to the Well Known Text (WKT) formatter that thisCoordinateSystemTransformtransform is usually preceeded or followed by a conversion between degree and radian units of measurement.- Overrides:
getContextualParametersin classAbstractMathTransform- Returns:
- the parameter values for the sequence of normalize →
this→ denormalize transforms, ornullif unspecified. Callers should not modify the returned parameters, since modifications (if allowed) will generally not be reflected back in thisMathTransform.
-
create
static org.opengis.referencing.operation.MathTransform create(org.opengis.referencing.operation.MathTransformFactory factory, org.opengis.referencing.cs.CoordinateSystem source, org.opengis.referencing.cs.CoordinateSystem target, ThreadLocal<org.opengis.referencing.operation.OperationMethod> lastMethod) throws org.opengis.util.FactoryException Implementation ofDefaultMathTransformFactory.createCoordinateSystemChange(CoordinateSystem, CoordinateSystem, Ellipsoid), defined here for reducing theDefaultMathTransformFactoryweight in the common case where the conversions handled by this class are not needed.- Throws:
org.opengis.util.FactoryException
-