|
|
Attributes can be added to the subbasins from shapefiles (point/polygons) or gridded/rasters (.bil format).
|
|
|
The added attributes will be found in the attribute file of the exported subbasin shapefile or the so called [**HYSS file**](https://git.smhi.se/whist/whist/wikis/WHIST-Wiki/12.-Export-shapefiles-and-tables#textfiles-attributes-table-to-export).
|
|
|
The datasets can be spatially linked to the subbasins by a few different GIS methods:
|
|
|
|
|
|
**Point layers** (nearest or inside)
|
|
|
|
|
|
**Polygons** (mean, missing, nearest, inside, first centerhit, largest centerhit, smallest centerhit, target, outlet, sum, multiple, classes, adjclasses)
|
|
|
|
|
|
**Grid** (mean, nearest, min, max, median, stdev, sum, missing, zones, classes, adjclasses, relief ratio).
|
|
|
|
|
|
NOTE (1): Test the methods to be sure you get the supposed outcome.
|
|
|
NOTE (2): HYPE uses -9999 for missing values. If no data can be extracted for a certain subbasin it will get this value by default.
|
|
|
NOTE (3): Remember that the used files (shapefiles/grids) must be in the same projection as the WHIST database you are using and the grids must be in .bil format.
|
|
|
|
|
|
____
|
|
|
|
|
|
[[_TOC_]]
|
|
|
____
|
|
|
|
|
|
### 11.1 General description
|
|
|
|
|
|
1. Go to HYDRO/Data
|
|
|
|
|
|
2. Click the button "manage data fields"
|
|
|
![Manage_Data_fields](uploads/3d6424f58a37fa663bb6841b879ca9c3/Manage_Data_fields.png)
|
|
|
|
|
|
3. Choose the type of data file to extract (polygon/point/grid)
|
|
|
|
|
|
4. Choose the field from the data set attributes that will be connected.
|
|
|
|
|
|
5. Choose method to link/extract the data, give the attribute a name, click on "create new". The Name will now appear to the right under "Existing list".
|
|
|
![ManageDataCon_Point_B2](uploads/9b29851295588f86c0dde704768cf962/ManageDataCon_Point_B2.png)
|
|
|
|
|
|
6. Continue with all dataconnections you want to add to the attribute table and click OK
|
|
|
|
|
|
7. Select the basins you want to connect the data to in the map
|
|
|
|
|
|
8. a. Click on the button "dialog for connected fields" and check the boxes of the once you want to derive/recalculate **(1.)** If you want all or deselect all use the buttons at **(2.)**. Under Options **(3.)** you decide whether you want to include the automatic fields or not, keep existing values and just calculate new attributes or clear the values. THen you select the one you want to remove under Item and click clear.
|
|
|
|
|
|
![Dialog_connection](uploads/c01654ba021ccb3d1f6945f02d0e088b/Dialog_connection.png)
|
|
|
|
|
|
9. When you Export subbasin shapefile and/or HYSS file the extracted data will all be added after the already existing default columns
|
|
|
|
|
|
|
|
|
### 11.2 Link information from a point layer
|
|
|
|
|
|
There are two ways to link data from a point layer to the subbasins:
|
|
|
- nearest
|
|
|
- inside
|
|
|
|
|
|
![ManageDataConnectPointsc](uploads/b9d4a37877c74361e15be985ecae4c9c/ManageDataConnectPointsc.png)
|
|
|
*Red dots are observation points, X are subbasin centerpoints, orange lines show links to nearest observation point, yellow show links to an observation point located inside the subbasin.*
|
|
|
|
|
|
You can choose which attribute from the linked file you would like to link. It is possible to link several attributes from the same file.
|
|
|
|
|
|
See [**11.1 General description**](https://git.smhi.se/whist/whist/wikis/WHIST-Wiki/11.-Extract-and-connect-attributes-to-the-subbasins#111-general-description) for all steps from data to output.
|
|
|
|
|
|
|
|
|
### 11.3 Link information from polygons
|
|
|
|
|
|
There several ways to link data from a polygon layer to the subbasins:
|
|
|
- MEAN
|
|
|
- MISSING
|
|
|
- NEAREST
|
|
|
- INSIDE
|
|
|
- FIRST CENTERHIT
|
|
|
- LARGEST CENTERHIT
|
|
|
- SMALLEST CENTERHIT
|
|
|
- TARGET
|
|
|
- OUTLET
|
|
|
- SUM
|
|
|
- MULTIPLE
|
|
|
- CLASSES
|
|
|
- ADJCLASSES
|
|
|
|
|
|
You can choose which attribute from the linked file you would like to link. It is possible to link several attributes from the same file. Beneath is an example where lake polygons ID are added to the subbasin attributes if the lake is located inside the subbasin. The attribute will be called LAKE_ID.
|
|
|
|
|
|
![Connect_polygon](uploads/41d490abc1c0aba6235b6b15596c4d60/Connect_polygon.png)
|
|
|
|
|
|
See [**11.1 General description**](https://git.smhi.se/whist/whist/wikis/WHIST-Wiki/11.-Extract-and-connect-attributes-to-the-subbasins#111-general-description) for all steps from data to output.
|
|
|
|
|
|
### 11.3 Extract information from grid
|
|
|
|
|
|
There are several ways to extract data from a grid to the subbasins. The choice usually depends on the nature of the gridded data. In the next parts you will get some example from data useful in a HYPE model:
|
|
|
|
|
|
#### 11.3.1 Elevation statistics from DEM (digital elevation model)
|
|
|
|
|
|
For a DEM you can extract different elevation statistics for the subbasins:
|
|
|
|
|
|
- MEAN
|
|
|
- MEDIAN
|
|
|
- MIN
|
|
|
- MAX
|
|
|
- STDEV
|
|
|
- RELIEF RATIO ((ELEVmedian - ELEVmin) / (ELEVmax - ELEVmin))
|
|
|
|
|
|
#### 11.3.2 Fraction of Soil and landuse classes (SLC)
|
|
|
|
|
|
From a grid with different combinations of soil and landuse classes (e.g. [SLC (soil and landuse classes](http://www.smhi.net/hype/wiki/doku.php?id=start:hype_file_reference:geodata.txt&s[]=slc)), or or other types of classes/zones, you can extract the fraction of each class/zone belonging to each subbasin. You will get the fraction of each class in a separate column in the attribute table for each subbasin.
|
|
|
|
|
|
![SLC](uploads/e5e8bcea15c5591c60e4cc874728aea0/SLC.png)
|
|
|
*How to add fractions of classes to the subbasins using Data connection dialog*
|
|
|
|
|
|
- The grid values will get the name SLC_1, SLC_2, SLC_3..... See the figure beneath.
|
|
|
|
|
|
![SLC_i_attributtabell](uploads/8390923c4e6073fdff704f02d9eed765/SLC_i_attributtabell.png)
|
|
|
*Derived SLCclasses shown in the attribute table. The sum of fractions will always be 1.*
|
|
|
|
|
|
#### 11.3.3 SLOPE from DEM and DIR (elevation and flow direction)
|
|
|
From **DEM and DIR** you can extract the slope of the subbasin. Choose SLOPE in the Grid Id box as shown in the figure beneath. You can get different types of statistics, MEAN, MEDIAN, MIN, MAX etc.
|
|
|
|
|
|
![SLOPE](uploads/dc78a786623a819bb6798d3ed4d01f2b/SLOPE.png)
|
|
|
|
|
|
#### 11.3.4 Deviation from subid mean elevation for each SLC within the subbasin (DHSLC).
|
|
|
|
|
|
From SLC and DEM you can extract the SLCs deviation from the subbasin mean elevation for each SLC class in the subbasin. These attributes are called [DHSLC_1, DHSLC_2, DHSLC_3, etc.](http://www.smhi.net/hype/wiki/doku.php?id=start:hype_file_reference:geodata.txt) and you get them by using the ADJCLASSES method instead of just CLASSES. You will get both SLCs and the corresponding DHSLC with this method. [DHSLC give the ability to adjust temperature and rainfall](http://www.smhi.net/hype/wiki/doku.php?id=start:hype_model_description:processes_above_ground&s[]=dhslc#links_to_file_reference) (elevation dependent) for each SLC part within the subbasin.
|
|
|
|
|
|
|
|
|
#### 11.3.5 Population grid
|
|
|
|
|
|
From a population grid you can for example sum up the number of citizens within the subbasin
|
|
|
|
|
|
|
|
|
|
|
|
|