Skip to content
renierkramer edited this page Feb 28, 2019 · 53 revisions

3Di Toolbox is a QGIS plugin for working with 3Di models and netCDF results. For more information about 3Di see: http://www.3di.nu/ or https://3diwatermanagement.com/

The 3Di Toolbox only works for:

  • QGIS 2.18 (until february 2019)
  • QGIS 3.4.5 (LTR after february 2019)
  • 64-bit version of QGIS (see below for more details)
  • 3Di v2 results

Installation

you can have QGIS2 and QGIS3 on your system at the same time.

Until february 2019 the plugin works with QGIS 2.18 (ThreeDiToolbox [v1.6 and sooner] is tested against windows7, windows10, Linux16.04. From february 2019 the plugin works with QGIS 3.4.5 (ThreeDiToolbox [v1.8 and later] is tested against windows7, windows10, Linux16.04, Linux18.04.

The installation can be done in two ways:

1) In case you do not have the 3Di Toolbox and want to have the latest version:

  • 1a: Releases of the plugin are available at the Lizard QGIS plugin repository. To add the plugin open QGIS and via the menu bar go to `Plugins > Manage And Install Plugins'. Go to 'Settings' ('extra' in Dutch version). Add a plugin repository ('plug-in opslagplaatsen' in Dutch) with name: 'Lizard' and URL: https://plugins.lizard.net/plugins.xml and reload. Go to 'all' and install the plugin by selecting '3di toolbox'.

2) In case you do have the 3Di Toolbox and want to upgrade to the latest version:

  • 2a: first try to upgrade through the QGIS plugin manager (in QGIS via menu bar go to `Plugins > Manage And Install Plugins'. Then select the 3Di Toolbox and click 'Upgrade plugin')
  • 2b: if 2a does not work, then manually delete the ThreeDiToolbox folder from plugin folder and try 1a
    • QGIS2 plugin folder = 'C:/Users/<user.name>/.qgis2/python/plugins/'
    • QGIS3 plugin folder = 'C:/Users/<user.name>/AppData/Romaing/QGIS/QGIS3/profiles/default/python/plugins/'

Under Windows, it is recommended to use 64-bit version of QGIS (a compiled 64-bit version of the netCDF library is included. For the 32-bit version of QGIS you have to install/ compile a version of the python netCDF library under QGIS yourself).

How to use

threeditoolbox_icons_menu

You can access the plugin functionality via the plugin menu in QGIS, or, via the buttons on the toolbar (see screen shot above). The buttons on the toolbar are respectively for: (1) about information, (2) adding 3Di results (data sources), (3) opening the toolbox, (4) opening the graph tool, (5) opening the side view tool.

Adding data sources

For most use cases you will want to add data sources:

  1. Click on the Selecteer 3di resultaten button.
  2. Select and load your Spatialite and netCDF files.

The plugin can automatically generate the network layers from the netCDF and add it to the map if you select a netCDF with geometry information. The netCDF also requires a corresponding id_mapping.json file (maps Spatialite to netCDF).

Graph

The graph tool is for visualizing time series. Click on the graph tool button to open it in a dock. You can now select features on the map if you have an active layer and add them to the graph using the Voeg toe button. Multiple features are supported. The following layers are supported:

  • the network layers generated from the netCDF
  • v2 views
  • (sewerage views)

The graph tool uses pyqtgraph which has built-in support for adjusting the axes and also for exporting to various formats. Right-click on the graph to see the options.

Toolbox

Sufhyd Import

Sufhyd is a Dutch standardized format for transfering data of sewersystems for hydraulic analyses.

The Sufhyd import can be found in the toolbox under 'Stap 2: Data conversie en inlezen'. After opening the tool, select a sufhyd file and the database to import the data into. The database selection is based on the database links you have created in QGIS. To add a Postgres database connection, first go to the left toolbar in QGIS and select the Elefant. To add a Sqlite database, select the feather.

Make sure you use an (empty) database created by the 3di commandline Turtle tools (otherwise the database will not be recognized by 3di).

Below a list of objecttypes that are parsed by the import. Some objects are ignored (there will be a warning about this in the logfile). Also some fields are ignored by the import, also this will be mentioned in the logfile if data is found.

After the import a message will be showed with a summary of the number of data errors and warnings. A more detailed summary can be found in the QGIS log (in the right-below corner of QGIS) and a full log can be found in the same directory as original sufhyd under the name 'import_sufhyd.log'.

List of parsed objects:

  • Manhole (*KNP)
    • The number of inhabitants will be added as Impervious surface
    • Attention: the shape of the manhole is refered as 'rnd' = round, 'sqr' = square and 'rect' = rectangle
  • Pipe (*LEI)
    • The number of inhabitants will be added as Impervious surface
  • Pumpstation (*GEM)
    • If multiple stages are defined, this will be transformed into seperate pumpstations. Up to 10 stages are supported
  • Weir (*OVS)
    • Flow direction (str_rch) is translated into discharge coefficients with a value of 0
    • An end node with boundary condition is not (yet) automatically added.
  • Orifice (*DRL)
    • Flow direction (str_rch) is translated into discharge coefficients with a value of 0
  • Boundary (*UIT)
    • The waterlevel will be the average definition is taken (bws_gem), if not present the summer waterlevel is used and otherwise the winter waterlevel.
  • Extra manhole storage (*BOP)
    • The defined storage area is added to a manhole on the bottomlevel of the manhole. The defined bottom_level of the storage (niv_001) is ignored.
    • Only one storage area is supported
  • Drainage area/ Impervious surface (*AFV)

  • Linkage nodes (*KPG)
    • The 'fictive' linkages (with typ_gkn == 01) are ignored, only real nodes are combined.
    • The second node (ide_kn2) is removed. Impervious surfaces and pipes linked to the removed node are redirected to the first node. Extra manhole storage will be lost.

Guess indicators

Guess indicators will 'guess' for values based on other values.

The tool can be found in the toolbox under 'stap 3 - schematisatie bewerken'. After opening, the database can be selected. The database selection is based on the database links you have created in QGIS. To add a Postgres database connection, first go to the left toolbar in QGIS and select the Elefant. To add a Sqlite database, select the feather.

Currently supported are:

  • Pipe friction: Guess friction based on pipe material.
  • Manhole indicator: Add flag to manhole if it is pumpstation basin, an boundary or just a manhole.
  • Manhole area. Calculates the connectionnode storage area based on the shape, length and with of a manhole

The processing can be performed only for the fields that are empty or overwrite the current values (the guess manhole area can only be used on empty fields).

Other tools

The toolbox contains several custom scripts:

  • calc_manhole_statistics.py: calculate statistics on manholes and connection nodes
  • calc_structure_statistics.py: calculate statistics on structures
  • generate_netcdf_layer.py: calculate netCDF layer again if you haven't done so

Side view

Currently side views only work if you have loaded a Spatialite and a netCDF (see Adding data sources). Make sure you generate a new set of lines and nodes from the netCDF after selection.

  1. Click on the side view button to open the side view tool. This will generate the necessary layers.
  2. Click on Kies sideview traject and click on a feature to select a start location. Click on another feature to select an end location and the tool will draw a path. Note: in channels is still a bug related to the length
  3. Use the slider in the toolbar to view the water level through time.
Clone this wiki locally
You can’t perform that action at this time.