Class WarpBuilder
- Object
- 
- WarpBuilder
 
- 
 public class WarpBuilder extends Object BuildsWarpobjects that approximate a specifiedMathTransformin a certain rectangular domain within the specified tolerance- Author:
- Andrea Aime - GeoSolutions
 
- 
- 
Constructor SummaryConstructors Constructor Description WarpBuilder(double tolerance)Creates a new warp builder
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description WarpbuildWarp(MathTransform2D mt, Rectangle domain)int[]getRowColsSplit(MathTransform2D mt, Rectangle2D.Double domain)Given a math transform and a source domain, return the number of rows and cols by which the domain should be split to avoid transform linearity issues, or null if it could not be found.booleanisValidDomain(Rectangle2D.Double domain)Returns true if the given domain is valid for the splitting algorithm.voidsetMaxPositions(int maxPositions)Sets the maximum number of positions in the optimized grid, in case we have more we'll fall back to the warp adapter.
 
- 
- 
- 
Method Detail- 
setMaxPositionspublic void setMaxPositions(int maxPositions) Sets the maximum number of positions in the optimized grid, in case we have more we'll fall back to the warp adapter. By default there is no limit
 - 
isValidDomainpublic boolean isValidDomain(Rectangle2D.Double domain) Returns true if the given domain is valid for the splitting algorithm. Can be called before getRowColsSplit to prevent exceptions. UnlikebuildWarp(MathTransform2D, Rectangle)the domain here can be expressed in geographic coordinates, so there is no requirement that the area is at least 1x1 (in geographic coordiantes, that's a massive area), but only that it's not empty- Parameters:
- domain- domain to check
 
 - 
getRowColsSplitpublic int[] getRowColsSplit(MathTransform2D mt, Rectangle2D.Double domain) Given a math transform and a source domain, return the number of rows and cols by which the domain should be split to avoid transform linearity issues, or null if it could not be found.
 - 
buildWarppublic Warp buildWarp(MathTransform2D mt, Rectangle domain) throws TransformException - Parameters:
- mt- The math transform to be approximated
- domain- The domain in which the transform will be approximated
- Throws:
- TransformException
 
 
- 
 
-