-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathdataset.ts
More file actions
77 lines (65 loc) · 1.83 KB
/
Copy pathdataset.ts
File metadata and controls
77 lines (65 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// SPDX-License-Identifier: MIT
// Copyright contributors to the kepler.gl project
export enum DatasetType {
LOCAL = 'local',
VECTOR_TILE = 'vector-tile',
RASTER_TILE = 'raster-tile',
WMS_TILE = 'wms-tile'
}
export enum RemoteTileFormat {
MVT = 'mvt',
PMTILES = 'pmtiles',
WMS = 'wms'
}
export enum PMTilesType {
RASTER = 'raster',
MVT = 'mvt'
}
export 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<string, any>;
};
/**
* 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 enum RasterTileType {
STAC = 'stac',
PMTILES = 'pmtiles'
}
export type RasterTileMetadataSourceType = {
pmtilesType?: PMTilesType;
};
/**
* Raster tileset metadata.
*/
export type RasterTileDatasetMetadata = (RasterTileLocalMetadata | RasterTileRemoteMetadata) &
RasterTileMetadataSourceType;
export type WMSDatasetMetadata = {
type: typeof REMOTE_TILE;
remoteTileFormat: RemoteTileFormat.WMS;
tilesetDataUrl: string;
tilesetMetadataUrl: string;
version: string;
layers: {name: string; title: string; boundingBox: number[] | null}[];
};