-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support of 1D elements in Mesh Layers #164
Comments
LGTM! For reference, the ESRI tin format also supports tags on edges/vertices, so that's another potential use case here. |
…ement-Proposals#164 1D mesh consist of edges (edge is straight line segment with 2 vertices) and the data that is defined on either vertices or edges. Such data can be loaded by MDAL and rendered as mesh layer in QGIS.
Could this be compatible with the ESRI Network data in FGDB? |
@Saijin-Naib do you have a link to the format specifications and/or some sample data? |
I don't think they have a format specification because, you know, ESRI, but I'll take a poke around. As for example data, yes I can get you some 😊 |
@Saijin-Naib best to open issue in MDAL with the example data (<3 MB) and ideally some link for specification or so |
* MDAL 0.5.90 : support for custom Logger and 1D meshes * [FEATURE] [MESH] Support rendering of 1D meshes, see qgis/QGIS-Enhancement-Proposals#164 1D mesh consist of edges (edge is straight line segment with 2 vertices) and the data that is defined on either vertices or edges. Such data can be loaded by MDAL and rendered as mesh layer in QGIS.
QGIS Enhancement: Support of 1D elements in Mesh Layers
Date 2020/01/27
Author Peter Petrik (@PeterPetrik)
Contact peter.petrik@lutraconsulting.co.uk
maintainer @PeterPetrik
Version QGIS 3.14
Summary
The initial implementation of mesh layer in QGIS supports only basic type of 2D irregular meshes with data defined on faces and vertices. In QGIS 3.12, we added support for 3D Layered/Stacked Meshes. Another type of mesh which is not yet supported is 1D mesh. This proposal describes the required steps to allow usage of 1D mesh for QGIS users.
Description
1D data can be stored as a mesh layer, in the form of mesh nodes (or vertices) and mesh edges. Edge is a straight line between two vertices. The direction of an edge is defined by the first/start and the second/end vertex. Similar to 2D and 3D mesh, 1D mesh components can store multiple variables with temporal dimension. 1D mesh elements can have linkage with 2D (or 3D) elements. Example of such data is urban drainage system: with pipes (edges) and manholes (nodes). In this case, edges can store flow velocity and nodes can store water depth.
One of the standard specifications for representation of 1D mesh is UGRID.
Water management in 1D domain is quite common use-case based on number of QGIS plugins that are available for this purpose. To mention just few, QEsg (16k downloads) or QWater (14k downloads). EPANET, arguably considered as the industry standard, would be possible to support directly in MDAL and 1D Mesh Layer, at beginning for post-processing purposes.
Other use case is river model like HECRAS, where the nodes are profiles on the river and edges are distance from the profile.
Users will be able to load 1D mesh data in QGIS. Similar to 2D mesh symbology, QGIS will provide styling of the nodes and edges based on their quantities. Additionally, mesh elements can contain vector quantities (e.g. velocity) which can be styled in the same way as it is currently handled for 2D meshes.
Example Data
Imagine a simple 1D mesh with 5 vertices (e.g. manholes) and 4 edges (e.g. pipes) with topology as visualised on following figure
Data could be vector values (e.g. water flow velocity):
The vector values on edges are not usually defined in the data for HEC-RAS or UGRID format. Nevertheless, the styling and rendering of such data is the same as the data defined on vertices.
There are also scalar values (e.g. water depth on nodes) that could be defined, for example:
Some formats store additional data on nodes, for example cross-section geometries in HEC-RAS format. The extra information can be stored as vertex metadata, so the QGIS Python plugins can take usage of such information.
Design
Changes in MDAL
MDAL can read 3D stacked meshes and 2D meshes at the moment. 1D meshes basically consist of vertices and data defined on vertices which are the same as for 2D meshes. The edges will be added to the MDAL public API (for both edges of 2D elements or edges on 1D meshes) similarly to API for faces or vertices:
New dataset type defined on edges will be introduces to be able to retreive data from 1D edges:
Handling of files with multiple meshes
For example UGRID format can store any number of independent meshes in one file (e.g. 1D and 2D mesh). Those meshes do not share any data, they have separate topology, vertex definition, faces or edges definition and temporal data. Therefore, MDAL and QGIS will be updated to handle such file formats similarly to how sublayers are treated for vector layers. If file contains one mesh, the mesh is loaded directly. In case of multiple meshes, user will be able to choose from a pop-up dialog which meshes to load. Each of the selected mesh will be added as a separate layer in the QGIS layer tree.
In the situation when user has loaded multiple mesh layers, e.g. 1D urban drainage system and 2D flood model, both with temporal dimension, it is desirable to be able to change timestep simultaneously on both layers. This will be handled as part of time refactoring initiative started in QEP 128
Styling of the 1D meshes
The renderer and GUI for vectors/arrows (both on defined edges and vertices) will be identical with 2D mesh vector renderer for data defined on vertices. For vector data on edges, there will not be any renderer implemented in the first version.
For contours, the GUI will be similar to 2D mesh faces renderer, but with additional option to be able to display width of line based on selected scalar dataset group. Also user will be able to set fixed line size similar to simple vector layer renderer for lines.
To support regular vector layer symbology for both points and lines, we will develop an API and implement processing algorithms (in Crayfish) to be able to export vertices/edges to OGR-compatible formats.
Identify and plots
To be able to browse raw data, 1D meshes will be integrated to the Identify tool and public API will be created, so it is possible to export raw data for plot creation.
The example of the plots that could be implemented in Crayfish with the new API:
Affected Files
Most of the mesh related files and MDAL library
Performance Implications
None
Further Considerations/Improvements
Backwards Compatibility
For all formats that do not 1D meshes, the API will be backward compatible.
Issue Tracking ID(s)
The text was updated successfully, but these errors were encountered: