Skip to main content

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

ReprojectionFns

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:167

Returns

number


refine()

refine(): void

Defined in: delatin.ts:161

Returns

void


run()

run(maxError?): void

Defined in: delatin.ts:150

Parameters

maxError?

number = DEFAULT_MAX_ERROR

Returns

void