UNPKG

@seasketch/geoprocessing

Version:

Geoprocessing and reporting framework for SeaSketch 2.0

24 lines (23 loc) 876 B
import { Metric } from "../../../src/types/index.js"; /** * Reads metrics from disk, validates them * If metrics file not exist then start a new one and ensure directory exists */ export declare function readPrecalcMetrics(filePath?: string): { value: number; classId: string | null; metricId: string; geographyId: string | null; sketchId: string | null; groupId: string | null; extra?: Record<string, import("../../../src/types/base.js").JSONValue> | undefined; }[]; /** * Writes metrics to disk, sorted and rekeyed for consistent ordering */ export declare function writePrecalcMetrics(metrics: Metric[], filePath?: string): void; /** Creates or updates metrics on disk */ export declare function createOrUpdatePrecalcMetrics(metrics: Metric[], options?: { matcher?: (m: Metric) => boolean; filePath?: string; }): Promise<Metric[]>;