Module: resample

Methods

(static) resample(valueArrays, inWidth, inHeight, outWidth, outHeight, methodopt) → {Array.<TypedArray>}

Resample the input arrays using the selected resampling method.

Parameters:
Name Type Attributes Default Description
valueArrays Array.<TypedArray>

The input arrays to resample

inWidth number

The width of the input rasters

inHeight number

The height of the input rasters

outWidth number

The desired width of the output rasters

outHeight number

The desired height of the output rasters

method string <optional>
'nearest'

The desired resampling method

Source:
Returns:

The resampled rasters

Type
Array.<TypedArray>

(static) resampleBilinear(valueArrays, inWidth, inHeight, outWidth, outHeight) → {Array.<TypedArray>}

Resample the input arrays using bilinear interpolation.

Parameters:
Name Type Description
valueArrays Array.<TypedArray>

The input arrays to resample

inWidth number

The width of the input rasters

inHeight number

The height of the input rasters

outWidth number

The desired width of the output rasters

outHeight number

The desired height of the output rasters

Source:
Returns:

The resampled rasters

Type
Array.<TypedArray>

(static) resampleBilinearInterleaved(valueArrays, inWidth, inHeight, outWidth, outHeight, samples) → {TypedArray}

Resample the pixel interleaved input array using bilinear interpolation.

Parameters:
Name Type Description
valueArrays TypedArray

The input arrays to resample

inWidth number

The width of the input rasters

inHeight number

The height of the input rasters

outWidth number

The desired width of the output rasters

outHeight number

The desired height of the output rasters

samples number

The number of samples per pixel for pixel interleaved data

Source:
Returns:

The resampled raster

Type
TypedArray

(static) resampleInterleaved(valueArray, inWidth, inHeight, outWidth, outHeight, samples, methodopt) → {TypedArray}

Resample the pixel interleaved input array using the selected resampling method.

Parameters:
Name Type Attributes Default Description
valueArray TypedArray

The input array to resample

inWidth number

The width of the input rasters

inHeight number

The height of the input rasters

outWidth number

The desired width of the output rasters

outHeight number

The desired height of the output rasters

samples number

The number of samples per pixel for pixel interleaved data

method string <optional>
'nearest'

The desired resampling method

Source:
Returns:

The resampled rasters

Type
TypedArray

(static) resampleNearest(valueArrays, inWidth, inHeight, outWidth, outHeight) → {Array.<TypedArray>}

Resample the input arrays using nearest neighbor value selection.

Parameters:
Name Type Description
valueArrays Array.<TypedArray>

The input arrays to resample

inWidth number

The width of the input rasters

inHeight number

The height of the input rasters

outWidth number

The desired width of the output rasters

outHeight number

The desired height of the output rasters

Source:
Returns:

The resampled rasters

Type
Array.<TypedArray>

(static) resampleNearestInterleaved(valueArrays, inWidth, inHeight, outWidth, outHeight, samples) → {TypedArray}

Resample the pixel interleaved input array using nearest neighbor value selection.

Parameters:
Name Type Description
valueArrays TypedArray

The input arrays to resample

inWidth number

The width of the input rasters

inHeight number

The height of the input rasters

outWidth number

The desired width of the output rasters

outHeight number

The desired height of the output rasters

samples number

The number of samples per pixel for pixel interleaved data

Source:
Returns:

The resampled raster

Type
TypedArray