A focused service client
Discover, request, and keep the response shape explicit.
Each OGC API source follows the links and operations it understands, then returns a documented result. Applications can add service-specific parameters without adopting a universal abstraction.
Features
Collections and items with bounding boxes, CRS, and preserved paging links.
Tiles
Known tile links and templates returned as raw tile bytes.
Coverages
Collection subsets returned as JSON or binary coverage data.
EDR
Position, area, trajectory, corridor, cube, and radius queries.
Detailed guide
OGC API service details
The reference below compares the supported APIs, source loaders, response paths, and intentional conformance boundaries.
The OGC API family replaces monolithic XML web-service protocols with linked JSON resources and
focused HTTP APIs. @loaders.gl/ogc/wms provides deliberately small, interoperable adapters for the
common read paths. They are useful compatibility clients, not claims of complete conformance to
every optional OGC API building block.
Family overview
| API | Source loader | Discovery | Data path | Output | Scope |
|---|---|---|---|---|---|
| OGC API Features | OGCAPIFeaturesLoader | Landing page and collections | Collection items with bbox and CRS | GeoJSON, binary, Arrow | Minimal read client |
| OGC API Tiles | OGCAPITilesLoader | Landing-page tile link and tileset tile matrix set | Explicit tile template | Raw tile bytes | Minimal template client |
| OGC API Coverages | OGCAPICoveragesLoader | Landing page and collections | Collection coverage with subsets | JSON object or binary bytes | Minimal read client |
| OGC API EDR | OGCAPIEDRLoader | Landing page and collections | Six spatiotemporal query shapes | JSON object or binary bytes | Focused query client |
All four sources support standard loaders.gl fetch options for headers, credentials, proxies, cancellation, and custom transports.
OGC API Features
The Features path shares the vector-source, Arrow, managed-loading, and local-query integrations used by WFS. The table distinguishes implemented read operations from optional protocol classes.
| Area | Capability | Status | API, guarantee, or boundary |
|---|---|---|---|
| Discovery | Landing page and collections | ✅ Supported | getLandingPage() and getCollections() |
| Discovery | Collection URL or service URL | ✅ Supported | Collection inferred from URL or selected by collectionId/layers |
| Discovery | Normalized metadata | ✅ Supported | Collection title, description, advertised CRSs, and first spatial extent |
| Discovery | Automatic queryables/schema negotiation | ❌ Not implemented | Source schema is currently empty; materialized Arrow schemas are inferred |
| Requests | Collection items | ✅ Supported | /collections/{id}/items and GeoJSON Accept negotiation |
| Requests | Bounding box | ✅ Supported | Standard bbox, with canonical XY input and wire axis normalization |
| Requests | Independent bounds and output CRSs | ✅ Supported | requestCrs sends bbox-crs; crs controls the requested response CRS |
| Requests | Feature request cancellation | ✅ Supported | AbortSignal forwarded to the items fetch |
| Requests | Credentials and custom transport | ✅ Supported | Common source fetch options |
| Requests | Portable attribute predicate pushdown / CQL2 | ❌ Not implemented | Relational adapter evaluates predicates locally; custom HTTP requests remain possible |
| Requests | Automatic next-link pagination | ⚠️ Supported with limits | Opt-in ogc-api.pagination gathers same-origin body/HTTP-header next links, with bounded requests and cancellation |
| Requests | Page-size control | ✅ Supported | pagination.pageSize requests limit; services may cap it |
| Requests | Item-by-ID and datetime convenience methods | ❌ Not implemented | Current normalized API focuses on bounding-box item requests |
| Output | GeoJSON validation and foreign members | ✅ Supported | Requires FeatureCollection and a features array; single-page responses preserve links/counts |
| Output | Binary feature collections | ✅ Supported | format: 'binary' |
| Output | Arrow and GeoArrow encoding preferences | ✅ Supported | format: 'arrow', WKB/native/mixed union preferences |
| Loading | Complete extent reuse and uncovered rectangles | ✅ Supported via wrapper | ManagedVectorSource requires verified complete results and explicit equivalent CRSs |
| Loading | Shared requests and independent cancellation | ✅ Supported via wrapper | Last waiting consumer can abort the underlying request |
| Loading | Retry, invalidation, and bounded retention | ✅ Supported via wrapper | Failed, incomplete, and unknown-completeness pages do not establish coverage |
| Loading | Stable-ID deduplication | ⚠️ Partial | Typed IDs or custom accessor; features without stable IDs are retained separately |
| Queries | Common scan/query interface | ✅ Supported via adapter | VectorFeatureTableScanSource evaluates one materialized bounded result |
| Queries | ID, bounds, exact intersection, nearest geometry | ✅ Supported locally | GeoArrowSpatialIndex includes offscreen loaded rows |
| Rendering | deck.gl integration | ✅ Supported | Implements VectorSource; direct or managed source works with SourceLayer |
| Mutation | Transactions and mutable feature-store events | ❌ Not implemented | Read-only adapter; explicit cache invalidation after external changes |
| Conformance | All optional OGC API Features classes | ❌ Not implemented | Focused read client; no blanket standards certification claim |
Progressive pages and complete collection
Configure {'ogc-api': {pagination: {pageSize: 1000, maxPages: 100, maxFeatures: 100000}}}
to gather service pages in getFeatures() before converting to the requested encoding. Omit
pagination to retain one-page behavior. The three positive-integer bounds default to those
values. Exhausting a bound throws instead of returning a silently truncated aggregate.
import {OGCAPIFeaturesSource} from '@loaders.gl/ogc/wms';
const source = new OGCAPIFeaturesSource(serviceUrl, {'ogc-api': {collectionId: 'roads'}});
for await (const page of source.getFeaturesInPages({
layers: 'roads', boundingBox: [[-10, -5], [10, 5]], format: 'geojson', signal
}, {pageSize: 500, maxPages: 20})) {
// Every yield is a normalized GeoJSON table, without fetching the next page ahead.
processFeatures(page.features);
}
Traversal follows relative or absolute rel: 'next' links from the body or HTTP Link header,
resolving against the response URL. It does not invent an offset parameter. Links must use the
original origin and HTTP(S), without embedded credentials. Initial endpoint parameters are
preserved, and opaque next URLs are followed as supplied by the service. A numeric total that
exceeds the collected count without a next link is an error. An empty terminal page is allowed;
an empty page with another continuation is rejected.
Cancellation, failed later pages, inconsistent counts, repeated URLs/pages/IDs, and exhausted limits fail the traversal and prevent managed coverage from being established. Early loop exit stops further requests. Pages already yielded remain partial until traversal finishes. Stable paging depends on the service; concurrent dataset changes are not a transactional snapshot.
Collected GeoJSON removes page-specific links/extents and updates numberReturned. Unknown
numberMatched stays unknown; it never becomes fabricated completeness evidence.
ManagedVectorSource can retain a collected result only when the service's numeric total matches
its rows. Arrow and binary conversion happens once after collection; per-page GeoJSON remains
materialized rather than a network-streamed feature parser. These rules follow
OGC API Features Core.
import {createDataSourceSync} from '@loaders.gl/core';
import {OGCAPIFeaturesLoader} from '@loaders.gl/ogc/wms';
const source = createDataSourceSync(
'https://demo.ldproxy.net/daraa',
[OGCAPIFeaturesLoader],
{'ogc-api': {collectionId: 'VegetationSrf'}}
);
const features = await source.getFeatures({
layers: ['VegetationSrf'],
boundingBox: [[36.0, 32.5], [36.2, 32.7]],
format: 'arrow'
});
OGC API Tiles
| Capability | Support | Behavior |
|---|---|---|
| Landing-page metadata | ✅ Supported | Reads title and advertised tileset media type |
| Explicit tile template | ✅ Required | Configure ogc-api.tileTemplate |
| OGC placeholders | ✅ Supported | {tileMatrix}, {tileRow}, {tileCol}; {tileMatrix} is the tileMatrix parameter, or the configured or discovered matrix id for z |
| XYZ placeholders | ✅ Supported | {z}, {y}, {x} |
| Tile retrieval | ✅ Supported | getTile() returns the original ArrayBuffer |
| Tile matrix set | ✅ Supported | ogc-api.tileMatrixSet (a TileMatrixSet 2.0 document or URL) is reported as tileGrid |
| Tile matrix set discovery | ✅ Supported | Without ogc-api.tileMatrixSet, found from the tileset that tileTemplate belongs to; a failure rejects, and discoverTileMatrixSet: false opts out |
| Tile matrix set endpoints | ✅ Supported | getTileMatrixSets() lists /tileMatrixSets; getTileMatrixSet(id) fetches /tileMatrixSets/{id} |
| Tile matrix set limits | ✅ Supported | Discovered or configured inclusive limits are exposed as tileGrid.limits; unavailable tiles return null without fetching |
| Tile matrix set negotiation | ❌ Not implemented | The tileset is the one the configured template names; other tilesets are not compared |
| Tile decoding | ❌ Not automatic | Parse bytes with the loader matching the advertised media type |
| deck.gl | ⚠️ Foundation only | The generic tile contract is present; callers must provide the appropriate decoded tile type |
import {createDataSourceSync} from '@loaders.gl/core';
import {OGCAPITilesLoader} from '@loaders.gl/ogc/wms';
const source = createDataSourceSync(landingPageUrl, [OGCAPITilesLoader], {
'ogc-api': {
tileTemplate: 'https://example.com/tiles/{tileMatrix}/{tileRow}/{tileCol}.png'
}
});
const tileBytes = await source.getTile({z: 3, x: 4, y: 5});
Tile URL resolution
Relative tile templates and matrix-set URLs resolve against the API landing page treated as a directory. Root-relative paths use its origin. Path-relative APIs such as ../api remain path-relative, including parent-directory segments, so metadata and tile content use the same base.
Tile matrix sets
convertOGCTileMatrixSetToTileGrid() converts an OGC TileMatrixSet 2.0 JSON document (OGC
17-083r4) to the shared TileGrid shape. Configuring ogc-api.tileMatrixSet on the tiles source
does the same conversion in getMetadata(), fetching the document once when it is a URL; a
relative URL resolves against the landing page.
- Origins are returned in XY order. Declared
orderedAxesdecide the swap (a first axis naming latitude, northing, southing, or Y); without them, only EPSG:4326 is swapped. - A bottom-left origin is reported per level only; the grid-wide
tileGrid.originis top-left by definition and is omitted. cornerOfOrigin: 'bottomLeft'is preserved on each matrix; omitted means top-left.tileGrid.tileMatrixSetholds every level as a math.glTileMatrix, for use with the@math.gl/geospatialtile-matrix utilities, when every level has a resolution, origin, tile size and matrix size that passvalidateTileMatrix().tileGrid.matriceskeeps the levels as advertised, which may be incomplete.cellSizeis used when present. A scale denominator alone becomes a resolution only for a known unit: EPSG:4326, CRS:84, Web Mercator, or themetersPerUnitoption.- A
crsURI string or{uri}object is reported astileGrid.crs; embedded WKT and PROJJSON definitions are not interpreted. variableMatrixWidthsbands are preserved in native row numbering. Complete coalesced geometry supports canonical tile requests and row-aware fixed-frame selection. Limits use base-grid columns; a canonical column may precede the first covered alias. Coalesced requests require complete geometry, and the default XYZ renderer rejects these grids.- Matrix identifiers are URL encoded when expanding
{tileMatrix}. Duplicate identifiers, invalidcellSize, and unknown origin corners are rejected. Missing tile dimensions remain incomplete instead of assuming square tiles. - Tile requests fill
{tileMatrix}with thetileMatrixparameter when given. Otherwise they use the matrix whose id equalsz, then the matrix at indexz, as in WMTS; this legacy rule is kept for compatibility. With a tile matrix set, a matrix it does not contain throws aRangeErrorinstead of being requested asz.{z}stays numeric.getTile()loads a matrix set given by URL first;getTileURL()uses it oncegetMetadata()has loaded it. setProps()replaces an inlinetileMatrixSetdocument as a whole rather than merging fields.
Matrix dimensions must either include both matrixWidth and matrixHeight or omit both. A one-axis dimension declaration is rejected rather than silently losing its request bounds.
Tile availability limits
Discovered tileset tileMatrixSetLimits values are normalized into tileGrid.limits.
Each entry names a tileMatrix and has inclusive minTileRow, maxTileRow,
minTileColumn, and maxTileColumn bounds. Coverage is independent of geometry:
limits remain useful when a matrix lacks the resolution or origin needed for a
complete tileGrid.tileMatrixSet.
An omitted limits list allows all positions inside known matrix dimensions. A
present list allows only its listed matrices and ranges; [] allows no tiles.
Unknown explicit matrix identifiers, invalid indices, and malformed coverage
metadata throw. An absent numeric level or a position outside coverage is unavailable.
After await source.getMetadata(), use source.isTileAvailable(parameters) for
synchronous selection. getTile() returns null outside coverage without a tile
request; getTileURL() throws for those positions. Matrix dimensions, when known,
also bound requests. Availability does not guarantee nonempty tile content.
Set ogc-api.tileMatrixSetLimits to override discovered coverage, including with an
empty list. Native option fields use the OGC names minTileCol and maxTileCol.
Pass a new array through setProps() to replace coverage and invalidate the cache;
setting it to undefined restores discovered limits. Configured matrix sets do
not discover tileset coverage, so supply limits alongside them when needed.
See Tile matrices and tile matrix sets for geometry, CRS, origin, identifier, and rendering concepts.
Tile matrix set discovery
When ogc-api.tileMatrixSet is not set and tileTemplate contains /{tileMatrix}, the source
discovers the tile matrix set as OGC API - Tiles Part 1 describes it:
- The tileset metadata is the template path before
/{tileMatrix}, such as/tiles/{tileMatrixSetId}or/collections/{collectionId}/tiles/{tileMatrixSetId}. Query parameters other than thefformat selector are kept. - Its
http://www.opengis.net/def/rel/ogc/1.0/tiling-schemelink (or the oldertiling-scheme) is followed, preferring a JSON link and resolving it against the tileset URL. - Without such a link,
tileMatrixSetIdis fetched from/tileMatrixSets/{tileMatrixSetId}, and atileMatrixSetURIis looked up byuriin the/tileMatrixSetslist. Registry URIs are not fetched, and no built-in tile matrix sets are used.
/tileMatrixSets paths resolve against the landing page, and every request uses the source's
fetch options. The discovered grid is used for tileGrid and for {tileMatrix}, like a configured
one, and is reused until tileTemplate, tileMatrixSet, tileMatrixSetLimits or metersPerUnit changes. getTile()
waits for discovery before its first request.
Discovery failure is an error, not an approximation. getMetadata() and getTile() reject with
the cause, and getTileURL() throws until the matrix set has loaded, so z is never requested in
place of a matrix identifier. A failure is not cached: the next getMetadata() or getTile()
call tries again, and concurrent calls share one attempt. A configured tileMatrixSet that fails
to load behaves the same way. A tileMatrix tile parameter is used verbatim before discovery.
For a service whose matrix identifiers are zoom numbers and that publishes no tileset metadata,
set discoverTileMatrixSet: false: {tileMatrix} is then the tileMatrix parameter, otherwise
z, as before discovery existed. Templates that use only {z}, {x} and {y} never discover.
const source = createDataSourceSync('https://example.com/ogcapi', [OGCAPITilesLoader], {
'ogc-api': {
tileTemplate:
'https://example.com/ogcapi/tiles/WebMercatorQuad/{tileMatrix}/{tileRow}/{tileCol}?f=mvt'
}
});
// Reads /tiles/WebMercatorQuad, then the tile matrix set its tiling-scheme link names
const {tileGrid} = await source.getMetadata();
import {convertOGCTileMatrixSetToTileGrid} from '@loaders.gl/ogc/wms';
const response = await fetch('https://example.com/ogcapi/tileMatrixSets/UTM18N');
const tileGrid = convertOGCTileMatrixSetToTileGrid(await response.json(), {metersPerUnit: 1});
// tileGrid.tileMatrixSet?.matrices[i]: {id, resolution, origin, cornerOfOrigin, tileSize, matrixSize}
const tileBytes = await source.getTile({z: 3, x: 4, y: 5, tileMatrix: 'UTM18N:3'});
OGC API Coverages
| Capability | Support | Behavior |
|---|---|---|
| Landing page | ✅ Supported | getLandingPage() |
| Collections | ✅ Supported | getCollections() |
| Collection coverage | ✅ Supported | Requests /collections/{id}/coverage |
| Bounding box | ✅ Supported | Sends bbox |
| Dimension subsets | ✅ Supported | Sends repeated subset parameters |
| Time selection | ✅ Supported | Sends datetime |
| Format negotiation | ✅ Supported | Sends f and an Accept header |
| JSON representations | ✅ Supported | Returned as parsed objects |
| Binary representations | ✅ Preserved | Returned as ArrayBuffer |
| Coverage decoding | ⚠️ Application controlled | Pass binary output to GeoTIFF, LERC, or another appropriate loader |
| Processing and visualization | ❌ Not provided | Values are not resampled or colorized implicitly |
import {createDataSourceSync} from '@loaders.gl/core';
import {OGCAPICoveragesLoader} from '@loaders.gl/ogc/wms';
const source = createDataSourceSync(landingPageUrl, [OGCAPICoveragesLoader], {
'ogc-api-coverages': {collectionId: 'temperature'}
});
const coverage = await source.getCoverage({
bbox: [-10, 40, 10, 50],
subset: ['Lat(40,50)'],
datetime: '2025-01-01/2025-01-31',
format: 'application/json'
});
OGC API EDR
EDR—Environmental Data Retrieval—queries multidimensional observations by space, time, vertical level, and parameter.
| Capability | Support | Behavior |
|---|---|---|
| Landing page and collections | ✅ Supported | Common OGC API discovery methods |
| Position query | ✅ Supported | Point observations |
| Radius query | ✅ Supported | Observations around a position |
| Area query | ✅ Supported | Polygon or bounding-area observations |
| Cube query | ✅ Supported | Multidimensional bounding volume |
| Trajectory query | ✅ Supported | Observations along a path |
| Corridor query | ✅ Supported | Observations in a buffered path |
| Time, vertical, parameter, and CRS controls | ✅ Supported | Standard query parameters are generated |
| GeoJSON and CoverageJSON | ✅ Supported | JSON media types are returned as objects |
| Binary representations | ✅ Preserved | Non-JSON responses are returned as ArrayBuffer |
| Domain-specific interpretation | ⚠️ Application controlled | Unit conversion and scientific analysis remain explicit |
| deck.gl | ❌ Not direct | Convert the selected response representation into a visual source first |
import {createDataSourceSync} from '@loaders.gl/core';
import {OGCAPIEDRLoader} from '@loaders.gl/ogc/wms';
const source = createDataSourceSync(edrUrl, [OGCAPIEDRLoader], {
'ogc-api-edr': {collectionId: 'weather'}
});
const observations = await source.query({
queryType: 'position',
coords: 'POINT(10 20)',
datetime: '2025-01-01',
parameterName: ['temperature', 'wind'],
format: 'application/geo+json'
});
Choosing OGC API or classic OGC Web Services
| Need | Prefer |
|---|---|
| Broad server compatibility and mature map rendering | WMS or WMTS |
| High-volume GML feature streaming | WFS |
| A straightforward GeoJSON collection endpoint | OGC API Features |
| Capability-driven tiled imagery with complex matrix sets | WMTS |
| A known modern tile template | OGC API Tiles |
| Established coverage servers and LERC decoding | WCS |
| A modern JSON coverage endpoint | OGC API Coverages |
| Environmental position, area, trajectory, or corridor queries | OGC API EDR |
Scope boundary
The adapters intentionally avoid implementing optional conformance classes merely to check boxes. Advanced CQL2 filters, transactions, schema extensions, process execution, and provider-specific extensions should be added only when real service interoperability requires them. Standard fetch APIs remain available for those escape hatches.
For a live Features endpoint, see the ldproxy Daraa demonstration. Live services are not used by CI; deterministic repository fixtures remain the conformance source of truth.