Class: RasterReprojector
Defined in: delatin.ts:67
RasterReprojector performs a Delaunay triangulation-based reprojection of a raster image.
It takes as input a set of functions to associate pixel positions with coordinates in the input and output CRS, as well as the dimensions of the output image, and it produces a triangulated mesh that can be used to reproject the input raster onto the output raster with bounded error.
Constructors
Constructor
new RasterReprojector(
reprojectors,width,height?):RasterReprojector
Defined in: delatin.ts:111
Parameters
reprojectors
width
number
height?
number = width
Returns
RasterReprojector
Properties
exactOutputPositions
exactOutputPositions:
number[]
Defined in: delatin.ts:87
XY Positions in output CRS, computed via exact forward reprojection.
height
height:
number
Defined in: delatin.ts:74
Height of the image in pixels
reprojectors
reprojectors:
ReprojectionFns
Defined in: delatin.ts:68
triangles
triangles:
number[]
Defined in: delatin.ts:92
triangle vertex indices
uvs
uvs:
number[]
Defined in: delatin.ts:82
UV vertex coordinates (x, y), i.e. [x0, y0, x1, y1, ...]
These coordinates are floats that range from [0, 1] in both X and Y.
width
width:
number
Defined in: delatin.ts:71
Width of the image in pixels
Methods
getMaxError()
getMaxError():
number
Defined in: delatin.ts:186
Returns
number
refine()
refine():
void
Defined in: delatin.ts:180
Returns
void
run()
run(
maxError?,maxIterations?):void
Defined in: delatin.ts:157
Refine the mesh until its maximum error gets below the given one
Parameters
maxError?
number = DEFAULT_MAX_ERROR
The maximum reprojection error in input pixels that the mesh should achieve.
maxIterations?
Optional safeguard to prevent infinite loops in case of non-convergence. If the mesh fails to converge within this number of iterations, a warning will be logged and the function will return early.
maxIterations?
number = 10000
Returns
void
[return description]