Add WMS DescribeLayer operation support#137
Merged
ronitjadhav merged 2 commits intomainfrom Mar 6, 2026
Merged
Conversation
db2ce82 to
6d2c872
Compare
jahow
reviewed
Mar 5, 2026
Member
jahow
left a comment
There was a problem hiding this comment.
Thank you, a few comments to address!
| SERVICE: 'WMS', | ||
| REQUEST: 'DescribeLayer', | ||
| VERSION: version, | ||
| LAYERS: layerName, |
Member
There was a problem hiding this comment.
needs a SLD_VERSION=1.1.0 param here
|
|
||
| export type WmsLayerDescription = { | ||
| layerName: string; | ||
| owsType: string; |
Member
There was a problem hiding this comment.
this can be typed as 'wcs' | 'wfs' as per the spec
Comment on lines
+3
to
+10
| <WMS_DescribeLayerResponse version="1.1.1"> | ||
| <LayerDescription name="my_workspace:my_vector_layer" wfs="https://my-server.com/wfs?" owsURL="https://my-server.com/wfs?" owsType="WFS"> | ||
| <Query typeName="my_workspace:my_vector_layer"/> | ||
| </LayerDescription> | ||
| <LayerDescription name="my_workspace:my_raster_layer" owsURL="https://my-server.com/wcs?" owsType="WCS"> | ||
| <Query typeName="my_workspace:my_raster_layer"/> | ||
| </LayerDescription> | ||
| </WMS_DescribeLayerResponse> |
Member
There was a problem hiding this comment.
I don't think this fixture looks like a real response. For instance this is the response example from the spec:
<DescribeLayerResponse xmlns="http://www.opengis.net/sld" xmlns:ows="http://www.opengis.net/ows"
xmlns:se="http://www.opengis.net/se" xmlns:wfs="http://schemas.opengis.net/wfs"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:myns="http://myserver/somenamespace"
xsi:schemaLocation="http://www.opengis.net/sld DescribeLayer.xsd">
<Version>1.1.0</Version>
<LayerDescription>
<owsType>wfs</owsType>
<se:OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
xlink:href="http://mywfs/server/ogcwebservice"/>
<TypeName>
<se:FeatureTypeName>myns:cloudfeatures</se:FeatureTypeName>
<TypeName>
</LayerDescription>
</DescribeLayerResponse>Could you maybe do two different fixtures, one for WCS and one for WFS? Also slightly different, e.g. coming from different services. Thank you!
| * @param layerName Layer name to describe | ||
| * @return Returns null if the endpoint is not ready or does not advertise DescribeLayer | ||
| */ | ||
| describeLayer(layerName: string): Promise<WmsLayerDescription | null> | null { |
Member
There was a problem hiding this comment.
Make it so that a Promise is always returned, otherwise the API is very awkward
41cf841 to
caf3bd5
Compare
Member
Author
|
Thanks for the review. I have addressed the mentioned comments. |
Sam-Bolling
added a commit
to OS4CSAPI/ogc-client
that referenced
this pull request
Mar 8, 2026
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.
Description
Adds support for the WMS
DescribeLayeroperation to determine the underlyingdata type of a WMS layer (e.g. whether it is backed by vector/WFS or raster/WCS data).
Changes
describeLayer(layerName)method toWmsEndpointWmsLayerDescriptiontype (layerName,owsType,owsUrl,typeName)generateDescribeLayerUrl()URL builder insrc/wms/url.tsparseDescribeLayerResponse()XML parser insrc/wms/describelayer.tsWmsLayerDescriptionfrom the library entry pointUsage