A QGIS plugin to manage Delft3D files.
- Reads a fixed-weir text file where each weir is defined by X,Y coordinates and attributes.
- Reads point-cloud
.xynfiles as point layers with optional generated names. - Loads UGRID mesh NetCDF files with a native 2D mesh layer plus 1D vector layers.
- Exports line features and fixed-weir point layers with the main
Exportaction. - Exports generic point layers to ASCII
.xynfiles. - Writes bed level data into UGRID mesh NetCDF files.
- Creates trachytopes point layers from UGRID mesh edge coordinates.
- Bulk-updates trachytope values for points inside polygons.
- Exports trachytopes to ASCII
.arlfiles.
Load Delft3D files into QGIS. File type is detected automatically by extension and, for .pliz, by the number of columns declared in the file header.
.fxw— Fixed weir file (creates line + point layers).pli,.ldb,.pol— Polyline files (creates line layer).pliz— Auto-detected as polyline or fixed weir based on header column count.xyn— Point files (creates point layer).nc— UGRID mesh NetCDF files (creates a native mesh2d layer + 1D polyline/point layers)
Parse a fixed-weir text file into two memory layers:
- a line layer containing one polyline per weir
- a point layer containing per-point weir attributes
Each weir block is read in this structure:
- Weir name line
- Header line:
<number_of_rows> <number_of_columns> - One row per weir point with:
- X, Y
- crest level
- left sill height
- right sill height
- crest width
- left slope
- right slope
- roughness coefficient
<file_name>_lines(LineString, EPSG:28992)- field:
weir_name
- field:
<file_name>_points(Point, EPSG:28992)- fields:
weir_name,crest_lvl,sill_hL,sill_hR,crest_w,slope_L,slope_R,rough_cd
- fields:
Parse a polyline file into a memory line layer with named polylines.
Each polyline block is read in this structure:
- Polyline name line
- Header line:
<number_of_points> 2 - One row per vertex with:
- X Y
<file_name>(LineString, EPSG:28992)- field:
weir_name(contains the polyline block name)
- field:
When loading a .pliz file, the plugin reads the block header line and checks the declared number of columns:
- If the header column count is greater than
2, the file is loaded as a fixed weir. - If the header column count is
2, the file is loaded as a polyline.
Parse an ASCII point file into a memory point layer.
Each non-empty row contains:
x y name- or
x ywhen name is missing
Columns are whitespace-separated.
- If a row has a name value, that value is used.
- If name is missing, the plugin generates
obs_%din import order (obs_1,obs_2, ...).
<file_name>(Point, EPSG:28992)- fields:
x,y,name
- fields:
Load UGRID-format NetCDF files containing 1D and/or 2D computational mesh components. The plugin automatically detects and creates separate layers for each component found.
2D Mesh (mesh2d)
- Creates a native QGIS mesh layer from the
Mesh2dtopology - Loads only the 2D mesh topology as mesh, so mesh1d is not added as a separate mesh layer
1D Mesh Branches (mesh1d)
- Creates a polyline layer from mesh1d discretization
- Aggregates
mesh1d_edge_nodesby branch (viamesh1d_edge_branchmapping) - One polyline feature per branch
- Field:
name(e.g., "Branch_0", "Branch_1", ...)
Network Geometry Edges
- Creates a polyline layer from network topology geometry
- Built from
network_edge_nodesand network node coordinates - One polyline feature per network edge/branch
- Field:
name(fromnetwork_branch_long_nameif available)
Network Geometry Nodes
- Creates a point layer from detailed geometry nodes
- Extracted from
network_geom_x,network_geom_ycoordinates - One point feature per geometry node
- Field:
name(descriptive node identifier)
When loading a mesh file, the following layers are created (if components exist):
<file_name>_mesh2d(Mesh layer)<file_name>_mesh1d_branches(LineString layer, withnamefield)<file_name>_geometry_edges(LineString layer, withnamefield)<file_name>_geometry_nodes(Point layer, withnamefield)
- The plugin attempts to read EPSG code from NetCDF metadata
- If not found, defaults to EPSG:28992 (RD New projection, common for Dutch models)
- Open
Importfrom the plugin menu or toolbar. - Select an input file (.fxw, .pli/.ldb/.pol/.pliz, .xyn, or .nc).
- The plugin creates appropriate layer(s) and adds them to the current project.
Use the main Export action to export the active layer to the appropriate Delft3D format.
- Active line layer: exported to the Delft3D-style polyline text format.
- Active point layer with the fixed-weir fields: exported to
.pliz. - Other point layers: use
Export Point Cloud (.xyn)instead.
- Active layer must be a vector line layer.
- Supports single-part and multi-part line geometries.
- A name field is selected automatically with this preference order:
weir_name,name,naam,id, then first available field.
Polyline (.pli) — Delft3D block format. For each exported line:
- Block name (feature name or fallback
feature_<id>) - Header line:
<number_of_points> 2 - One line per vertex with
x y
For multi-part geometries, each part is exported as a separate block with suffix _1, _2, etc.
XY (.xy) — Two-column format, compatible with tools that expect plain coordinate lists:
- Two columns per row:
x y - No name or header lines
- Consecutive polylines are separated by a
NaN NaNline - No trailing
NaN NaNafter the last polyline
- Select the line layer to export.
- Open
Exportfrom the plugin menu or toolbar. - Choose output file path — use
.plifor Delft3D block format or.xyfor two-column format. If no known extension is typed,.pliis appended automatically. - The plugin writes valid line features to the target file.
Export a compatible QGIS point layer to fixed-weir .pliz format.
- Active layer must be a vector point layer.
- The layer must contain these fields:
weir_name,crest_lvl,sill_hL,sill_hR,crest_w,slope_L,slope_R,rough_cd weir_namemust be non-empty.- Numeric fixed-weir attributes must be finite values.
For each weir_name, the plugin writes one block:
- Weir name line
- Header line:
<number_of_rows> 9 - One row per point with:
x y crest_lvl sill_hL sill_hR crest_w slope_L slope_R rough_cd
- Points are grouped by
weir_name. - The current feature iteration order is preserved within each weir block.
- If a block name does not already end with
:, the exporter adds it in the output file for importer compatibility.
- Select a compatible fixed-weir point layer.
- Open
Exportfrom the plugin menu or toolbar. - Choose output
.plizpath. - The plugin writes one fixed-weir block per
weir_name.
Export a selected QGIS point layer to ASCII .xyn format.
- Active layer must be a vector point layer.
One row per point:
x y name
- The plugin tries to use a name-like field with priority:
weir_name,name,naam,id, then first available field. - If a name is missing or empty, fallback name
obs_%dis used in export order.
- Select the point layer to export.
- Open
Export Point Cloud (.xyn)from the plugin menu. - Choose output
.xynpath. - The plugin writes one line per valid point feature.
- Use this action for generic point layers that are not fixed-weir
.fxwlayers.
The plugin now supports interpolation of elevation data from external datasets to
UGRID mesh nodes (for example writing to mesh2d_node_z).
- NetCDF file (user selects variable, e.g.
height) - QGIS raster layer (user selects band)
- QGIS vector point layer (user selects numeric attribute)
- Mean of points in dual cell
For each mesh node, the plugin builds the node dual cell and computes the mean of source points inside that polygon. If no point is inside the dual cell, that mesh node is left unchanged.
- If
Output meshis empty: the selected mesh file is updated in place. - If
Output meshis set: the input mesh is copied first, and results are written to the copied file.
Required Python packages:
netCDF4pyprojscipy
Use one-click installer from the plugin menu:
Delft3D File Manager -> Install Python Dependencies
After installation, restart QGIS.
- Open
Write Bed Level to Meshfrom the plugin menu. - Select target mesh NetCDF file.
- Select mesh elevation variable (for example
mesh2d_node_z). - Select source type and source variable/layer.
- Optionally select
Output meshto avoid overwriting the input. - Choose interpolation method and click
Run. - Open the resulting mesh file and inspect updated node elevations.
Create trachytopes points from mesh edge coordinates and export selected values in Delft3D-style ASCII format.
Create Trachytopes from MeshSet Trachytopes in PolygonsExport Trachytopes (.arl)
The plugin reads edge coordinates from the selected UGRID NetCDF mesh:
- primary variables:
mesh2d_edge_x,mesh2d_edge_y - fallback: edge coordinates from UGRID topology metadata when available
It creates a point layer with one feature per mesh edge coordinate and these fields:
xytrachytope_number(initial value0)fraction(initial value0)
Two workflows are supported:
- Manual editing in the QGIS attribute table.
- Bulk assignment using polygons:
- Set the trachytopes layer as active.
- Open
Set Trachytopes in Polygons. - Choose a polygon layer.
- Enter target
trachytope_numberandfractionvalues. - Values are applied to points inside selected polygons (or all polygons if none are selected).
Export writes an ASCII text file with extension .arl and single-space separators.
Each output row is:
x y 0 trachytope_number fraction
Export rules:
- Only points with
trachytope_number != 0are written. - Points with invalid or non-finite numeric values are skipped.
- Open
Create Trachytopes from Mesh. - Select the UGRID mesh file and create the trachytopes point layer.
- Assign non-zero trachytope values (manually or with polygons).
- Open
Export Trachytopes (.arl). - Save the ASCII
.arloutput file.
- Download the latest release ZIP from Releases.
- In QGIS: Plugins → Manage and Install Plugins → Install from ZIP.
Clone this repository and copy the folder into your QGIS plugins directory:
- Windows:
%APPDATA%\QGIS\QGIS3\profiles\default\python\plugins - Linux:
~/.local/share/QGIS/QGIS3/profiles/default/python/plugins
Then restart QGIS and enable Delft3D File Manager.
Build:
python .\build_plugin.pyRelease:
git tag v1.0
git push origin v1.0
MIT License © Victor Chavarrias