Requirements:
- A shape file of the 'sub-areas' of the hotspot
- A shape file of the receptor
- A text file with information on the grid as it is in FEWS. The first two columns contain all coordinates. The third column contains a unique gridID which can be used to access the right coordinates in the hazard.nc. Ordering is important.
All three files need to be in the same projection.
Creating the FEWS_grid.txt
See first part of this Matlab code as example.
Step-by-step tutorial for QGIS: Creating the <receptor>.txt in QGIS
Open a new project in QGIS
Add the FEWSGrid.txt as an delimited text layer to a empty project (Layer -> Add Layer -> Add Delimited Text Layer). In the popup window select 'First record has field names', e.g.:
Add the shape files (Layer -> Add Layer -> Add Vector Layer). After this the screen should look like this:
- Introduce unique IDs for each sub-area (or "sector") and each receptor
- Select a layer and open its attribute table (Right click -> Open attribute table)
- 'Toggle editing mode' (pencil icon)
- 'Open field calculator'
- Check the 'Create a new field' box and choose an 'output field name' (receptorID or areaID depending on the layer you selected)
- Set 'Expression' to $rownum
- Click 'Ok'
- 'Save edits' and once more 'Toggle editing mode'
- Repeat a-d for the other layer
Add the shapes file (Layer -> Add Layer -> Add Vector Layer)
Once all three layers are added that should be visible, e.g. like this: