v.trimesh
This module generates a triangular mesh through the use of Jonathan Shewchuk's Triangle library. The module reads areal constraints (maximum areas for triangles in a given area) from the vector attribute table and writes the triangular mesh with two tables on two layers: layer one corresponds to nodal properties, while layer two corresponds to areal attributes. These tables can be used to sample raster surfaces for nodal/areal properties. Currently, it only supports forty different areas (for some strange reason, it does not work for more)
This module is intended to be used for pre-processing data for finite element models, such as the Integrated Hydrology Model (InHM). More links will be added soon in order to export both nodal and areal attributes
Running v.trimesh
To run this module, vector map of area type (e.g. boundaries with centroids) is needed. If no area constraints are needed, the -a switch is used; however, an attribute table for the vector map is required. You might want to explore if the non-restricted triangles are too large for a given case. Another option is to use a uniform area value for the modelling domain (by using only the eternal boundaries)
The vector map shows the boundaries and the centroids that will be used to create the mesh. For reference, the grid is shown at every 250 meters.
It is highly recommended to use v.clean on the input vector map in order to remove nodes that are too close to each other, and/or small areas as well
No areal constraints
v.trimesh -a input=cleanvector column=cat output=trimesh_noarea
The left figure shows that the boundaries are used as part of the triangulation. The size of the triangles might be fine for some cases, but an areal restriction can be used.
Areal constraints
v.trimesh input=cleanvector column=maxarea output=trimesh_maxarea
This figure shows, in red, the boundaries used to generate the mesh. A maximum area of 200 square meters was used for the small triangles, while a maximum of 500 square meters was assignaed for the large ones
A closer look to the mesh
Output
The mesh is comprised of triangular areas, which are comprised of three boundaries, three nodes and one centroid. The module generates a nodal table in layer one, and a centroid table (for areal properties) in layer two.Download
The v.trimesh module is available hereLast updated: April 2008




