Skip to content

dem2tin Usage

ricardcd edited this page Nov 28, 2018 · 1 revision

dem2tin

In order to test the different properties of the methods developed to create Triangulated Irregular Networks (TIN), we provide the dem2tin tool.

This app only runs the TIN creation step (i.e, no tiles structure is created) and its output is an OFF file containing the resulting triangle mesh.

If you run the app with -h option, you will see that most of the parameters are the same as in qm_tiler, so we refer the reader to the corresponding pages on the qm_tiler tutorial:

In this case, we do not limit the input to be a GDAL raster format. By defining the proper type with the --input-type parameter, we can input a:

  • A point set in a text file, containing in each line the three coordinates of each point.
  • A TIN in an OFF file.

Note that, as opposed to the GDAL format, we do not require any regularity/grid on the input point sets or TINs. However, we do assume that the input points or vertices are projectable in the XY plane. Moreover, we assume the points/vertices in the input point set/TIN to be in metric coordinates.

The only limitation, due to the way we compute conversions between SRS when computing the TINs, is that point set simplification algorithms are not available for GDAL inputs in dem2tin.

In addition to these new types of input, we have the --reset-origin and --export-new-origin parameters. Since the output surface is stored in an OFF file, having the mesh in the original coordinates may result in problems when trying to visualize the TIN in common 3D viewers, such as Meshlab. For this reason, we allow the user to reset the origin of the data to the minimum coordinates of its bounding box using the --reset-origin, and to store this new origin to a file using --export-new-origin.