export declare enum DatasetType { LOCAL = "local", EXTERNALLY_HOSTED = "externally-hosted", VECTOR_TILE = "vector-tile", RASTER_TILE = "raster-tile", WMS_TILE = "wms-tile", TILE_3D = "tile-3d", BITMAP = "bitmap", ZARR = "zarr" } export declare const REMOTE_FILE_FORMATS: readonly ["auto", "csv", "geojson", "json", "arrow", "parquet", "geojsonl", "ndjson", "kml", "gpx", "tcx", "shp", "xlsx", "fgb"]; export type RemoteFileFormat = (typeof REMOTE_FILE_FORMATS)[number]; export declare const REMOTE_FILE_MIME_TYPES: Record, string>; export declare const REMOTE_FILE_EXTENSIONS: Record, string>; export declare const MIME_TO_REMOTE_FILE_EXTENSION: Record; export declare const DATASET_REFRESH_INTERVAL_OPTIONS: { value: number; labelId: string; }[]; /** Select value for a user-entered interval that is not one of the presets. */ export declare const DATASET_REFRESH_CUSTOM_VALUE = "custom"; /** Default custom poll interval when switching from Off to Custom. */ export declare const DATASET_REFRESH_DEFAULT_CUSTOM_MS = 30000; export declare const DATASET_REFRESH_MIN_INTERVAL_MS = 100; export declare function isPresetDatasetRefreshInterval(ms: number): boolean; export type ExternalDatasetRefreshStatus = 'idle' | 'loading' | 'error'; export type ExternalDatasetMetadata = { /** Remote URL of the dataset file. */ source: string; /** Optional format hint for extensionless URLs (SAS keys, etc). */ format?: Exclude | string; /** Last known size of the hosted resource, in bytes. */ size?: number; /** Poll interval in ms. Omitted or 0 means manual refresh only. */ refreshIntervalMs?: number; }; /** Runtime copy of {@link ExternalDatasetMetadata} with `format` renamed to avoid colliding with DATASET_FORMATS. */ export type ExternalDatasetRuntimeMetadata = { source: string; sourceFormat?: Exclude | string; size?: number; refreshIntervalMs?: number; etag?: string; lastModified?: string; lastFetchedAt?: number; refreshStatus?: ExternalDatasetRefreshStatus; refreshError?: string; /** Download progress 0–100 while `refreshStatus` is `loading`. */ refreshProgress?: number; }; export declare function getDatasetRefreshIntervalMs(metadata?: { refreshIntervalMs?: unknown; }): number; /** Parse a seconds field into ms, or null if the input is not a positive number. */ export declare function parseCustomRefreshIntervalMs(secondsText: string): number | null; /** Display string for the custom seconds input (keeps tenths for sub-second values). */ export declare function formatCustomRefreshSeconds(ms: number): string; export declare function getRemoteSourceFormat(metadata?: { sourceFormat?: unknown; format?: unknown; }): string | undefined; export declare enum RemoteTileFormat { MVT = "mvt", PMTILES = "pmtiles", WMS = "wms" } export declare enum PMTilesType { RASTER = "raster", MVT = "mvt" } export declare const REMOTE_TILE = "remote"; export type VectorTileDatasetMetadata = { type: typeof REMOTE_TILE; remoteTileFormat: RemoteTileFormat; tilesetDataUrl: string; tilesetMetadataUrl?: string; }; /** * Raster tileset metadata in STAC Item format. STAC version must be >= 1.0.0, * and the EO and Raster STAC extensions are required. This metadata shape can * be passed to the map to synchronously add a raster tileset. * @see https://github.com/radiantearth/stac-spec/blob/master/item-spec/item-spec.md */ export type RasterTileLocalMetadata = { type: 'Feature'; /** URL for tileset metadata. */ metadataUrl?: string; stac_version: string; stac_extensions: string[]; assets: Record; }; /** * Raster tileset metadata with a remote metadata URL. This metadata can * be passed to the map to asynchronously load a raster tileset. */ export type RasterTileRemoteMetadata = { metadataUrl: string; }; export declare enum RasterTileType { STAC = "stac", PMTILES = "pmtiles" } export type RasterTileMetadataSourceType = { pmtilesType?: PMTilesType; }; /** * Raster tileset metadata. */ export type RasterTileDatasetMetadata = (RasterTileLocalMetadata | RasterTileRemoteMetadata) & RasterTileMetadataSourceType; export type WMSServiceLayer = { name: string; title: string; boundingBox: number[] | null; queryable?: boolean; legendUrl?: string | null; }; export type WMSDatasetMetadata = { type: typeof REMOTE_TILE; remoteTileFormat: RemoteTileFormat.WMS; tilesetDataUrl: string; tilesetMetadataUrl: string; version: string; layers: WMSServiceLayer[]; label?: string; attribution?: string; }; /** A non-spatial dimension of a Zarr variable, e.g. `time`, `band`, `depth`. */ export type ZarrDimensionInfo = { name: string; size: number; /** * Coordinate values for the dimension, when the store exposes a matching * coordinate array. Time coordinates are decoded to epoch milliseconds. */ values?: (number | string | boolean)[]; /** Preserve coordinate semantics instead of guessing from its name or dtype. */ kind?: 'time' | 'duration' | 'number' | 'category'; units?: string; calendar?: string; standardName?: string; /** Original offsets for decoded CF time coordinates. */ rawValues?: (number | string | boolean)[]; }; /** Empty/missing keeps the original automatic layer time axis. */ export type ZarrAxisConfig = { kind?: 'auto' | 'off'; } | { kind: 'dimension'; dimension: string; } | { kind: 'forecast'; referenceTime: string; leadTime: string; }; export type ZarrVariableInfo = { /** Path of the variable within the Zarr group. Empty for a root-level array. */ path: string; /** * Node to open for rendering, when it differs from `path`. A pyramid keeps * its levels under a shared parent, so the renderer is handed that parent * while each variable keeps its own identity. */ nodePath?: string; /** Name of the array itself, i.e. the last path segment. */ name: string; /** * Label to show in variable pickers. Equal to `name`, qualified with enough * leading path segments to stay unique when sibling groups hold arrays of the * same name, e.g. `FUTUR/evap_total` and `HISTO/evap_total`. */ displayName: string; /** * GeoZarr-convention attributes describing the spatial grid. Taken from the * store when it declares them, otherwise derived from CF/GDAL metadata. */ geoAttrs?: Record; /** Parsed grid and pyramid settings for this variable, independent of the active variable. */ spatialMetadata?: Pick; /** Shape of the finest resolution level. */ shape: number[]; /** Chunk shape of the finest resolution level. */ chunks: number[]; dtype: string; /** Non-spatial dimensions, in array order. */ nonSpatialDims: ZarrDimensionInfo[]; /** The non-spatial dimension recognized as time, when present. */ timeDimension?: ZarrDimensionInfo; /** Value range advertised by the array attrs, used as the default rescale. */ dataRange?: [number, number]; /** Fill value advertised by the array attrs or zarr metadata. */ nodataValue?: number; }; export type ZarrDatasetMetadata = { /** Root URL of the Zarr store. */ url: string; /** Path of the selected variable within the store. */ variable?: string; crs?: { code?: string; wkt2?: string; }; /** Geographic extent of the selected variable, [west, south, east, north] in degrees. */ bounds?: [number, number, number, number] | null; /** Axis names of the selected variable, e.g. `['time', 'y', 'x']`. */ axes: string[]; xAxisIndex: number; yAxisIndex: number; /** Resolution levels, finest first. */ levels: { path: string; shape: number[]; chunks: number[]; }[]; /** * Set when every level is reprojected to EPSG:3857 and spans the whole world, * which is what `ndpyramid`'s `pyramid_reproject` writes. The level to draw * then follows the map zoom rather than the data's own resolution. */ webMercatorPyramid?: boolean; /** Every renderable variable in the store, for the variable picker. */ variables: ZarrVariableInfo[]; nonSpatialDims: ZarrDimensionInfo[]; timeDimension?: ZarrDimensionInfo; dataRange?: [number, number]; nodataValue?: number; label?: string; attribution?: string; }; export type Tile3DProviderAttribution = { title: string; url: string; logoUrl?: string; height?: number; bottom?: number; }; export type Tile3DProvider = { name: string; urlKey: string; attribution?: Tile3DProviderAttribution; }; export declare const TILE3D_PROVIDERS: Record; export type Tile3DDatasetMetadata = { tile3dUrl: string; tile3dAccessToken?: string; tile3dProvider?: string; }; export type BitmapBounds = [number, number, number, number] | [[number, number], [number, number], [number, number], [number, number]]; export type BitmapDatasetMetadata = { imageUrl: string; bounds: BitmapBounds; isDataUri?: boolean; };