⚠️ This library is a work in progress.
pixel-stats
Calculate Statistics for Imagery Pixels
known limitations
This package currently supports the following statistics: histogram, min, max, mean, mode, and sum. Support for standard deviation and median is forthcoming.
install
npm install pixel-stats
usage
const calc = ; const pixels = band1array band2array band3array; const options = interleaved: false max: true mean: true median: true mode: true min: true sum: false // don't return the sum of each band; const stats = ;
cloud optimized geotiffs
If you are looking to calculate statistics for a geotiff, consider using geotiff-stats.