-
Notifications
You must be signed in to change notification settings - Fork 353
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
Add wms-group to ckan and ignore duplicate wms layers in groups #6255
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done @nf-s & thanks for your excellent work -- I believe this PR gives more choices to the user and also helps to reduce the chance that we have to report an error to the user.
Also thank you for supplying the test datasets --- it makes it much easier to play with the PR 💯
re: the test datasets, I guess the first test link is the "before the PR" link and the 2nd link is the "after PR" link for the same dataset.
- I have played "NationalMap BOM layers", "Pacificmap "GEBCO", Pacificmap "Global Distribution of Coral Reefs" & Pacificmap "SEDAC data products and services". I think they all work better (using the 2nd "after PR" test link) after the PR.
- The last dataset example, unfortunately, indeed comes with a less desired outcome after the PR. I'd say generally the "name" field is meant to be a human-readable title of the resource in ckan. The chance of people using that field to supply layer name is very low as a layer name usually use
-
as spaces (probably why we will see more positive cases). I'd suggest asking the data custodian to fix this issue by adding alayers
query parameters to the wms of the dataset. If we have to solve it, we probably need to apply some validation rules before using the "name" field as the last resort for this case. e.g. if thename
field contains anyspace
, it won't be a valid layer name. Having said that, considering the probability of this case and the correct usage ofname
field, I'd say probably not worth implementing it.- by the way, I believe the one from DGA ckan is actually an "obsolete" dataset and only shows up recently (last year) due to a data recovery issue yet to solve (by DTA now ABS). They are all prior 2018 datasets before Magda on board and crawled by DGA ckan from other sources (for this case it's adon). After 2018, those external sources are handled by Magda and those "obsolete" datasets seems to have been removed from CKAN DB but only brought back incorrectly during the data loss incident last year. Those datasets's "data_state" field in ckan package data has value "inactive". We probably can filter out in this way.
- In the end --- only a minor UI suggestion ( and probably a separate issue and should be addressed by a separate PR): When opening a share link (Take NationalMap BOM layers for example, it's correctly opened as WMS group. But as the group is added at the very bottom of the catalogue list, the user will have to scroll down before he can find the layer selection list. Do you think it will be better if we can auto-scroll the group into the viewport when it's opened via a share link?
Generally, I think this PR works very good and is ready to merge (the suggestion above probably could fit into a separate PR unless it's very tiny) and I will add my approval.
Thanks @t83714 for the review! I agree with all your points. There is already an issue for scrolling to shared group - #5204 I have created an issue re filtering out datasets with |
What this PR does
Fixes #5745 #5893
Reverts parts of #6240
CkanItemReference
no longer copiesdefault
stratum to target - please useitemProperties
instead.name
property for WMSlayers
as last resort.WebMapServiceCatalogGroup
toCkanItemReference
- this will be used instead ofWebMapServiceCatalogItem
if WMSlayers
can't be identified from CKAN resource metadata.allowEntireWmsServers
toCkanCatalogGroupTraits
- defaults totrue
Layers
with duplicateName
propertiesTest me
Previously broken layers
NationalMap BOM layers
Pacificmap "GEBCO"
Pacificmap "Global Distribution of Coral Reefs"
Pacificmap "SEDAC data products and services"
Layers which are now worse off - they are now groups
This is due to "Revert Use CKAN Dataset
name
property for WMSlayers
as last resort"Checklist
doc/
.