Skip to content
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 unique "id"s to DEA Maps Terria config catalogue #588

Open
robbibt opened this issue Sep 22, 2020 · 2 comments
Open

Add unique "id"s to DEA Maps Terria config catalogue #588

robbibt opened this issue Sep 22, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@robbibt
Copy link
Member

robbibt commented Sep 22, 2020

A challenge with using DEA Maps to share links to our data is that small changes to the Terria config can cause Terria share links to break. This occurs when a layer is renamed (e.g. Coastal/NIDEM > Coastal/Intertidal Elevation) or moved to a new directory (e.g. (e.g. Coastal/NIDEM > Intertidal/NIDEM). Given how frequently we change the structure of the DEA Maps catalogue, this means that Terria share links go out of date quickly, which is problematic as it means our documentation or public-facing websites (CMI and DEA website) go out of date too.

A lot of these issues could be resolved if we included a unique Terria id config option in each of the layers in the DEA Maps Terria config. According to the Terria documentation:

id:
An optional unique id for this member, that is stable across renames and moves. Use uniqueId to get the canonical unique id for this CatalogMember, which is present even if there is no id.
https://docs.terria.io/guide/connecting-to-data/catalog-type-details/wms/

This is could be a pretty simple fix for a big reduction in future effort; see the unique IDs used for the DEA Coastlines Terria config below (although see #588 (comment) for a better suggestion for unique IDs):

https://github.com/GeoscienceAustralia/dea-config/blob/master/dev/terria/dea-maps.json#L1004

@robbibt robbibt added the enhancement New feature or request label Sep 22, 2020
@meh9
Copy link
Contributor

meh9 commented Sep 22, 2020

Looks good to me.

Note that I usually use a random hash instead of your example of "dea_coastlines" above - otherwise when things are renamed people often get the urge to change the id as well, if it's a random hash then they usually leave it alone!

E.g. https://github.com/TerriaJS/aremi-natmap/blob/master/datasources/aremi/custodian/Geoscience_Australia/Bathymetry_Seabed.ejs#L2

@robbibt
Copy link
Member Author

robbibt commented Sep 22, 2020

That's a good idea! Plus it would avoid needing to come up with/use some kind of consistent naming convention for those fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants