forked from camptocamp/ogc-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase-layer.ts
More file actions
61 lines (55 loc) · 1.55 KB
/
base-layer.ts
File metadata and controls
61 lines (55 loc) · 1.55 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
import type { BoundingBox, MetadataURL } from './models.js';
/**
* Core properties common to all layer types.
* This is the minimal contract that all layers must satisfy.
*/
export interface BaseLayerCore {
/**
* Unique identifier within the service.
* Maps to:
* - `name` for WMS, WFS, WMTS
* - `id` for OGC API, STAC
* - `title` for TMS (which lacks a separate ID)
*/
id: string;
/**
* Human-readable title for the layer.
*/
title?: string;
/**
* Detailed description of the layer.
* Maps to:
* - `abstract` for WMS, WFS, TMS
* - `description` for OGC API, STAC
*/
description?: string;
}
/**
* Extended layer properties that most layers support.
* Includes common metadata fields found across different services.
*/
export interface BaseLayerExtended extends BaseLayerCore {
/**
* Keywords/tags associated with the layer.
* Used for search and categorization.
*/
keywords?: string[];
/**
* Bounding box in WGS84 (EPSG:4326) coordinates.
* Format: [minx, miny, maxx, maxy]
*
* This is normalized across services:
* - WMS: Uses boundingBoxes['EPSG:4326'] or boundingBoxes['CRS:84']
* - WFS: Uses boundingBox or latLonBoundingBox
* - WMTS: Uses latLonBoundingBox
* - OGC API: Uses extent.spatial.bbox[0]
* - STAC: Uses extent.spatial.bbox[0]
* - TMS: Uses boundingBox (may not be WGS84)
*/
boundingBox?: BoundingBox;
/**
* Metadata URLs providing additional information about the layer.
* Links to ISO metadata, FGDC records, etc.
*/
metadata?: MetadataURL[];
}