Remapping is supported for DCAT datasets which have a CoverageJSON distribution and where the coverage data is/has a grid which has a categorical parameter. Therefore, remapping is not limited strictly to landcover datasets but to arbitrary categorical data.
In the search pane, the user clicks the "Add to workspace" button for a given dataset.
In the "Workspace" pane, the dataset appears and the distributions (here CoverageJSON) are (partially) loaded and scanned to determine possible actions. If the CoverageJSON distribution is a single grid coverage which has at least one categorical parameter, then a "Remap Categories" button appears.
When the user clicks on "Remap Categories", he first has to select the categorical parameter to remap (if there are multiple). Then he has to select either target categories from other datasets, or a ready-made mapping which includes target categories and a mapping from source to target categories.
The ready-made mappings are identified by having an application/ld+json;profile="http://purl.org/voc/cpm_mapping" distribution (Note: the profile URL is minted).
If a ready-made mapping is selected, then the mapping is shown and can be modified via drag and drop through the category-remapper-js UI library. Then the grid gets remapped, added as a new virtual dataset in the workspace, and immediately displayed.
If just target categories from another dataset have been selected, then the same happens as for ready-made mappings with the difference that no connections are pre-selected.
The new virtual dataset behaves exactly like the original ones and also has a "Remap Categories" button. The only difference is that when this button is pressed, then additionally a note is displayed that this is a remapping and it can be modified by clicking a button "Modify". The Modify button brings up the drag and drop remapping UI where the categories are pre-connected and can be adjusted. The result of that is again a new virtual dataset and the old one is removed since it isn't needed anymore (modify=create+remove). That is, datasets are immutable.
Description: Wiki
Libraries to be used:
Tasks to be finished:
Implementation plan
application/ld+json;profile="http://purl.org/voc/cpm_mapping"
distribution (Note: the profile URL is minted).