@seasketch/geoprocessing
Version:
Geoprocessing and reporting framework for SeaSketch 2.0
61 lines (60 loc) • 2.09 kB
TypeScript
import { ImportVectorDatasourceOptions, ImportRasterDatasourceOptions } from "../../../src/types/index.js";
import { ProjectClientBase } from "../../../src/index.js";
/**
* Import a dataset into the project. Must be a src file that OGR or GDAL can read.
* Importing means stripping unnecessary properties/layers,
* converting to cloud optimized format, publishing to the datasets s3 bucket,
* and adding as datasource.
*/
export declare function importDatasource<C extends ProjectClientBase>(projectClient: C, options: ImportVectorDatasourceOptions | ImportRasterDatasourceOptions, extraOptions?: {
doPublish?: boolean;
newDatasourcePath?: string;
newDstPath?: string;
srcBucketUrl?: string;
}): Promise<{
datasourceId: string;
geo_type: "vector" | "raster";
formats: ("fgb" | "json" | "tif" | "subdivided")[];
precalc: boolean;
classKeys: string[];
src: string;
created: string;
lastUpdated: string;
propertiesToKeep: string[];
explodeMulti: boolean;
metadata?: {
name: string;
version: string;
publisher: string;
publishDate: string;
publishLink: string;
description?: string | undefined;
} | undefined;
idProperty?: string | undefined;
nameProperty?: string | undefined;
propertyFilter?: {
values: (string | number)[];
property: string;
} | undefined;
bboxFilter?: [number, number, number, number] | [number, number, number, number, number, number] | undefined;
layerName?: string | undefined;
} | {
datasourceId: string;
geo_type: "vector" | "raster";
formats: ("fgb" | "json" | "tif" | "subdivided")[];
precalc: boolean;
measurementType: "quantitative" | "categorical";
band: number;
src: string;
created: string;
lastUpdated: string;
metadata?: {
name: string;
version: string;
publisher: string;
publishDate: string;
publishLink: string;
description?: string | undefined;
} | undefined;
noDataValue?: number | undefined;
}>;