feat: add NcwmsEndpoint for NcWMS-extended WMS servers#145
Open
arnaud-morvan wants to merge 6 commits into
Open
feat: add NcwmsEndpoint for NcWMS-extended WMS servers#145arnaud-morvan wants to merge 6 commits into
arnaud-morvan wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
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
NcwmsEndpointimplementation withgetLayerDetails(),getMinMax(), andgetLegendUrl(). - 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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
NcwmsEndpointto query NcWMS-specific metadata (layer details, min/max range, legend URL) from servers such as Thredds, ERDDAP and CMEMS. Detection is automatic:getLayerDetails()returnsnullfor non-NcWMS layers.