Class RubberSheetBuilder
Object
MathTransformBuilder
RubberSheetBuilder
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
ConstructorsConstructorDescriptionRubberSheetBuilder(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
Modifier and TypeMethodDescriptionprotected MathTransformReturns MathTransform transformation setup as RubberSheet.Returns the map of source and destination triangles.intReturns 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 Details
-
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:
IllegalArgumentExceptionMismatchedDimensionExceptionMismatchedReferenceSystemExceptionTriangulationException
-
-
Method Details
-
getMinimumPointCount
public int getMinimumPointCount()Returns the minimum number of points required by this builder.- Specified by:
getMinimumPointCountin classMathTransformBuilder- Returns:
- 1
-
getMapTriangulation
Returns the map of source and destination triangles.- Returns:
- The Map of source and destination triangles.
-
computeMathTransform
Returns MathTransform transformation setup as RubberSheet.- Specified by:
computeMathTransformin classMathTransformBuilder- Returns:
- calculated MathTransform
- Throws:
FactoryException- when the size of source and destination point is not the same.
-