Skip to content

@npm9912/v-map


@npm9912/v-map / map-provider/geotiff/utils/sampling-utils / sampleNearest

Function: sampleNearest() ​

sampleNearest(x, y, rasterBands, arrayType, width, height, offsetX, offsetY, colorStops?): [number, number, number, number]

Defined in: src/map-provider/geotiff/utils/sampling-utils.ts:22

Nearest-Neighbor Sampling with window-based reading and multi-band support Returns [R, G, B, A] values (0-255)

Parameters ​

x ​

number

y ​

number

rasterBands ​

TypedArray[]

arrayType ​

TypedArrayType

width ​

number

height ​

number

offsetX ​

number

offsetY ​

number

colorStops? ​

ColorStop[]

Returns ​

[number, number, number, number]