Skip to main content

LayerDataset<DataType, ServiceType, ExtensionType>

LayerDataset<DataType, ServiceType, ExtensionType> = object

Core dataset configuration combining service integration and data specification.

Remarks

This constraint system enables type-safe dataset definitions and compile-time validation of service/data type combinations.

Example

// Define a GeoJSON dataset from WFS service
const wfsDataset: LayerDataset<'GEOJSON', 'WFS'> = {
id: 'SoMeLoNgIdStRiNg',
level: 'generated',
visible: true,
mutatable: false,
name: 'Weather Stations',
description: 'Real-time weather monitoring stations',
serviceType: 'WFS',
dataType: 'GEOJSON',
presentationTypes: {
temperature: ['icon', 'point'],
},
fields: [
{
id: 'temp',
visible: true,
nullable: false,
type: 'f32',
label: 'Temperature'
}
],
metadata: {
table: 'weather_stations',
geometryProperty: 'location',
defaultFields: ['id', 'temp', 'location']
}
};

Type Parameters

DataType

DataType extends LayerDataType

Must extend LayerDataType ('GEOJSON' | 'ARROW' | 'Unknown')

ServiceType

ServiceType extends LayerServiceType

Must extend LayerServiceType (from GeoserverServiceType)

ExtensionType

ExtensionType = ""

String union of available visual extension types.

Properties

dataType

readonly dataType: DataType

Expected response data format. Must be compatible with the specified serviceType.

This value is set at dataset creation and cannot be modified

Example

'GEOJSON', 'ARROW'

description

description: string

Detailed dataset description for documentation and components.


fields

fields: LayerDatasetField[]

Complete field schema for this dataset.


id

id: string

Unique dataset identifier across the application.


level

level: "generated" | "user"

Dataset provenance indicator.

Remarks

  • generated: System-created dataset (automated processes, imports)
  • user: User-uploaded or configured dataset (manual creation)

metadata

metadata: LayerDatasetMetadata

Service integration and rendering metadata.


mutatable

mutatable: boolean

Mutability flag for dataset modification operations. Controls whether users can edit dataset configuration or data.

Remarks

CURRENTLY UNUSED.


name

name: string

Human-readable dataset name for UI display.


presentationTypes

presentationTypes: Record<string, (LayerConfigType | ExtensionType)[] | null>

Available presentation modes per field.

Remarks

Structure: Record<fieldName, (LayerConfigType | ExtensionType)[] | null>

  • Key: Field name from the dataset
  • Value: Array of supported visualization types

Future

Support multiple geometry fields with independent presentation configurations (e.g., point location + coverage area).

Example

{
temperature: ['heatmap', 'point', 'choropleth'],
population: ['choropleth', 'point'],
elevation: ['contour', '3d-surface'],
}

serviceType

readonly serviceType: ServiceType

Service integration type. Determines endpoint protocol and request formatting.

This value is set at dataset creation and cannot be modified

Example

'WFS', 'WMS', 'VTS'

visible

visible: boolean

Initial visibility state for layer creation workflows.