Skip to main content

OGC catalog format

Find the dataset before requesting its pixels or features.

Catalogue Service for the Web (CSW) is an OGC protocol for searching geospatial catalogs. loaders.gl adapts the read-only catalog operations into typed records and a normalized service directory.

loaders.gl support​

TypeAPI
Source loaderCSWLoader

The catalog path

Search records, then follow their service references.

CSW sits above map, feature, tile, and coverage services. The source exposes catalog metadata first, keeping the decision about which service to request in the application.

Discover

Read capabilities and advertised domains

Search

Request typed catalog records asynchronously

Resolve

Extract WMS, WMTS, and WFS service references

Boundary

Read-only GET/KVP support; POST XML is outside the source

Detailed guide

CSW operations and support

The reference below covers supported operations, catalog search, service-directory extraction, request customization, and current protocol boundaries.

CSW is an OGC protocol for searching catalogs of geospatial datasets, services, and related resources. CSWLoader adapts read-only CSW endpoints to the loaders.gl CatalogSource contract.

Feature support​

CapabilitySupportAPI and behavior
GetCapabilities✅ SupportedgetCapabilities() returns parsed, typed service metadata
GetRecords✅ SupportedgetRecords() and async search() return catalog records
GetDomain✅ SupportedgetDomain() parses advertised parameter domains
Service directory✅ SupportedgetServiceDirectory() extracts WMS, WMTS, and WFS references
Normalized catalog contract✅ SupportedImplements read-only CatalogSource metadata and search
Vendor query parameters✅ SupportedAppended to generated GET requests
HTTP GET / KVP✅ SupportedAll implemented operations use query parameters
XML or form POST❌ Not supportedRequest payload generation is outside the source
DescribeRecord / GetRecordById❌ Not exposedUse a custom request and the low-level XML loaders if needed
Pagination and CQL filtering❌ Not normalizedThe minimal catalog contract reports these capabilities as unavailable
Harvest and transactions❌ Not supportedThe source is read-only
deck.gl renderingNot applicableSelect a referenced visual service, then pass that service to SourceLayer

Search a catalog​

import {createDataSourceSync} from '@loaders.gl/core';
import {CSWLoader} from '@loaders.gl/ogc/wms';

const catalog = createDataSourceSync(cswUrl, [CSWLoader]);
const metadata = await catalog.getMetadata();

for await (const record of catalog.search()) {
console.log(record.title, record.references);
}

Discover referenced services​

const services = await catalog.getServiceDirectory({includeUnknown: true});

// Each recognized entry includes a normalized type, base URL, and original query parameters.
const firstWms = services.find(service => service.type === 'ogc-wms-service');

The directory recognizes OGC:WMS, OGC:WMTS, and OGC:WFS reference schemes. Unknown schemes can be retained for application-specific handling.

Request customization​

Authentication headers and custom transports use standard fetch options. Operation-specific and vendor parameters can be supplied separately:

const records = await catalog.getRecords(
{version: '2.0.0', typenames: 'csw:Record'},
{outputSchema: 'http://www.isotc211.org/2005/gmd'}
);

References​