-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autodetect version
from WMS GetCapabilities
response
#6977
Comments
It would be nice if Terria auto-detected WMS version from GetCapabilities. I believe I'm not sure what the best approach is here - the way terria handles WMS version is a bit convoluted - I just did a summary for a PR - #6995 (comment) I am definitely interested in improving this though! I will have a think about it. Please let me know what you think |
version
from WMS GetCapabilities
response
When you add a URL like It's a bit of overkill, but checking the returned XML for a version is perhaps the robust way to handle it, rather than assuming the server is doing the right thing and returning what was requested! |
I'm relatively new to the TerriaJS project, and this is my first issue that I'm working on. I'm excited to contribute and learn more about the project! I've been looking into the issue related to WMS version handling, and I wanted to reach out to @nf-s for some guidance and feedback on the proposed solution. In essence, my approach involves parsing the initial response when requesting WMS capabilities to extract the version information from the XML. Based on this version, the subsequent WMS requests will dynamically adjust parameters. If the version is 1.1.1, the request will use "SRS"; if it's 1.3.0, it will use "CRS." I would like to know whether this direction seems appropriate or if there are aspects I should consider or modify. |
Hi @lidrakamberi, parsing xml (or find substring in text content) to identify version is a good approach, to my understanding terria is already capable to build up a wmsv1.1 vs wmsv1.3 map request, somewhere in the proces the proper wms version needs to be set |
the service https://worldcover2020.esa.int/geoserver/gwc/service/wms is a wms 1.1.1 service only.
terria assumes a 1.3 wms, which fails being added
terria initally sends https://worldcover2020.esa.int/geoserver/gwc/service/wms?version=1.3.0&service=WMS&request=GetCapabilities
which returns (should it better have returned a error?):
so far so (almost) good, terria is able to extract the layers
but then sends a wms request including
&crs=EPSG%3A900913
(wms 1.3), returning an error400: No SRS specified
(wms 1.1)this actually works fine if you add the wms url as
https://worldcover2020.esa.int/geoserver/gwc/service/wms?version=1.1.1
suggestion is to auto detect the wms version from the initial capabilities response?
or try 1.3 first, and fall back to wms 1.1.1 if fails
The text was updated successfully, but these errors were encountered: