Mesh Data Abstraction Library
You can use MDAL to load the following file formats:
- 2DM: Mesh representation of various various hydrodynamic modelling packages (e.g. BASEMENT, TUFLOW)
- NetCDF: Generic format for scientific data. Examples can be found here
- GRIB: Format commonly used in meteorology. Examples can be found here
- XMDF*: As an example, hydraulic outputs from TUFLOW modelling package
- XDMF: As an example, hydraulic outputs from BASEMENT 3.x modelling package
- DAT: Outputs of various hydrodynamic modelling packages (e.g. BASEMENT, HYDRO_AS-2D, TUFLOW)
- 3Di: 3Di modelling package format based on CF Conventions
- UGRID: Unstructured Grid format based on CF Conventions
- FLO-2D: Outputs of the FLO-2D modelling package
- Selafin/Serafin: Outputs of the TELEMAC 2D hydrodynamic modelling package
- HEC-RAS: Outputs of the HEC-RAS modelling package
- SWW: Outputs of the ANUGA modelling package
- Esri TIN: Format for storing elevation data as a triangulated irregular network
- SAGA FLOW**: Rasters in the SAGA flow direction format
- ADCIRC***: ADCIRC hydrodynamic model results
* Data lazy loaded
** Formats can be preprocessed using QGIS Crayfish/Mesh processing algorithm to one of supported formats
*** Results should pre pre-processed to become UGRID compliant
MDAL is an open-source project and all contributions to either documentation, format support, testing or code are more than appreciated. Any change to the code must go through Pull Request, followed by review by one of the MDAL core developers.
To be able to accept a pull request, please verify that:
- code follows QGIS coding style
- code is properly unit-tested with a set of small test files under
tests/data/<format>
(code coverage > 90%) - code is reasonably documented and easy to read
- code compiles without any compilation warnings
- no dead-code (e.g. unused functions) or commented out code
- all new code or new dependencies (e.g. libraries) have GPLv2 compatible license
- all tests pass
For 64-bit version:
- Install Microsoft Visual Studio 2017
- Install OSGeo4W (64bit) to C:\OSGeo4W64
- see win build script
install dependencies for drivers
sudo apt-get install libgdal-dev libhdf5-dev libnetcdf-dev libxml2-dev
and use cmake to generate build system
mkdir build;cd build
cmake -DCMAKE_BUILD_TYPE=Rel -DENABLE_TESTS=ON ..
make
First you need to install homebrew and osgeo4mac dependencies, see osx install script
To build, create build system with cmake and make sure you use dependencies from homebrew and not system ones
mkdir build;cd build
export CMAKE_PREFIX_PATH=/usr/local/opt/gdal2
cmake -DCMAKE_BUILD_TYPE=Rel -DENABLE_TESTS=ON ..
make
run ctest command in build directory ctest -VV
format code:
cd scripts
./mdal_astyle.sh `find .. -name \*.h* -print -o -name \*.c* -print`
or use git pre-commit hook
cd MDAL
ln -s ./scripts/mdal_astyle.sh .git/hooks/pre-commit