Skip to main content

BASEmesh

BASEmesh is a mesh generation and preprocessing toolkit for the numerical simulation package BASEMENT.

Highlights

  • Generation of 2D quality meshes using Jonathan Shewchuk's Triangle
  • 2DM mesh interpolation via mesh and raster (DEM) elevation sources
  • Available as QGIS plugin
  • Optional C extension module for acceleration
  • 1D channel generator BASEchange

Installation

As BASEmesh is available as both a Python module and QGIS plugin, the installation path depends on the version:

QGIS Plugin

  1. Start QGIS
  2. Load the QGIS plugin manager by choosing 'Manage and Install Plugins…' in the 'Plugins' category of the QGIS toolbar
  3. Select 'Settings' from the left panel
  4. Click on 'Add…' and provide a descriptive name, e.g. 'BASEmesh Plugin Repository'
  5. Specify the repository address: https://people.ee.ethz.ch/~basement/qgis_plugins/qgis_plugins.xml
  6. Press OK to confirm; a new entry has been added to the list of plugin repositories (make sure the Status field reports as connected before continuing)
  7. Select 'All' from the left panel of the plugin manager and search for ''BASEmesh''
  8. Choose the BASEmesh plugin (if several are available, choose the one with the highest version number) and press 'Install Plugin'
  9. Close the plugin manager. A new toolbar should have appeared and a 'BASEmesh' entry added to the 'Plugins' category of the QGIS toolbar

Alternatively, you can also find a ZIP version of a given BASEmesh release under the repository Releases page, which can be installed using the 'Install from ZIP…' option in the QGIS plugin manager.

For QGIS compatibility testing and machine-local validation validation, see:

Python Module Installation

Note: Installation of the Python module is not required for QGIS plugin use. It is only required for command line tools such as BASEchange or when using BASEmesh as a dependency for user code.

python -m pip install --user --upgrade basemesh

Getting Started

Note: This section only covers use of the QGIS plugin and related utilities.

For usage instruction on the 1D channel generator, refer to the BASEchange Wiki pages.

If you wish to use BASEmesh as a dependency, it is recommended to locally build the Python API Documentation for detailed reference. Prior familiarity with the BASEmesh workflow via the plugin is recommended.

BASEmesh Workflow Overview

The BASEmesh workflow consists of three steps:

  1. Elevation mesh generation (optional if you have raster elevation data)
  2. Quality mesh generation
  3. Mesh interpolation

The following sections will cover the basics of how to use each tool. Note that this is purely a first introduction into the process and will skip a lot of the nuances regarding model setup and mesh generation. You can find additional information in the utilities' 'Help' tab.

Visit the repository Wiki for detailed guides and examples.

If you are a seasoned user of BASEmesh v1.4.5, check out the Migration guide for details on how to convert your existing projects for this version of BASEmesh.

Elevation Mesh Generation

Elevation meshes are generated to represent the elevation geometry of your model. They provide an alternative to raster DEM data and allow the interpolation of a 2D quality mesh onto an elevated geometry.

3D Input Geometry

To generate an elevation mesh, you require input geometry in the form of 3D vector layers. These will generally take the form of 3D poly lines or points.

If your input geometry is not 3D, you can use the 'Convert Legacy Layer (…)' algorithms in the QGIS Processing Toolbox to add elevation information via layer attributes.

Mesh Domain

By default, the elevation meshing utility will use the 'Keep convex hull' mesh domain setting. This means that the outer edge of the generated mesh will equal the convex hull of your input data.

This allows the generation of a mesh from point data only, but it will also "eat" any concavities, which is generally not an issue when using a single elevation data source.

If you do require concavities, make sure you have a closed line string where you would like your mesh to end, then choose the 'Shrink to segments' mesh domain setting. This will delete any geometries that are not contained within the outermost closed line string found. Note that this can "eat" your entire mesh if the outside line string is missing or has any gaps.

Snapping Tolerance

If you know your input data is not perfect (which is highly likely with real-world GIS data), you can use the 'Snapping Tolerance' setting to define a fuzz range at which geometry will be snapped to each other. The value set in the GUI is the exponent; a value of -2 means that any points within 0.01 units will be considered coincident.

Quality Mesh Generation

The quality mesh defines the actual computational grid used for the simulation. It will always be flat, i.e. not contain any elevation information whatsoever.

2D Input Geometry

Quality meshing is entirely two-dimensional, any elevation information in the input data will be discarded if provided.

Make sure that your break lines enclose the outside perimeter of your mesh.

Mesh Regions

Any segment-bounded region in the mesh can be assigned a Material ID and element size constraint. This is done via a region marker point layer with the appropriate fields:

Field Description Type
Hole marker Any region with a hole marker will be carved out of the resulting mesh Integer
Material ID Used to define area-specific parameters such as friction or soil composition Integer
Maximum area The maximum area of any mesh element in this region Real

String Definitions

String definitions are node strings used to keep track of specific cross-sections in the mesh, either to serve as a boundary condition or as an output.

They are defined by named line string features in their own layer and will be automatically merged into the mesh break lines upon meshing. After the meshing is complete, these line strings are then used to retrieve the mesh nodes that were generated along these break lines.

You can include string definitions in the generated 2DM file (this is the required format for BASEMENT 3) or write them to a separate text file (for BASEMENT 2.8). You can also check both options if you wish to compare results from both versions.

Mesh Interpolation

The mesh interpolation utility takes an existing, flat quality mesh and drapes it over an elevation source.

This can either be a previously generated mesh layer, or a DEM raster layer and band.

Basic Mode

In this mode, only a single elevation source may be selected. If the quality mesh extends beyond the provided elevation source, meshing will fail.

Advanced Mode

This mode has two panels, with the available elevation sources to the right and an empty list to the left.

You can select any number of elevation sources from the right panel and drag them into the left in any order. Only elevation sources in the left panel will be used for interpolation, with the higher-ranked sources taking priority.

For and point in the quality mesh that must be interpolated, the first elevation source is queried first. If it can produce a value, this value will be used right away, just as in Basic mode.

If an elevation source cannot produce a value, the elevation source below it will be queried instead, until one manages to produce a value, or the entire list is exhausted.

This allows for multi-source interpolation, e.g. an elevation mesh for the river itself, a fine-grid DEM for its immediate surroundings and a coarser DEM for floodplains further away.

Output Formats

BASEMENT 2.8 only uses node elevation data, whereas BASEMENT 3 only uses element face elevation for its simulation.

The 'Output mesh format' drop down list may be used to select either or both elevation sources.

Note that due to the node and element elevation being independent, the 'BASEMENT 2 and 3 (node and element elevation)' setting will have roughly twice the execution time as either setting on its own.

The mesh generated by the interpolation utility is now ready for use in BASEMENT, no additional exporting steps are necessary.

Metadata

Release files for BASEmesh 2.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for BASEmesh 2.3.1
File Size Uploaded
basemesh-2.3.1.tar.gz 408.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for BASEmesh 2.3.1
File
basemesh-2.3.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
basemesh-2.3.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.5+ x86-64 Details
basemesh-2.3.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
basemesh-2.3.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.5+ x86-64 Details
basemesh-2.3.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
basemesh-2.3.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64, Linux glibc 2.5+ x86-64 Details
basemesh-2.3.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
basemesh-2.3.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.5+ x86-64 Details
basemesh-2.3.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
basemesh-2.3.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64, Linux glibc 2.5+ x86-64 Details
basemesh-2.3.1-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
basemesh-2.3.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.5+ x86-64, Linux glibc 2.28+ x86-64 Details

Total release size: 5.7 MB

Release files / basemesh-2.3.1.tar.gz

Download URL basemesh-2.3.1.tar.gz
Size 408.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2ba9580dbb0d2f0829de3f5a367ed05b414ac66905083fecdde850e1b9eb234b
BLAKE2b-256 checksum
How to use checksums
6482398b7544465b45cbf102984256b9a8857ee960093bbe77b67a5034adfd54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / basemesh-2.3.1-cp314-cp314-win_amd64.whl

Download URL basemesh-2.3.1-cp314-cp314-win_amd64.whl
Size 444.2 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
00aafa8fb4a69c53913cec23421e4049729617487b3c013a0d35d75eccd3bbd7
BLAKE2b-256 checksum
How to use checksums
6a40564ca5ef6eefed112a52f565f884c8955c25a220725ccafd4b9f44d454dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / basemesh-2.3.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL basemesh-2.3.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 446.1 kB
Tags CPython 3.14 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
f19b0c40222e5fef412dfb00ea061703bfdcb77ea04455d44ac524822ec0159b
BLAKE2b-256 checksum
How to use checksums
ca8922b750400d6d38cccf490322b11c998ed1698ed67ab7979e6977a1741047
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / basemesh-2.3.1-cp313-cp313-win_amd64.whl

Download URL basemesh-2.3.1-cp313-cp313-win_amd64.whl
Size 437.7 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
c432988b4ebb5ec00edcd493722bbd04cb320110531c898516e3e2dc5d4791d6
BLAKE2b-256 checksum
How to use checksums
ca9c9141b8be766d279394b2026a2c167428022530079c3ec925fe6c81f8c44d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / basemesh-2.3.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL basemesh-2.3.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 446.0 kB
Tags CPython 3.13 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
c0c5b8c1ab60e5005368fb06087c8db20932927333a191c6e6bebeed9f071165
BLAKE2b-256 checksum
How to use checksums
79a343a7788464120b5fd2fb347fb5af2b68b39ec65c2f3265e7ded8de710c4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / basemesh-2.3.1-cp312-cp312-win_amd64.whl

Download URL basemesh-2.3.1-cp312-cp312-win_amd64.whl
Size 437.7 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
ae7b999898846bcfbdc0696c7c27958326a40c2cfe5f164d94b7f954ebc23dd1
BLAKE2b-256 checksum
How to use checksums
ab922702d8c866a8107996052b62622f1b2bb500040afc331738faa83f7eacbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / basemesh-2.3.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL basemesh-2.3.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 446.0 kB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
c8e0dc891d8c81298443b302bfb3b2036794afc263bbaa387d29ae4ce4373e50
BLAKE2b-256 checksum
How to use checksums
aa8d0d4a136a1b7aa787b2801f47e701c38e0f98c680ce9bb93d3eda4b9b490f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / basemesh-2.3.1-cp311-cp311-win_amd64.whl

Download URL basemesh-2.3.1-cp311-cp311-win_amd64.whl
Size 437.7 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
59f2434530242f823b21cc6bdc238f73183fac777da71c7de4750fc015a07ffe
BLAKE2b-256 checksum
How to use checksums
31dada522a03d2322f7695cb343b91922d3d7a4d26025f378fff392647e44ca4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / basemesh-2.3.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL basemesh-2.3.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 445.8 kB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
3841268814b5dac6321148752f9df7658331aeacc9050e4aecf714187078e243
BLAKE2b-256 checksum
How to use checksums
469bc7cd64828d367e262d613a16c0032ba11af88f4596d0ae62b09872b6e257
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / basemesh-2.3.1-cp310-cp310-win_amd64.whl

Download URL basemesh-2.3.1-cp310-cp310-win_amd64.whl
Size 437.7 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
62339da3f12c3c8d562236557fe581aed22f543ee14a7606f0cf339ff0ab006a
BLAKE2b-256 checksum
How to use checksums
be4477dc9ba301b899dca893cd414ddcbceae11c0c71f4883d7a2823ec17853a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / basemesh-2.3.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL basemesh-2.3.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 445.7 kB
Tags CPython 3.10 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
86b4c55aacb63e56e77c3aa4fe8a5623f0c02e279266a6954664c426afb34357
BLAKE2b-256 checksum
How to use checksums
3c566b82a968a07a9436db38369a0a931dc0cfff86415502c35af2fa86d379ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / basemesh-2.3.1-cp39-cp39-win_amd64.whl

Download URL basemesh-2.3.1-cp39-cp39-win_amd64.whl
Size 437.7 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
618a3fcff5d114eefa8840c1c4d89ea095c8b4f938354fdd054d632de32dfdf1
BLAKE2b-256 checksum
How to use checksums
84c2a1e5fb178f690c3003d4bd0a6280e26e8ec9b56776684c7d58d77a3601b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / basemesh-2.3.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL basemesh-2.3.1-cp39-cp39-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 445.5 kB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
43d9c07fdeb6e0ae0ed4c59b9ab81ac84d1bb38da2e4ab9c34592752536220db
BLAKE2b-256 checksum
How to use checksums
06dc996add35f1b84f03f7618f5053c6bfb81b266ae02983a651a6900b8fa2fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

2.3.1 This release

13 release files

2.3.0

13 release files

2.2.1

7 release files

2.2.0

4 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

3 release files

2.0.2

3 release files

2.0.1

3 release files

2.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page