org.geotools.referencing.operation.builder
Class RubberSheetBuilder

Object
  extended by MathTransformBuilder
      extended by RubberSheetBuilder

public class RubberSheetBuilder
extends MathTransformBuilder

Builds a RubberSheet transformation from a set of control points, defined as a List of MappedPosition objects, and a quadrilateral delimiting the outer area of interest, defined as a List of four DirectPosition objects. An explanation of the RubberSheet transformation algorithm can be seen here.

Since:
2.4
Author:
Jan Jezek, Adrian Custer

Field Summary
 
Fields inherited from class MathTransformBuilder
mtFactory
 
Constructor Summary
RubberSheetBuilder(List<MappedPosition> vectors, List<DirectPosition> vertices)
          Creates the Builder from a List of control points and a List of four DirectPositions defining the vertexes of the area for interpolation.
 
Method Summary
protected  MathTransform computeMathTransform()
          Returns MathTransform transformation setup as RubberSheet.
 HashMap getMapTriangulation()
          Returns the map of source and destination triangles.
 int getMinimumPointCount()
          Returns the minimum number of points required by this builder.
 
Methods inherited from class MathTransformBuilder
getCoordinateSystemType, getDimension, getErrorStatistics, getMappedPositions, getMathTransform, getName, getSourceCRS, getSourcePoints, getTargetCRS, getTargetPoints, getTransformation, printPoints, setMappedPositions, setSourcePoints, setTargetPoints, toString
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RubberSheetBuilder

public RubberSheetBuilder(List<MappedPosition> vectors,
                          List<DirectPosition> vertices)
                   throws MismatchedSizeException,
                          MismatchedDimensionException,
                          MismatchedReferenceSystemException,
                          TriangulationException
Creates the Builder from a List of control points and a List of four DirectPositions defining the vertexes of the area for interpolation.

Parameters:
vectors - A List of MappedPosition
vertices - A List with four points defining the quadrilateral in the region of interest.
Throws:
MismatchedSizeException
MismatchedDimensionException
MismatchedReferenceSystemException
TriangulationException
Method Detail

getMinimumPointCount

public int getMinimumPointCount()
Returns the minimum number of points required by this builder.

Specified by:
getMinimumPointCount in class MathTransformBuilder
Returns:
1

getMapTriangulation

public HashMap getMapTriangulation()
Returns the map of source and destination triangles.

Returns:
The Map of source and destination triangles.

computeMathTransform

protected MathTransform computeMathTransform()
                                      throws FactoryException
Returns MathTransform transformation setup as RubberSheet.

Specified by:
computeMathTransform in class MathTransformBuilder
Returns:
calculated MathTransform
Throws:
FactoryException - when the size of source and destination point is not the same.


Copyright © 1996-2014 Geotools. All Rights Reserved.