Class TransformBuilder

java.lang.Object
org.apache.sis.referencing.operation.builder.TransformBuilder
Direct Known Subclasses:
LinearTransformBuilder, LocalizationGridBuilder

public abstract class TransformBuilder extends Object
Creates a transform which will map approximately the given source positions to the given target positions. The transform may be a linear approximation the minimize the errors in a least square sense, or a more accurate transform using a localization grid.

Builders are not thread-safe. Builders can be used only once; points cannot be added or modified after create(MathTransformFactory) has been invoked.

Since:
0.8
Version:
0.8
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    For subclass constructors.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract org.opengis.referencing.operation.MathTransform
    create(org.opengis.referencing.operation.MathTransformFactory factory)
    Creates a transform from the source points to the target points.
    (package private) static org.opengis.referencing.operation.MathTransformFactory
    nonNull(org.opengis.referencing.operation.MathTransformFactory factory)
    Returns the given factory if non-null, or the default factory otherwise.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TransformBuilder

      protected TransformBuilder()
      For subclass constructors.
  • Method Details

    • create

      public abstract org.opengis.referencing.operation.MathTransform create(org.opengis.referencing.operation.MathTransformFactory factory) throws org.opengis.util.FactoryException
      Creates a transform from the source points to the target points. Invoking this method puts the builder in an unmodifiable state. Invoking this method more than once returns the same transform (the transform is not recomputed).
      Parameters:
      factory - the factory to use for creating the transform, or null for the default factory.
      Returns:
      the transform from source to target points.
      Throws:
      org.opengis.util.FactoryException - if the transform cannot be created, for example because the target points have not be specified.
    • nonNull

      static org.opengis.referencing.operation.MathTransformFactory nonNull(org.opengis.referencing.operation.MathTransformFactory factory)
      Returns the given factory if non-null, or the default factory otherwise.