java.lang.Object
org.apache.sis.referencing.operation.builder.Linearizer

final class Linearizer extends Object
Computes a linear approximation of a MathTransform.
Since:
1.1
Version:
1.1
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Do not allow instantiation of this class.
  • Method Summary

    Modifier and Type
    Method
    Description
    (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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 given gridToCRS 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.FactoryException
      Computes a linear approximation of the given transform. This is an expensive fallback used only when we could not find an existing value by inspection of gridToCRS transform steps.
      Throws:
      org.opengis.referencing.operation.TransformException
      org.opengis.util.FactoryException