@seasketch/geoprocessing
Version:
Geoprocessing and reporting framework for SeaSketch 2.0
47 lines (46 loc) • 1.98 kB
TypeScript
import { Polygon, Histogram, Feature, MultiPolygon, FeatureCollection, BBox } from "../../types/index.js";
import { Georaster } from "geoblaze";
export declare const geoblazeDefaultStatValues: {
count: number;
invalid: number;
max: null;
mean: null;
median: null;
min: null;
mode: null;
product: null;
range: null;
sum: number;
std: null;
valid: number;
variance: null;
};
/**
* Returns sum of raster value overlap with geometry. If no cells with a value are found within the geometry overlap, returns 0.
*/
export declare const getSum: (raster: Georaster, feat?: Feature<Polygon | MultiPolygon> | FeatureCollection<Polygon | MultiPolygon>) => Promise<number>;
/**
* Returns area of valid raster cells (not nodata) overlapping with feature. If no valid cells found, returns 0.
*/
export declare const getArea: (raster: Georaster, feat?: Feature<Polygon | MultiPolygon> | FeatureCollection<Polygon | MultiPolygon>) => Promise<number>;
/**
* Returns histogram of value overlap with geometry. If no cells with a value are found within the geometry overlap, returns 0.
*/
export declare const getHistogram: (raster: Georaster, feat?: Feature<Polygon | MultiPolygon> | FeatureCollection<Polygon | MultiPolygon>, options?: {
scaleType?: "nominal" | "ratio";
numClasses?: number;
classType?: "equal-interval" | "quantile";
}) => Promise<Histogram>;
/**
* Reprojects a feature to the same projection as the raster.
* @param raster
* @param feat
* @returns feature in projection of raster
* @throws if raster projection is not 4326 (backwards-compatibility) or 6933 (new equal area)
*/
export declare const toRasterProjection: (raster: Georaster, feat?: Feature<Polygon | MultiPolygon> | FeatureCollection<Polygon | MultiPolygon>) => any;
/**
* @param raster
* @returns the bounding box of the raster in WGS84 lat/lon coordinates
*/
export declare const getRasterBoxSpherical: (raster: Georaster) => BBox;