Class Linearizer
java.lang.Object
org.apache.sis.referencing.operation.builder.Linearizer
Computes a linear approximation of a
MathTransform
.- Since:
- 1.1
- Version:
- 1.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static org.opengis.referencing.operation.MathTransform
approximate
(org.opengis.referencing.operation.MathTransform gridToCRS, org.opengis.geometry.Envelope domain) Returns a linear approximation of the given transform for the specified domain.private static org.opengis.referencing.operation.MathTransform
compute
(org.opengis.referencing.operation.MathTransform gridToCRS, org.opengis.geometry.Envelope domain, DatumShiftGrid<?, ?> grid) Computes a linear approximation of the given transform.
-
Constructor Details
-
Linearizer
private Linearizer()Do not allow instantiation of this class.
-
-
Method Details
-
approximate
static org.opengis.referencing.operation.MathTransform approximate(org.opengis.referencing.operation.MathTransform gridToCRS, org.opengis.geometry.Envelope domain) throws org.opengis.referencing.operation.TransformException, org.opengis.util.FactoryException Returns a linear approximation of the given transform for the specified domain. The source positions are integer coordinates included in the given envelope. The target positions are the results of transforming source coordinates with the givengridToCRS
transform.If a linear approximation can be extracted from the given transform, this method returns that approximation directly. This method tries to avoid expensive calculation; it searches for transforms that can be processed easily.
- Parameters:
gridToCRS
- the transform from source coordinates (grid indices) to target coordinates.domain
- domain of integer source coordinates for which to get a linear approximation.- Returns:
- a linear approximation of given transform for the specified domain.
- Throws:
org.opengis.util.FactoryException
- if the transform approximation cannot be computed.org.opengis.referencing.operation.TransformException
-
compute
private static org.opengis.referencing.operation.MathTransform compute(org.opengis.referencing.operation.MathTransform gridToCRS, org.opengis.geometry.Envelope domain, DatumShiftGrid<?, ?> grid) throws org.opengis.referencing.operation.TransformException, org.opengis.util.FactoryExceptionComputes a linear approximation of the given transform. This is an expensive fallback used only when we could not find an existing value by inspection ofgridToCRS
transform steps.- Throws:
org.opengis.referencing.operation.TransformException
org.opengis.util.FactoryException
-