Remote data, explicit steps
Discover once. Request only what the application needs.
Service sources keep endpoint metadata, request construction, and decoded results separate. That makes a remote dataset behave like a predictable part of the data path.
01 · discover
OGC service endpoint
Capabilities describe collections, operations, CRS, and response formats.
02 · request
Build a standards-shaped request
Select a layer, collection, extent, time, or coverage slice.
03 · application result
ImageSource · VectorSource · RasterSource
Decoded results can move into maps, analysis, scans, or application-owned code. ↗
The source owns protocol details; the application owns how returned features, pixels, tiles, or tables are used.
The service path
Discover capabilities before requesting data.
Service endpoints vary in operations and response formats. The module exposes that variability explicitly so an application can choose the right source, request, and output path.
Maps and tiles
WMS, WMTS, and OGC API Tiles
Features
WFS, OGC API Features, and GML
Coverages
WCS, OGC API Coverages, and EDR
Catalogs
CSW and OWS Context discovery paths
The @loaders.gl/ogc/wms module provides read-only clients and response parsers for classic OGC Web
Services, modern OGC APIs, and GML. Despite the historical package name, it covers maps, tiles,
features, coverages, environmental observations, and catalogs.
Detailed guide
Service support details
The sections below provide the service matrix, installation instructions, source APIs, and protocol-specific boundaries.
Service matrix
| Service or format | Loader | Data source | Data category | Status | Best use |
|---|---|---|---|---|---|
| WMS | WMSLoader | WMSImageSource | Rendered image | ✅ Supported | Dynamic maps, feature information, legends |
| WMTS | WMTSLoader | WMTSImageTileSource | Image tiles | ✅ Supported | Capability-driven tiled imagery |
| WFS | WFSLoader | WFSVectorSource | Vector features | ✅ Supported | GeoJSON or streaming GML feature queries |
| WCS | WCSCoverageLoader | WCSCoverageSource | Analytical raster | ⚠️ Focused | Binary coverages and decoded LERC |
| CSW | CSWLoader | CSWCatalogSource | Catalog records | ⚠️ Focused | Read-only catalog search and service references |
| GML | GMLLoader | — | Vector format | ⚠️ Supported subset | High-volume WFS feature ingestion |
| OGC API Features | OGCAPIFeaturesLoader | OGCAPIFeaturesSource | Vector features | ⚠️ Minimal | Common collections/items read path |
| OGC API Tiles | OGCAPITilesLoader | OGCAPITilesSource | Tile bytes | ⚠️ Minimal | Known tile templates |
| OGC API Coverages | OGCAPICoveragesLoader | OGCAPICoveragesSource | Coverage data | ⚠️ Minimal | Common collection coverage endpoint |
| OGC API EDR | OGCAPIEDRLoader | OGCAPIEDRSource | Environmental observations | ⚠️ Focused | Position, area, cube, and path queries |
| WMC | None | — | Map context | ❌ Not implemented | Documented to clarify scope |
| OWS Context | None | — | Service context | ❌ Not implemented | Documented to clarify scope |
“Focused” means the important read operations are implemented without claiming every optional operation. “Minimal” means a deliberately small interoperability adapter for the most common OGC API path.
ArcGIS REST services are provided by @loaders.gl/arcgis.
Installation
npm install @loaders.gl/core @loaders.gl/ogc
Install @loaders.gl/deck-layers when visual services should render directly through deck.gl.
Standard source workflow
Every service source can be created through the loaders.gl core API:
import {createDataSourceSync} from '@loaders.gl/core';
import {WMSLoader} from '@loaders.gl/ogc/wms';
const source = createDataSourceSync(wmsUrl, [WMSLoader], {
wms: {wmsParameters: {layers: ['workspace:roads']}}
});
const metadata = await source.getMetadata();
const image = await source.getImage({
layers: ['workspace:roads'],
boundingBox: [[-10, 40], [10, 50]],
crs: 'CRS:84',
width: 1024,
height: 512
});
The concrete runtime contract reflects the data category:
| Contract | Typical methods | Services |
|---|---|---|
ImageSource | getMetadata, getImage | WMS |
TileSource | getMetadata, getTile, getTileData | WMTS, OGC API Tiles |
VectorSource | getMetadata, getSchema, getFeatures | WFS, OGC API Features |
| Coverage source | getMetadata, getCoverage | WCS, OGC API Coverages |
| Catalog source | getMetadata, search | CSW |
| EDR source | getLandingPage, getCollections, query | OGC API EDR |
deck.gl integration
Visual service sources work through one generic SourceLayer:
import {SourceLayer} from '@loaders.gl/deck-layers';
import {WMTSLoader} from '@loaders.gl/ogc/wms';
const layer = new SourceLayer({
id: 'satellite',
data: wmtsUrl,
loaders: [WMTSLoader],
sourceOptions: {wmts: {layer: layerId, tileMatrixSet: matrixSetId}}
});
WMS, WMTS, WFS, and OGC API Features map naturally to visual source contracts. Catalog, EDR, and analytical coverage outputs require an application choice before rendering: select a catalog record, EDR representation, raster band, color ramp, and NoData policy first.
Shared service infrastructure
ServiceRuntimeadds loader selection, source caching, retries, cancellation, shared headers, and telemetry.CapabilityGraphrecords relationships among discovered endpoints and ranks them by type, format, CRS, latency, and quality.- CRS and tile-grid utilities normalize identifiers, axis order, matrix sets, ArcGIS LODs, and antimeridian-sensitive metadata.
- Service capabilities provide a provider-neutral metadata shape while concrete sources retain provider-specific details.
These pieces are optional. If an endpoint and protocol are already known, creating the concrete source directly remains the smallest API.
Authentication and errors
All sources inherit loaders.gl fetch configuration. Applications can provide headers, credentials, request middleware, proxies, and custom fetch functions without protocol-specific wrappers. Abort signals are accepted by data requests that may be long-running.
Pass exact-origin query or bearer credentials through core.credentials, or configure them once
on ServiceRuntime. They are propagated to the concrete source and redacted from runtime telemetry
and normalized errors. See the authentication guide.
Protocol errors are checked before parsing. WMS and related XML service exceptions use dedicated error parsers; focused adapters report the operation and HTTP status.
Testing and conformance policy
Fast tests use deterministic fixtures and block public-network access. Fixtures cover protocol versions, namespace variations, axis order, matrix grids, streaming chunk boundaries, and provider metadata. Live examples are demonstrations, not CI dependencies.
loaders.gl documents its actual implemented subset on each service page. Optional standards features are marked pass-through or unsupported instead of being implied by the existence of a capabilities parser.
Attributions
@loaders.gl/ogc/wms uses @loaders.gl/documents for XML parsing. Some test fixtures originated from
OpenLayers and retain their licenses in the test data; no OpenLayers runtime code is included in the
published module.
Spatial queries beyond picking
Use capability-derived WMTS configuration for advertised tile styles, formats, matrix sets, and grid resolutions. The spatial-query guide covers extent-based WFS loading and local GeoArrow selection and snapping, including offscreen data.
The remaining GIS work tranches distinguish delivered source/query support from planned grid rendering, predicate pushdown, schema discovery, streaming, and global spatial semantics.