giseldo/neodataset huggingface dataset:
Meeting: Define minimum requirements for SIGMET backend

The KNMI GeoWeb version has some additional functionalities compare to the GeoWeb reference version.

In order to work towards one (full functionality) GeoWeb version that can be tested and used by everyone in the GeoWeb cooperation, this issue aims to make an inventory on what needs to be done with existing KNMI GeoWeb functionality, in this case the SIGMET.

**The result of this issue is an overview of the minimum requirements for a backend in e.g. AWS for the SIGMET as implemented in KNMI.**

The outcome will be used for discussion with FMI and MET Norway on possible next steps.

Story points: 3.0
Error in header TAF when issuing COR

When issuing TAF correction, there is one space too much after the datetime group in the header of the tac message.

FTNL99 EHDB 20211001112140  COR

- Header is created in the TAF lambda (GW BE)
- Also check and make sure AMD/CNL normal TAF are correct and without too many spaces
- Fix there and add tests

Story points: 3.0
FE: SIGMET and AIRMET: lat/lon marker does not work during drawing

Do: 
- in webmap we need to ensure the coordinates are still displayed when in drawing mode
- if possible add a test


### Summary

During the drawing (when in drawing mode) the lat/lon positioner in the left down corner does not work. The position of the mouse is only given, when the user is not in drawing mode. 
This however should also work IN drawing mode

This is necessary, because sometimes areas from other messages (VAAC (Volcanic Ash advisory) https://www.metoffice.gov.uk/services/transport/aviation/regulated/vaac/advisories ) have to be used, which consist of coordinates. Good examples can be found in the archive in may 2011
Then it is quite inconvienent if the positionidentification does not work.

### Steps to reproduce

When the user is in drawing mode (f.e. box or polygon), the location identification should give the lat/lo location of the mouse, so the user knows at which coordinates the user is putting the points. 


### What is the current *bug* behavior?

The position identificiation does not work and only gives the lat//lon of the start of the drawing.

### What is the expected *correct* behavior?

When the user is in drawing mode (f.e. box or polygon), the location identification should give the lat/lo location of the mouse, so the user knows at which coordinates the user is putting the points. 

### Relevant logs and/or screenshots

This is really important during Volcanic Ash situations! (And because there is a volcano erupting at La Palma and Iceland is quite restless, I think it is really important!

Story points: 5.0
FE: TAC not displayed when saving a draft without start and enddate and then opening it again

### Summary

TAC not displayed when saving a draft without start and enddate and then opening it again

### Steps to reproduce

- open the AIRMET or SIGMET module
- click to create a new product
- make start and enddate fields empty
- fill in all other fields
- click SAVE
- open the product you just saved
- notice the date fields get prepopulated, but the TAC is still displaying 'Missing data: no TAC can be generated'


### What is the current *bug* behavior?

TAC is still displaying 'Missing data: no TAC can be generated'

### What is the expected *correct* behavior?

TAC should be retrieved with the visible dates

Story points: 3.0
IWXXM 3.0.1: add converter for AIRMET

- Use documentation of IWXXM on GitHub in the WMO-IM/IWXXM repo

Low level XML stuff is already in the library (FMI put it in) 

- Converting FMI airmet model to XML airmet model 
- Very similar to the 2.1 version (but not the same!)

Story points: 8.0
IWXXM 3.0.1: add converter for SIGMET

- Use documentation of IWXXM on GitHub in the WMO-IM/IWXXM repo

Low level XML stuff is already in the library (FMI put it in) 

- Converting FMI sigmet model to XML sigmet model 
- Very similar to the 2.1 version (but not the same!)

Story points: 8.0
FE: SIGMET and AIRMET: special preset

### User

Forecaster

### Short description

For making a SIGMET or AIRMET often the same datalayers are necessary. It is convenient for the user, if they are all in 1 preset for SIGMET and AIRMET, so he can open them at once and select the ones he needs by making them vissible or not vissible with the layer manager.

The SIGMET/AIRMET preset contains the following datalayers:
- Radar: Reflectivity (dBZ)
- Radar: precipitation NL
- Satellite: HRVComb
- Satellite: RGB Vulkaanas
- Obs wind
- obs gust
- obs weather code
- obs cloudbase
- obs MOR
- Harm windflags
- Harm gusts
- Harm T
- Harm precip
- Harm Neso
- Harm cloudbase

The layers in the layermanager should be in this order.

To make the loading faster, best to have them not vissible, except for Radar precip NL and satellite HRVComb.

### Why 

To make it more easy for the user to get the usefull data for a SIGMET

### Test criteria

* When the user chooses the SIGMET and AIRMET preset
  * then this preset opens, with all layers available, whereoff only precip NL and HRVComb are switched on vissible.

Story points: 3.0
BE: The date-time group in the TAF header is incorrect

The date-time group in the TAF header is incorrect.
This has to be:
FTNL99 EHDB 280635
(DDHHMM)

`FTNL99 EHDB **20210928063507**
TAF COR EHAM 280635Z 2806/2912 25015KT 5000 OVC010
BECMG 2809/2812 18020G35KT 2500 DU OVC010
PROB30 TEMPO 2806/2809 28015KT 3000 +RA=`

Story points: 3.0
BE: TAFs with PUBLISHED status get no issue date

At some point we removed the issueDate field from a PUBLISHED TAF. An example of a TAF generated with no issueDate is:

```
{
 "uuid": "d0691215-211c-11ec-9c1f-09487534b449",
 "creationDate": "2021-09-29T18:00:00Z",
 "taf": {
  "messageType": "ORG",
  "location": "EHGG",
  "validDateStart": "2021-09-29T18:00:00Z",
  "type": null,
  "baseTime": "2021-09-29T18:00:00Z",
  "uuid": "d0691215-211c-11ec-9c1f-09487534b449",
  "validDateEnd": "2021-10-01T00:00:00Z",
  "baseForecast": {
   "valid": {
    "start": "2021-09-29T18:00:00Z",
    "end": "2021-10-01T00:00:00Z"
   },
   "cavOK": true,
   "wind": {
    "speed": 60,
    "unit": "KT",
    "direction": 130
   }
  },
  "status": "PUBLISHED"
 },
 "canbe": [
  "CANCELLED",
  "AMENDED",
  "CORRECTED"
 ]
}
```

Older TAFs do contain the field so we probably removed the line assigning the issueDate during a refactoring. 

We should add a test (or a check to an existing test) to make sure the field is there.

Another related problem is that draft versions of TAF do get an issueDate added. They shouldn't.

Story points: 5.0
FE: PROB is only allowed with TEMPO or alone

PROB30/PROB40 with FM and BECMG is not allowed. Can we add a validation rule to state this
(quote from validation document from Marcel `BECMG can not be combined with PROB40 or PROB30)`

But PROB30/PROB40 must ALSO be allowed without any changegroup (so without TEMPO). 

So possible groups are:

- PROB30 TEMPO
- PROB40 TEMPO
- PROB30
- PROB40
- TEMPO
- BECMG
- FM

**So all we have to do is now allow PROB30 and PROB40 on its own without a changegroup**

Story points: 3.0
FE: TAF: when CAVOK is used, NSC, clouds should not be allowed

See userstory for full description and images.

When CAVOK is used for VIS, weather and clouds are not to be filled in.

For the baseline it now is possible to fill in NSC or clouds in for clouds.
For changegroups now it is possible to fill in weather and cloud with CAVOK, but they do not appear in TAC. It should not be possible to fill in anything; it should be validated incorrect.

**Correct behavior:** When using CAVOK for VIS, weather and cloud groups should be empty, nothing should be filled in there (and/or appear in the TAC).

Story points: 3.0
FE: TAF: change group time BECMG length not validated

There are some bugs in the change groups validity periods:

BECMG group: a becmg group may be valid 1, 2, 3 or 4 hrs. This is not validated in GeoWeb. In GeoWeb a becmg group can be any length now. So the validation for a BECMG group should be 1, 2, 3, or 4 hrs valid.

Story points: 3.0
FE: TAF: No TAC created with visibility 0000

No TAC is created with visibility is 0000 in baseline of TAF. Validation gives no error. The TAC should be created, When VIS 0000 is used in changegroup, the TAC is created.

Also check all other fields in baseforecast to see if wind 00000 works, cloudheight 0000 etc works

Story points: 3.0
FE: TAF TAC doesn't get updated when reordering change groups

We retrieve the TAC onBlur on the form. When dragging and dropping changegroups, the onBlur is not triggered of course and the TAC is not updated so still reflects the old ordering

To reproduce:
- Add 2 changegroups with different data filled in
- drag/drop the two to change the order
- see that the TAC still show the old order

Story points: 3.0
BE: Product Lambda: export IWXXM product for AIRMET

In the lambda where the tac is generated, use the geoweb-knmi-avi-messageservices library with endpoint getairmetiwxxm21. 

See https://gitlab.com/opengeoweb/avi-msgconverter/geoweb-knmi-avi-messageservices#testing-iwxxm21-sigmet

Story points: 3.0
BE: Product Lambda: export IWXXM product for SIGMET

In the lambda where the tac is generated, use the geoweb-knmi-avi-messageservices library with endpoint getsigmetiwxxm21. 

See https://gitlab.com/opengeoweb/avi-msgconverter/geoweb-knmi-avi-messageservices#testing-iwxxm21-sigmet

Story points: 3.0
FE: improve screenmanager folder structure

- the subfolder `components/Screenmanager` is unnecessary, the library is already called screenmanager
- the folder `storyUtils` has a lot of files, that are not only used inside stories. It should only contain utils for stories
- the components folder could use some subfolders for different components, like we do in all the other libs
- the file `utils.ts` is only importing and exporting, those should be added to `index.ts`
- move configurableMapWithSliderConnect.tsx to core lib, same folder as the MultiMapViewConnect

no renaming of exports, this is a separate ticket https://gitlab.com/opengeoweb/opengeoweb/-/issues/1104

Story points: 2.0
BE: geoweb-knmi-avi-messageservices fix IWXXM tests for Sigmet

In file `src/test/java/nl/knmi/geoweb/backend/product/GeoWebSigmet/TestGeoWebSigmetToFMIIWXXM21.java` of geoweb-knmi-avi-messageservices certain tests are commented because they are not working yet.

Fix these.

Story points: 5.0
FE: Add warning when polygon results in multiple intersections

Drawing a polygon (start and/or end) that results in two intersections should result in highlighting both intersections and a warning should be given to warn that the drawn polygon will be used in the TAC.

- Ensure that the two intersections are highlighted on the map as we do for single intersections
- When multiple intersections are detected (the resulting intersection GeoJSON has type multipolygon) we should give a grey warning like we do for when there are too many points in the FIR intersection

`The drawn polygon has multiple intersections with the FIR-boundary. The drawn polygon will be used for the TAC-code.`

Story points: 3.0
POC screenmanager

Related to #739 

# Make a screenmanager POC using golden layout/react-grid. 
- The screen should be configurable with a json file like in https://gitlab.com/opengeoweb/opengeoweb/-/merge_requests/612. 
- It should be possible to specify which component should be rendered at which location on the screen with a configuration file
- Check if golden-layout provides handles / feedback / callbacks to get status updates when positions/sizes of components are changed. These can then be stored back in the preset 
- The screenmanager code should be decoupled from a specific layout manager like golden-layout, in such a way that it remains possible to switch to another layout manager without getting into trouble.
- Next to golden-layout, React-Grid will be tested for needed functionality
- How well does the library functions with material design?
- Opening new browser tabs?
- Tooling (icons) for closing, moving, dragging elements on screen?
- Final result is POC in storybook


# Examples: 
![image](/uploads/3a892de5689aa413a0eeab8261b604a4/image.png)

![image](/uploads/b7397515e5a4a229f200145920774118/image.png)

![image](/uploads/1b063f36c95f11af76f578c42b8a8e08/image.png)

Story points: 5.0
FE: bug - fields populated in form after discarding

To reproduce:
1. open a new sigmet/airmet and fill in phenomenon and level
2. press discard and go back to the list
3. click "create a new sigmet/airmet" and you will see the fields you filled in in your discarded sigmet are already filled!

We probably need to clear the form on a discard? (Potentially use reset() for this to clear out all values?)

Story points: 3.0
FE: add unit test to make sure an upcoming update to react-hook-form 7 will not introduce unwanted behavior

Add tests to make sure any future update will be more robust. Based on comments of disabled fields and unregistrerd fields onMount https://gitlab.com/opengeoweb/opengeoweb/-/merge_requests/603

test:
- disabled fields get send to BE  https://gitlab.com/opengeoweb/opengeoweb/-/merge_requests/603#note_586881404
- unrendered components should not be send to BE https://gitlab.com/opengeoweb/opengeoweb/-/merge_requests/603#note_588694179
- also add a story with all inputs included

Story points: 2.0
FE: the SIGMET and AIRMET list is doing TAC requests for incomplete products which results in errors

When you save a SIGMET or AIRMET as draft you can leave a lot of the fields empty. The LIST is trying to get a tac message for these products, but this results in errors in the console and an empty TAC message in the list when hovering.

NOTE: there is already a check in the Form if all relevant information is there, could we reuse that in the list?

![image](/uploads/da6b1ae9a8f6bf6bb24d6715d7815a37/image.png)

![image](/uploads/387a67e41ec9f9117dc3ca3bf594f794/image.png)

Story points: 3.0
FE: fix hidden input bug spaceweather

I think we should also add hidden fields at line 141 in `LifeCycleEditOptions` instead of `null` for `neweventlevel` and `threshold`.

When I summarise an event and then have a look at the result, these two fields are empty as they were never sent to the BE while they did have values before: ![image](https://gitlab.com/opengeoweb/opengeoweb/uploads/b429c53c10b154562eaf462ca73d47f4/image.png)

Story points: 2.0
Cleanup of console logs from the mapping component

Currently there's a lot of logging inside the console and it's poluting everything. Make sure the logs only are visible when the dev flag is true here:

https://gitlab.com/opengeoweb/opengeoweb/-/blob/master/libs/core/src/lib/geoweb-webmap/WMJSMap.ts#L57

Better to disable it by default, and mute all logs. Only when it's set to true (as a developer) you can see the logs again. Maybe this const needs a own file inside geoweb-webmap to prevent circular dependencies, because other files inside geoweb-webmap will need it as well.

Story points: 5.0
FE: coding style guide in Readme

Would be nice to have some rules in the repo with some basic coding styles where we can link to. Maybe some good vs bad examples, and also the why.
- functional programming https://opensource.com/article/17/6/functional-javascript
- redux hooks
- unit tests https://testing-library.com/docs/react-testing-library/intro/

Put in top level README.

Story points: 2.0
FE: update react-form-hooks from 6 to 7


### User

Developers

### Short description

Upgrade react hook form from 6 to 7

### Why 

So we are up to date, and we can later more easily for example split the date input

### Test criteria

Everything form related should still work as before


### Extra information
* It will break. Read upgrade instructions here https://react-hook-form.com/migrate-v6-to-v7/
* Some (dirty) fixes can be fixed in a good way in v7, [check this MR](https://gitlab.com/opengeoweb/opengeoweb/-/merge_requests/1147) for example for the focus issue of `insert`
* old attempt https://gitlab.com/opengeoweb/opengeoweb/-/merge_requests/601/diffs

Story points: 3.0
FE: Level Between Unit validation

This task is for both SIGMET and AIRMET.

At this moment for the level all combinations of unit for Upper and Lower levels are accepted.

From Annex 3:
[SFC/]FLnnn or
[SFC/]nnnnM (or [SFC/][n]nnnnFT) or
FLnnn/nnn or
TOP FLnnn or
[TOP] ABV FLnnn (or [TOP] ABV [n]nnnnFT)
[nnnn/]nnnnM (or [[n]nnnn/][n]nnnnFT) or [nnnnM/]FLnnn
(or [[n]nnnnFT/]FLnnn)
or 24
TOP [ABV or BLW] FLnnn

So this means (in order lower/upper):
- FL
- SFC/FL
- M
- SFC/M
- FT
- SFT/FT
- FL/FL
- M/M
- FT/FT
- M/FL
- FT/FL

Give a validation error if something changes

Story points: 3.0
FE: Cloud Level should have the same unit for Upper and Lower level

For Airmet Cloud Level at this moment is possible to choose different unit (m or ft) for Upper and Lower level.

As specified in Annex3 this is not correct: for both Upper and Lower level only the same unit is applicable.
This task involves @didier.dezanet design.

Both the unit dropdown menu stays there.
Changing the unit for the Upper Level will automatically change the unit for the Lower Level (and Vice-versa)

Story points: 2.0
FE: Reset values when changing option in Level section

When changing from 'Level Between' (with already filled values) to 'Level At' in the TAC are reported the values of the previous upper level (see video)

![test-2021-05-18_10.54.13](/uploads/9396f56e8993cb031e85c3355a6b3e32/test-2021-05-18_10.54.13.mp4)

Every time that the choice is changed the values should be reset.

Story points: 2.0
FE: Deal with case sensitiveness for Dimension names in WMS GetCapabilties

The **TIME** dimension is not seen as **time** dimension in http://halo-wms.met.no/halo/default.map?service=WMS&REQUEST=GetCapabilities&VERSION=1.3.0&service=WMS&request=GetCapabilities

That is why the timeslider does not see the time dimension.

Fix: Case in-sensitive dimension names?

Story points: 5.0
FE: Map: The throttling of parallel loading WMS GetMap is  gradually slowing down

WMImage throttles the amount of simultenous loading of WMS GetMap requests to prevent overload of the WMS server. It seems that this mechanism is not working well. There is a global counter for the number of images currently loading:
https://gitlab.com/opengeoweb/opengeoweb/-/blob/master/libs/core/src/lib/geoweb-webmap/WMImage.ts#L20

If no images are loading, this counter should be zero. In practice, this counter slowly increases. The effect is that only one image can be loaded in parallel at some point. This slows animations down.

The other thing is that it might be better to leave this functionality to the browser. Nowadays the browser does probably a better job at throttling than custom JS code.

Fix: Remove this throttling mechanism or make it work properly.

Story points: 5.0
FE: test for getCurrentDateIso fails sometimes

see https://gitlab.com/opengeoweb/opengeoweb/-/jobs/1263197669

was introduced in https://gitlab.com/opengeoweb/opengeoweb/-/issues/687

the mock for Date.now is not implemented correctly 

if you search on `jest.spyOn(Date, 'now')` you can find other tests that do implement it correctly, should be done the same way

Story points: 1.0
FE: Surface visibility "Cause" does not refresh the TAC

The input of a new visibility will update the TAC, but changing the cause will not. 

![image](/uploads/7adb92364e099ca01e9b975619be4d01/image.png)


Config required for the FE to test against the latest BE:

```
{
  "AUTH_LOGIN_URL": "https://geoweb-dev-airmet-tac.auth.eu-west-1.amazoncognito.com/oauth2/authorize?client_id={client_id}&response_type=code&scope=email+openid&redirect_uri={app_url}/code",
  "AUTH_LOGOUT_URL": "https://geoweb-dev-airmet-tac.auth.eu-west-1.amazoncognito.com/logout?client_id={client_id}&logout_uri={app_url}/login",
  "AUTH_TOKEN_URL": "https://h5m7yumf2a-vpce-026bc1761b17f4f69.execute-api.eu-west-1.amazonaws.com/infra/auth/token",
  "AUTH_CLIENT_ID": "7v2kceg0bo6e8rjodb0ul704bc",
  "INFRA_BASE_URL": "https://h5m7yumf2a-vpce-026bc1761b17f4f69.execute-api.eu-west-1.amazonaws.com/infra",
  "APP_URL": "http://localhost:4200",
  "SW_BASE_URL": "https://vko1z3liqc-vpce-026bc1761b17f4f69.execute-api.eu-west-1.amazonaws.com/spaceweather",
  "SIGMET_BASE_URL": "https://hw99pubyfc-vpce-026bc1761b17f4f69.execute-api.eu-west-1.amazonaws.com/aviation",
  "AIRMET_BASE_URL": "https://hw99pubyfc-vpce-026bc1761b17f4f69.execute-api.eu-west-1.amazonaws.com/aviation",
  "TAF_BASE_URL": "https://hw99pubyfc-vpce-026bc1761b17f4f69.execute-api.eu-west-1.amazonaws.com/aviation"
}

```

Make sure to have a user on geoweb-backend-dev-airmet-tac-user-pool or ask for one.

Story points: 2.0
FE: Send units in capital letters

Find out which ones are missing 

The same thing we did for the Movement units (see MR https://gitlab.com/opengeoweb/opengeoweb/-/merge_requests/537) should be done for all other units that the FE sends to the BE

Create extra tests, make sure it matches Sigmet


Config required for the FE to test against the latest BE:

```
{
  "AUTH_LOGIN_URL": "https://geoweb-dev-airmet-tac.auth.eu-west-1.amazoncognito.com/oauth2/authorize?client_id={client_id}&response_type=code&scope=email+openid&redirect_uri={app_url}/code",
  "AUTH_LOGOUT_URL": "https://geoweb-dev-airmet-tac.auth.eu-west-1.amazoncognito.com/logout?client_id={client_id}&logout_uri={app_url}/login",
  "AUTH_TOKEN_URL": "https://h5m7yumf2a-vpce-026bc1761b17f4f69.execute-api.eu-west-1.amazonaws.com/infra/auth/token",
  "AUTH_CLIENT_ID": "7v2kceg0bo6e8rjodb0ul704bc",
  "INFRA_BASE_URL": "https://h5m7yumf2a-vpce-026bc1761b17f4f69.execute-api.eu-west-1.amazonaws.com/infra",
  "APP_URL": "http://localhost:4200",
  "SW_BASE_URL": "https://vko1z3liqc-vpce-026bc1761b17f4f69.execute-api.eu-west-1.amazonaws.com/spaceweather",
  "SIGMET_BASE_URL": "https://hw99pubyfc-vpce-026bc1761b17f4f69.execute-api.eu-west-1.amazonaws.com/aviation",
  "AIRMET_BASE_URL": "https://hw99pubyfc-vpce-026bc1761b17f4f69.execute-api.eu-west-1.amazonaws.com/aviation",
  "TAF_BASE_URL": "https://hw99pubyfc-vpce-026bc1761b17f4f69.execute-api.eu-west-1.amazonaws.com/aviation"
}

```

Make sure to have a user on geoweb-backend-dev-airmet-tac-user-pool or ask for one.

Story points: 5.0
FE: fix npm vulnerabilities

```
found 211 vulnerabilities (1 low, 206 moderate, 4 high)
  run `npm audit fix` to fix them, or `npm audit` for details

```

part 1: 
- [x] immer@9.0.2
- [x] `npm update underscore --depth 2` (to resolve 2 issues with underscore package, dep of pondjs and react-timeseries-charts)
- [x] `npm update hosted-git-info --depth 13` (to resolve 99 issues with hosted-git-info, dep of @nrwl and jest)

part 2:
- [x] typedoc@0.20.36 --> test it well, breaking changes

part 3:
- [x] update @nrwl to v12.3.3 (follow readme instructions to update Nx). This will probably include:
   - @storybook/react@6.2.7 --> test it out
   - includes linting updates, due to dependencies (set one rule to warning to fix in new ticket)
   - avoid updating react to v17, should be done in a separate ticket because we need material-ui v5 for that https://gitlab.com/opengeoweb/opengeoweb/-/issues/365

> part 4:
> - update webpack@5.37.0 ---> storybook 6.2 still needs webpack4, webpack5 support is experimental and will be available in 6.3

Story points: 3.0
FE: add layermanager button in KNMI application

- make sure there is a button to open the layer manager
- make sure to keep the preloaded services and base layers like we had them before

![image](/uploads/db7ec7caf1d906548e0f0a9c6d2dae58/image.png)

see the reference application how its done: https://gitlab.com/opengeoweb/geoweb-core-demo/-/blob/master/src/components/MapWithGeoWebLayerSelect.tsx

![image](/uploads/9eeb29a2b0257c6b030e48d733750897/image.png)

Story points: 2.0