Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

ogc-client Examples

This directory contains example scripts demonstrating how to use the ogc-client library.

Prerequisites

Before running these examples, you need to build the library:

npm install
npm run build

Running Examples

STAC API Query Example

Demonstrates querying a STAC (SpatioTemporal Asset Catalog) API endpoint:

node examples/stac-query.js

This example shows how to:

  • Connect to a STAC API endpoint
  • Retrieve endpoint information and capabilities
  • List all available collections
  • Get detailed collection metadata (extent, providers, license, etc.)
  • Query items with various filters:
    • Limit (pagination)
    • Bounding box (spatial filtering)
    • DateTime (temporal filtering)
  • Retrieve a single item
  • Build custom query URLs

The example queries the public STAC API at:

OGC API - Connected Systems (CSAPI) Example

Demonstrates working with OGC API - Connected Systems endpoints:

node examples/csapi-demo.js

This example shows how to:

  • Initialize CSAPI client classes (SystemsClient, DatastreamsClient, ObservationsClient)
  • Query systems and retrieve system details
  • List and get datastreams
  • Query observations and observation data
  • Navigate between related resources using link relations
  • Access system events

Related documentation:

The example uses fixture data by default. To test with a live CSAPI endpoint:

export CSAPI_API_ROOT=https://your-csapi-server.com
export CSAPI_LIVE=true
node examples/csapi-demo.js