Class RubberSheetBuilder
- Object
-
- MathTransformBuilder
-
- 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
Constructors Constructor Description RubberSheetBuilder(List<MappedPosition> vectors, List<Position> 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MathTransform
computeMathTransform()
Returns MathTransform transformation setup as RubberSheet.Map<TINTriangle,Object>
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
-
-
-
-
Constructor Detail
-
RubberSheetBuilder
public RubberSheetBuilder(List<MappedPosition> vectors, List<Position> vertices) throws IllegalArgumentException, 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 MappedPositionvertices
- A List with four points defining the quadrilateral in the region of interest.- Throws:
IllegalArgumentException
MismatchedDimensionException
MismatchedReferenceSystemException
TriangulationException
-
-
Method Detail
-
getMinimumPointCount
public int getMinimumPointCount()
Returns the minimum number of points required by this builder.- Specified by:
getMinimumPointCount
in classMathTransformBuilder
- Returns:
- 1
-
getMapTriangulation
public Map<TINTriangle,Object> 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 classMathTransformBuilder
- Returns:
- calculated MathTransform
- Throws:
FactoryException
- when the size of source and destination point is not the same.
-
-