Skip to content

feat: add NcwmsEndpoint for NcWMS-extended WMS servers#145

Open
arnaud-morvan wants to merge 6 commits into
mainfrom
ncwms
Open

feat: add NcwmsEndpoint for NcWMS-extended WMS servers#145
arnaud-morvan wants to merge 6 commits into
mainfrom
ncwms

Conversation

@arnaud-morvan

Copy link
Copy Markdown
Member

Adds NcwmsEndpoint to query NcWMS-specific metadata (layer details, min/max range, legend URL) from servers such as Thredds, ERDDAP and CMEMS. Detection is automatic: getLayerDetails() returns null for non-NcWMS layers.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new NcwmsEndpoint to support querying NcWMS-specific metadata (layer details, min/max range, legend URL) from NcWMS-extended WMS servers, and wires it into the public API and documentation.

Changes:

  • Added NcwmsEndpoint implementation with getLayerDetails(), getMinMax(), and getLegendUrl().
  • Added Jest test coverage and JSON fixtures for NcWMS responses.
  • Enabled TypeScript JSON imports via resolveJsonModule, and documented NcWMS usage in the README.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tsconfig.json Enables JSON module resolution for TS (used by new fixtures/tests).
src/wfs/featureprops.spec.ts Removes an unnecessary @ts-expect-error now that JSON imports are supported.
src/ncwms/endpoint.ts Adds the new NcWMS endpoint implementation.
src/ncwms/endpoint.spec.ts Adds unit tests for URL normalization and NcWMS methods.
src/index.ts Exposes NcwmsEndpoint and related types from the package entrypoint.
README.md Documents NcWMS support and provides a quick-start example.
fixtures/ncwms/min-max.json Adds min/max JSON fixture for tests.
fixtures/ncwms/layer-details.json Adds layer details JSON fixture for tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/ncwms/endpoint.ts
Comment thread src/ncwms/endpoint.ts Outdated
arnaud-morvan and others added 5 commits June 19, 2026 15:12
Adds NcwmsEndpoint to query NcWMS-specific metadata (layer details,
min/max range, legend URL) from servers such as Thredds, ERDDAP and CMEMS.
Detection is automatic: getLayerDetails() returns null for non-NcWMS layers.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…tchLayerDetails

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…MinMax

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Use LAYERS (not layerName) and SRS (not crs) in the GetMetadata/minmax
request — WMS 1.1.1 requires these names; CRS was introduced in 1.3.0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants