@seasketch/geoprocessing
Version:
Geoprocessing and reporting framework for SeaSketch 2.0
39 lines (38 loc) • 1.47 kB
TypeScript
import { Metric, Geography, VectorDatasource } from "../../../src/types/index.js";
import { ProjectClientBase } from "../../../src/index.js";
/**
* Creates precalc metrics for a datasource and geography
* @param datasource InternalVectorDatasource that's been imported
* @param geography Geography to be calculated for
* @returns Metric[] to be added to precalc.json
*/
export declare function precalcVectorDatasource<C extends ProjectClientBase>(projectClient: C,
/** Input datasource */
datasource: VectorDatasource,
/** Input geography */
geography: Geography,
/** Geography datasource to get geography from */
geogDs: VectorDatasource, extraOptions?: {
/** Alternative path to store precalc data. useful for testing */
newDstPath?: string;
/** Alternative port to fetch data from */
port?: number;
}): Promise<Metric[]>;
/**
* Returns Metric array for vector datasource and geography
* @param datasource ImportVectorDatasourceConfig datasource to calculate metrics for
* @param geography Geography to calculate metrics for
* @returns Metric[]
*/
export declare function genVectorMetrics(
/** Input datasource */
datasource: VectorDatasource,
/** Input datasource url */
url: string,
/** Input geography */
geography: Geography,
/** Geography datasource to get geography from */
geogDs: VectorDatasource, extraOptions: {
/** Alternative path to store precalc data. useful for testing */
newDstPath?: string;
}): Promise<Metric[]>;