This directory contains example scripts demonstrating how to use the ogc-client library.
Before running these examples, you need to build the library:
npm install
npm run buildDemonstrates querying a STAC (SpatioTemporal Asset Catalog) API endpoint:
node examples/stac-query.jsThis 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: