giseldo/neodataset huggingface dataset:
BE: Parse Sigmet geometry relative to lat or lon

In a SIGMET/AIRMET the geometry of a phenomenon can be described as a sector or a quadrant: an area relative to a latitude and/or longitude.

For example:

**N OF N52** (North half of Dutch FIR)

**N OF 5230 AND E OF 00520** (North Eastern quadrant of the Dutch FIR)

This type of geometry description should be parsed by the fmi-avi-messageconverter-tac library and converted into a polygon for inclusion in the GeoGeometry field of the fmi-avi-messageconverter SIGMET/AIRMET object (together with the original TAC clause in the TacGeometry field).

This issue is for the sector situation, with one latitude or longitude

Story points: 3.0
Prepare NX migration in sprint 41

What is necessary to be ready for this migration?
- [x] Fix all linting in geoweb-core.
- [x] Theme is moved (https://gitlab.com/opengeoweb/opengeoweb/-/issues/630).
- [x] Prepare empty library for core. (https://gitlab.com/opengeoweb/opengeoweb/-/issues/657)
- [x] Rename the test files. (https://gitlab.com/opengeoweb/opengeoweb/-/issues/510)
- [x] Close the MergeRequests in geoweb-core (FMI and MetNo)
- [x] Set a date for the code-freeze: propose 11th of May

After moving of core:
- [x] Rename local-theme to theme (https://gitlab.com/opengeoweb/opengeoweb/-/issues/656)
- [x] Discusse publish Theme to NPM

Story points: 1.0
Update geoservices url in KNMI-FE

Search for `geoservices` in the Nx repo and replace the two urls/layer config for the country borders by:

```
{
        "service": "https://geoservices.knmi.nl/wms?DATASET=baselayers&",
        "name": "countryborders",
        "format": "image/png",
        "enabled": "true",
        "layerType": "overLayer"
},
```

Story points: 1.0
Fix flaky TAF test

There is one TAF test that is failing sometimes

FAIL src/lib/components/TafWrapper/TafWrapper.spec.tsx (13.778 s)

components/TafWrapper/TafWrapper › show error message when post to BE for cancelling fails › should show the error message when cancelling a taf from the list and disappear after 10 secs

expect(received).toBeFalsy()

Story points: 2.0
FE: Find way to use typing without causing circular dependency

See here https://gitlab.com/opengeoweb/geoweb-core/-/merge_requests/635/diffs#79fa4e56152180c00641489b58942664e7048857_38_39


ANd see here for a fix, import with type https://gitlab.com/opengeoweb/opengeoweb/-/merge_requests/650#note_598795381

Story points: 3.0
FE: fix lint rule @typescript-eslint/explicit-module-boundary-types ReactMapViewParseLayer, TimeSliderUtils, WMAnimate, sagas

follow-up of https://gitlab.com/opengeoweb/geoweb-core/-/issues/281

when running npm run lint, there are a lot of warnings now that should be fixed

this ticket is for rule: @typescript-eslint/explicit-module-boundary-types

When all warnings for this rule are fixed, remove the rule from `.eslintrc` (this will make linting throw an error for it again)

```

geoweb-core/src/components/ReactMapView/ReactMapViewParseLayer.tsx
  34:3  warning  Argument 'wmjsLayer' should be typed with a non-any type  @typescript-eslint/explicit-module-boundary-types

geoweb-core/src/components/TimeSlider/TimeSliderUtils.ts
  154:41  warning  Argument 'layers' should be typed  @typescript-eslint/explicit-module-boundary-types

geoweb-core/src/geoweb-webmap/WMAnimate.ts
   62:15  warning  Argument '_map' should be typed with a non-any type  @typescript-eslint/explicit-module-boundary-types
  102:20  warning  Argument 'element' should be typed                   @typescript-eslint/explicit-module-boundary-types

geoweb-core/src/store/mapStore/map/sagas.ts
  58:46  warning  Argument 'draw' should be typed  @typescript-eslint/explicit-module-boundary-types  
```

Story points: 2.0
Better monitoring: spaceweather incoming datastream threshold alert

In Grafana we monitor the incoming streams of:
KP-> should come in every 10 min
XRAY-> should come in every 1 min
RTSW Wind-> should come in every 1 min
RTSW Mag-> should come in every 1 min

We can make these checks:
- KP-> check that in the period now-30min the lambda is called at least 1 time
- XRAY,RTSW Wind,RTSW Mag-> check that in the period now-5min the lambda is called at least 1 time

Story points: 5.0
BE: Build a timed lambda to provide UUID's in order to keep UUID consistent for taflist.

When refreshing the /taflist, the uuid gets regenerated everytime. For front-end, we need to keep track of 1 entity, so would be nice this list does not change.

Proposed solution:
- Keep placeholders with UUID's in the database, and use these in the taflist
- Make sure that only one lambda invocation does this, develop a timed lambda which arranges the persistent UUID's
- For each new timeslot and location a new UUID will be made
- Let this lambda run every minute to check if all UUID's are given.

We need a timed lambda to ensure that only one instance is doing this.

Workflow for making a new TAF:
1) The backend provides a taflist, with persistent UUID's
2) The frontend picks one item of the taflist to edit.
3) User saves a TAF as draft with the given UUID
4) User published TAF with the given UUID
5) User cancels TAF, using the UUID. (In this case the lambda is allowed to make a new UUID?? https://gitlab.com/opengeoweb/opengeoweb/-/issues/993)
6) Backend makes a new entry in the TAF list with a persistent UUID for a possible new TAF
7) User can now make a new TAF, with the new UUID

Story points: 5.0
Fix typing for parseFormValues

TafForm - utils:

![image](/uploads/e617db0862729d9ecc0aff549e803310/image.png)

**ISSUES:** Because the type description of the validation field is in two different properties in the TAF object (cavOK and visibility) - the parsing for the form deviates from the way it is done for wind. I also had to adjust `parseFormValues` to be able to remove the visibility property from the object in case CAVOK has been entered. Basically because of the signature of `reduceRowValues` -> `export function reduceRowValues<T>(row: T): T` you can't remove properties from the row you passed in as the type has to be the same coming in as going out. At the same time, I could not have `parseFormValues` accept a TafFormRow type with strings only and return BaseForecast or ChangeGroup type as "*the types don't sufficiently overlap*". Keep in mind that if we have cavOK set to true, there should be NO visibility property in the baseforecast/changegroup that is sent to the BE and if we do have a numeric visibility - there should be NO cavOK property sent to the BE.

Story points: 5.0
FE: screenmanager remove provider from connected component

Remove the wrappers (store + theme) of ConfigurableMapWithSliderConnect, and put it back in to the rendering of this component. Add the wrappers back in test.

![Screenshot_2021-08-16_at_10.13.17](/uploads/41e0567d891ecb516b187cf99aca28a2/Screenshot_2021-08-16_at_10.13.17.png)

Story points: 2.0
FE: fix elevation/zIndex of active map draggable

When clicking a draggable element, it should get the 'active' elevation/zIndex so it will be on top of the other screens. This is a duplicate of https://gitlab.com/opengeoweb/opengeoweb/-/issues/1044, which has been referenced in the code. 

1. in ToolContainerDraggable there is some inline styling, remove this and make use a makeStyles
2. use something like `const classes = useStyles({startPosition, zIndex})` to pass the needed params
3. make sure the elevation is set correctly, higher zIndex is higher elevation but elevation should only be a +1
4. ToolContainerDraggable should have a new prop: zIndex. 
5. Make a new component for UI, and put all the buttons + draggable in. This component will handle the active zIndex.

For inspiration, check https://gitlab.com/opengeoweb/opengeoweb/-/blob/master/apps/knmi-geoweb/src/app/pages/Home.tsx#L33.

Story points: 3.0
FE:remove old sortable of layermanager

The layermanager currently uses a sortable lib which is giving errors on React.Strictmode. In theme/Table there is an example with the new sortable lib, replace the old with the new, and remove the old.

Make sure it is working correctly, check this comment for current bug: https://gitlab.com/opengeoweb/opengeoweb/-/merge_requests/812#note_652700780

Story points: 5.0
FE: Taf reorder changegroups by drag and drop

1. react hook forms has some order functionality  (use swap, see fieldArray documentation) https://react-hook-form.com/api/usefieldarray. Use swap for switching the order (index)
2. use `@dnd-kit` for sorting, see the Table example in Theme for reference

https://gitlab.com/opengeoweb/geoweb-assets/-/issues/1458

Story points: 5.0
FE:  Have a Legend for each map within the ScreenManager

* Make a redux action where you can trigger to show the legend with a given mapid. The legend component itself can then be placed in the main application. This makes everything consistent and the legend will float over all the maps.
* Add the ‘(+) open legend’ button to each tile of the multimapview, maybe using a redux action as mentioned above.

https://gitlab.com/opengeoweb/geoweb-assets/-/issues/1461

Story points: 5.0
FE: Have a LayerManager for each map within the ScreenManager

* Make a redux action where you can trigger to show the layermanager with a given mapid. The layermanager component itself can then be placed in the main application. This makes everything consistent and the layermanager will float over all the maps.
* Add the ‘(+) open layermanager’ button to each tile of the multimapview, maybe using a redux action as mentioned above.

https://gitlab.com/opengeoweb/geoweb-assets/-/issues/1461

Story points: 3.0
FE: finish LayerManager theme styling part 2

There are some details missing, see pics


- background color

![Screenshot_2021-08-12_at_16.57.11](/uploads/992a9d493462ca47a0e862c82b762ac1/Screenshot_2021-08-12_at_16.57.11.png)

- background color, size, color

![Screenshot_2021-08-12_at_16.57.22](/uploads/bfc67d048cafdf8214977e629c3184f7/Screenshot_2021-08-12_at_16.57.22.png)

- Almost non-noticeable shadow that appears when hovering draghandle/enablelayer/addlayers/menu icons is added, for some reason enablelayer has a blue shadow and the others have grey ones? And same as previous comment, the whole Layer Manager draghandle doesn't have this shadow at all.

![Screenshot_2021-08-20_at_14.27.05](/uploads/21c0ab7a6aee2c5715cb3e618c7b7e7c/Screenshot_2021-08-20_at_14.27.05.png)

Story points: 5.0
BE: Treat cancellations as amendments for TAF

Information from Marcel:
 
_I tried to find some information on how to “re-cancel” a TAF and what to do with the starttime of the validity of the TAF (either wallclock-hours or original).
Could not find any information on this use case. Cancelling is often used when there are no observations (e.g. during the nighttime-closure of the field) being made to review the active TAF, This is not the case in the Netherlands (at least not the civilian airports).
When these airports will open in the morning and observations are being made again,  the forecaster will start with a new TAF.
O yes, we also have a minimum duration of the TAF (should be more than 6 hours).  So de-cancelling is perhaps a non-existing use case.
That said, since a cancelled TAF must be coded as an amendment to the previous TAF, a cancelled TAF is no more than an AMD. And for AMD we do have rules, allowing to amend it again (and again, and again). So, I would allow for amending a cancelled TAF, also to avoid deadlocks if a user cancels a TAF by accident.
Than, the question on what start-time of the the TAF validity needs to have; for this, we can rely on the AMD rules, being that the end-time will stay the same as the original, but the starting time is the intended starttime of the new forecast._

Story points: 5.0
BE: add /populate call to populate templates

Add a call (/populate) to the BE to fill the template for the FE based on the sent notification info.

- type from FE passed is notification as used /store 
- return type is an object with "title" and "message", both strings
- Templates can be found here (https://surfdrive.surf.nl/files/index.php/s/hLZSzmJYGsQKYkx?path=%2F) if no template available or empty return text "No template found, please type your own message". There are 3 types of templates: 1. message texts, 2. titles and 3. NOAA scale impact texts
- Store template texts in S3 (or DynamoDB) to allow the lambda to read the templates from there. On start up it will read the entire set and keep that in memory. (This would mean re-deployment to renew the set).
- In the template, replace $xxxxxx strings with the values passed from the FE. The $impact_text should be replaced with the NOAA scale impact text template (in which again you need to substitute $xxxxxx values with what is passed from FE)
- In CI/CD we will have to push the templates to S3 (they would be part of the source code) to a new bucket (enable versioning if needed)

Story points: 8.0
FE: Add repopulate button to SW notification form

Add a button "repopulate" to the SW notification form.

Add button to retrieve the original template text called "repopulate". This button triggers a call to the BE (/populate) sending the current form information. The received title and template text is then filled in their respecting fields (title and message). When first opening a new form, we need to trigger a call to the BE to auto-populate the message and title field

![image](/uploads/d5551f9d414ade23442a1bcb47c76b8e/image.png)

Story points: 5.0
Implement preset in ScreenManager

<!---
Always remember:
* Titel: summary of issue, line of text upto apx. 10 words
* One bug/wish per issue
* Check on duplicates
* Always use a friendly pen
--->

For details on preset see userstory

### Short description

There are certain presets that are extremely useful to forecasters in combination with the ScreenManager, to show the relevant information. 

### Why 

These presets will make it easier for forecasters to work with GeoWeb and it will save them time. 

### Test criteria

* The requested presets should be available in the ScreenManager

Story points: 3.0
BE: Modify taf2tac so it's allowed to fail

It's not possible to perform a validation from the TAF list, so we cannot predict whether we can or cannot make a TAC call. Instead, let's do it in the BE so that taf2tac only returns warnings instead of errors when the converstion fails.
The publishing code is inside the tafapi lambda, so it won't be affected by this change

Story points: 2.0
BE: prevent notifications on eventingest being added if they're already in the incoming notifications list

Currently, when retrying the event ingest, the notification simply gets added to the end of the incoming list in the events table. It doesn't check whether the notification is already there which can lead to duplicates as we see in acceptance now.

Before adding a new notification to the list, we need to check if the notification id is already in and if so, don't do anything

Story points: 5.0
BE: logging fix + grafana fix

- We need to ensure all json.dumps have `cls=DecimalEncoder` to ensure they don't fail on decimals
- in the notifications panel in grafana we see null a lot. To stop this, we need to set lifecycle_action to false in the grafana dashboard code for that section
![image](/uploads/18d78ede9375087e7d85ecbd05c66423/image.png)

Story points: 3.0
FE: Retrieve TAF TAC only when we have enough data

New TAFs are generating calls to the TAC BE that will inevitably return errors. In particular, the TAC BE is called as soon as we open a blank TAF.

In SIGMET/AIRMET, we have a function called `shouldRetrieveTAC`. 

In TAF, we have a function called `useTACGenerator`, that only checks whether the status is NEW. For some reason, this is not working properly, but anyway, it wouldn't be enough.

Story points: 5.0
BE: enable test_post_publish_cancel_amend_taf again

This test was faulty because of the way we are using timestamps and the time it took for the test itself to run as part of the pipeline. 

Possible fix: 
Something like:
```
@mock_dynamodb2
@mock_s3
#@freeze_time("2020-12-17T10:00:00Z")
def test_post_publish_cancel_amend_taf(requests_mock):
    requests_mock.post('http://tac-converter/gettaftac', text="ernst made a test for taf")
    init_mockdb()
    init_s3()
    from lambda_function import set_config, get_latest, post_taf
    .
    .
```
and
```
@mock_s3
def init_s3():
    s3_resource=boto3.resource('s3', region_name=os.environ['AWS_REGION'])
    bucket = s3_resource.create_bucket(Bucket=os.environ['S3_EXPORT_BUCKET_NAME'],
               CreateBucketConfiguration={'LocationConstraint': os.environ['AWS_REGION']})
```

Story points: 3.0
FE: Use of double click on map to exit drawing not working (SIGMET/AIRMET)

### Summary

When drawing a shape (polygon, square), the message `Double-click on the map or press ESC to exit draw mode` is shown. ESC works fine, however Double click not.

### Steps to reproduce

Draw a square on the map and try to double click on the Map to exit the drawing mode. 


### What is the current *bug* behavior?

Different for different types of shapes. Not working at all for squares, for polygones it will only be possible when clicking on one of the points in the polygon.

### Possible fixes

Limit the ways of exiting drawing mode to using `ESC`

Story points: 1.0
FE: TAF wrong text color in Safari

The read-only fields in the TAF form have the wrong text color in Safari

### Steps to reproduce

* Use Safari
* Open the TAF module
* Open one of the TAFs

### What is the current *bug* behavior?

Text color is blue, see screenshot

### What is the expected *correct* behavior?

Text color should be black, like in Chrome and Firefox

![image](/uploads/baa29dc64eedec922229b6d1c736a53f/image.png)

Original ticket: https://gitlab.com/opengeoweb/geoweb-assets/-/issues/1423

Story points: 2.0
FE: Sigmet - Airmet form header buttons not aligned in Safari

The buttons discard - save - publish are not aligned correctly in Safari

### Steps to reproduce

* Use Safari
* Open the Sigmet or Airmet module
* Click button to Create a new Sigmet or Airmet
* look at the buttons at the top of the form

### What is the current *bug* behavior?

buttons are using 2 rows

### What is the expected *correct* behavior?

all 3 buttons should be next to each other, like in Chrome or Firefox

![image](/uploads/a7e925c10f06b866fea785113552157b/image.png)

Story points: 2.0
FE: [BUG] Legend container does not show full GetLegendGraphic anymore

In geoweb only a part of the GetLegendGraphic image is displayed (the image is clipped at the bottom):

![image](/uploads/c0a202f12d1c3a616cedc8983046e2f3/image.png)

The image from the server looks like this (it includes the units on the bottom):

![image](/uploads/5c1ab7759d2f4227d8ac436f048f1218/image.png)

Story points: 3.0
FE: [BUG] When going to the screenmanager and then back to the main application, the timeslider does not work anymore.

When going to the screenmanager and then back to the main application, the timeslider does not work anymore. This is because there is still a synchronization group state from the screenmanager; and the main map and main timeslider are not linked by default. We should use initsyncgroups to either clear the syncgroup state, or link the components as intended. Or use less different map components. (The map component in the screenmanager is linked by default)

Story points: 1.0
Add route in KNMI GeoWeb application for screenmanager

Goal is to access the screenmanager from the KNMI GeoWeb application with a route, for example /screenmanager. It should have the same header as the reference application.

- Use the header from the shared components
- Use the same Layout
- Add a menu item screenmanager in the hamburger menu of the main application
- Add a link to get back to the main application
- Add the preset selection in the header
- Add a route called screenmanager in the KNMI GeoWeb application

Like http://localhost:4200/screenmanager

Story points: 5.0
FE: change brand color and add surface browser page

- change bar brand color of dark theme (404040)
- add colour for the surface browser page (light theme: #CFCFCF and dark theme: #181818
Both colour pages (2 row) have been updated https://zpl.io/Vxx41kx and https://zpl.io/a8QBorX. This will be the page background (when loading application)
- add tiny toolbar toolbox without title https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/60f9318c3e123f13c72bbe96

Story points: 3.0
FE: implement elevation levels as design

Instead of using box-shadows, we can use the elevation levels by MUI and Didier.

light https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/609bb6a5287bd1abe0de39a7

dark https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/6093e694124ecf3886de76d4


- Implement the defined elevation, name them (elevation-01 etc), so we can use them `<Paper elevation={1} />` or `background: theme.shadows[1]`. MUI expects a list of 25, but we can fill the rest with 'none'. 
- Create story with elevation examples
- Use in AppHeader (elevation-01)


![Screenshot_2021-07-23_at_12.18.58](/uploads/69569f9f822b6735e33f1e1641424d26/Screenshot_2021-07-23_at_12.18.58.png)

https://material-ui.com/customization/default-theme/

Story points: 3.0
FE: Fix theme in Legend part 1

(so we have a good base with the header and footer + typography). 
https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/60f9318c3e123f13c72bbe96
https://app.zeplin.io/project/5ecf84a3c6ae1047a368f393/screen/60f9319044360a123ca42552 (dark)

Elevations:
- Dialog: 6
- Header,Footer: 1

Story points: 3.0
Meeting: Discuss left over TAF tasks (orphan tasks)

Discuss: 
Dev tasks: https://gitlab.com/groups/opengeoweb/-/issues?scope=all&state=opened&label_name[]=Backlog%3A%3AAviationTAF&label_name[]=DEV%20TASK

User stories in dev refinement: https://gitlab.com/opengeoweb/geoweb-assets/-/issues?scope=all&state=opened&label_name[]=KNMI&label_name[]=Workflow%3A%3A%20DEV-Refinement

Story points: 3.0
FE: Use Moveable layermanager

Use the same library for making the layermanager and legend moveable. The legend already uses the right library.
- Is it better to wait for first do the styling of the Legend with theme?

![Screenshot_2021-07-21_at_16.16.07](/uploads/5e1a14da3a24d2fd6a4551fd86504ea0/Screenshot_2021-07-21_at_16.16.07.png)

We need:
- Fix theme in Legend first (so we have a good base with the header and footer + typography). Which design to use, the layerManager?
- Use Moveable in MultidimensionSelect (+ theming would be nice)
- Use Moveable in LayerMananger (+ theming would be nice), there's a demo for this already

Kept this ticket as reference, can be closed after related tickets have been done

Story points: 3.0
FE: Implement multimap component

Currently it is implemented here: https://gitlab.com/opengeoweb/opengeoweb/-/blob/master/libs/core/src/lib/components/POC_ScreenManager/ConfigurableMultiMapWithSliderConnect.tsx . And currently it can only display 2x2 tiles with one slider.

- Maybe pass a multidim array (Rows/Cols) to display in the multimap component. 
- Demonstrate diffenent layouts in storybook
- Maps should autosync time and area
- This code needs to be independent of the screenmanager
- Have three presets: 4x4 2x2 and 3x2

Story points: 5.0