npm package: @opengeoweb/dataexplorer
Description: MeteoGate Data Explorer is an UI dialog for searching and visualizing data from WIS2 Global Discovery Catalogue. The dialog can be opened from the Layer Select by clicking the "MeteoGate" button on the left side of the dialog. It provides dataset search a
Latest version: 12.13.0
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Data Explorer

MeteoGate Data Explorer is an UI dialog for searching and visualizing data from WIS2 Global Discovery Catalogue.
The dialog can be opened from the Layer Select by clicking the "MeteoGate" button on the left side of the dialog.
It provides dataset search and filtering functionality. WMS datasets can be added as a layer and visualized on the map.

This library was generated with [Nx](https://nx.dev).

## Configuration

Data Explorer has its own configuration file [dataexplorerPresets.json](../../apps/geoweb/src/assets/dataexplorerPresets.json).

The file that is used for Data Explorer configuration has to be defined with the property `GW_DATAEXPLORER_CONFIGURATION_FILENAME` in GeoWeb configuration. See the example in [config.example.json](../../apps/geoweb/src/assets/config.example.json)
If Data Explorer configuration filename is not defined in `config.json`, the "MeteoGate" button will not be displayed in the Layer Select.

To display the "MeteoGate" button in the main map view controls on the left side, the `config.json` property `GW_DATAEXPLORER_BUTTON_ON_MAP` should be set as "true".

The Data Explorer configuration file contains the following properties:

### discoveryCatalogueURL

This is the path to the WIS2 Global Discovery Catalogue metadata collection. For example, the DWD instance is at https://wis2.dwd.de/gdc/collections/wis2-discovery-metadata

It is a OGC Records API, where each dataset is a GeoJSON Feature. You can find more information about Global Discovery Catalogue at https://training.wis2box.wis.wmo.int/practical-sessions/discovering-datasets-from-wis2-gdc/

### concepts

The "concepts" are a way to categorize datasets in the discovery catalogue. A dataset can have multiple "themes" which contain different concepts.

Themes are listed in the dataset properties, for example:

```
"themes":[
    {
        "concepts":[
            {
                "id":"Radar"
            },
            {
                "id":"Surface"
            },
        ],
        "scheme":"https://canada.multites.net/cst/EAEAD1E6-7DD2-4997-BE7F-40BFB1CBE8A2/CST20230912.rdf"
    }
]
```

In the Data Explorer configuration, the `concepts` list defines the concept filters which are displayed as chips below the search field. Each one has `id` which corresponds to the id in the GeoJSON properties, and `label` is what will be displayed in the UI.

```
  "concepts": [
    {
      "id": "Surface",
      "label": "Observation"
    },
    {
      "id": "Radar",
      "label": "Radar"
    },
  ],
```

### queryables

Properties in the discovery catalogue datasets can be used for filtering through the API. The `queryables` configuration property defines the fields that will be displayed as filters on the left side of the Data Explorer dialog. Each queryable has an `id` that corresponds to the nested property path in the dataset GeoJSON, and a `label`, that will be displayed in the UI.

```
  "queryables": [
    {
      "id": "contacts.addresses.country",
      "label": "Country"
    },
    {
      "id": "formats",
      "label": "Formats"
    },
    {
      "id": "rights",
      "label": "Licenses"
    }
  ]
```

### areaFilterTileURL

Area filter uses OpenStreetMap tiles (https://tile.openstreetmap.org/). The tile server URL can be configured with this property.

### areaFilterTileLicense

OpenStreetMap tile API requires showing an attribution text (https://operations.osmfoundation.org/policies/tiles/).

The text is displayed in the bottom left corner of the map.

## Running unit tests

Run `nx test dataexplorer` to execute the unit tests via [Jest](https://jestjs.io).

## Running storybook

Run `nx run dataexplorer:storybook` to run the storybooks.