TIN to TIN

From Tuflow
Jump to: navigation, search

Introduction

tin_to_tin.exe converts SMS and 12D triangulations to SMS, 12D and Vertical Mapper formats. It is very useful for transferring TINs from one package to another so as to utilise the various features offered by these different software, and takes a fraction of the time to convert 12D TINs as compared to the original tin_to_tri.exe program.

Method

Save TIN in appropriate format

First save the TIN you wish to convert in the software’s native text format as follows:

  • For SMS, ensure you are in either the Mesh or Scatter module (depending on which one you wish to save), go to File, Save As… and select under Save as Type: the format “TIN Files (*.tin)”. Provide a filename and export the file in the SMS .tin file format. If you have both Scatter and Mesh module data, you’ll be prompted for which one you wish to export.
  • For 12D, export the TIN in the .12da format.

Run Tin_to_tin.exe

Next run tin_to_tin.exe from a batch (.bat file) or set up for your right mouse button. The type of TIN you wish to convert to must be specified using one of the following options as the first argument:

  • -sms (or -tin) to convert to a SMS .tin file
  • -12d (or -12da) to convert to a 12D .12da TIN file
  • -vm (or -tri) to convert to a Vertical Mapper .tri file

The filename of the TIN being converted is the next argument. If the filename/path has any spaces, it must be enclosed in quotes. For example:
tin_to_tin.exe -sms “My DTM.12da”
will convert the SMS TIN “My DTM.12da” to a 12D .12da TIN. The created .tin file will be named “My DTM.tin”.

Open created TIN

To import the created TIN:

  • For SMS, simply drag and drop the created .tin file from Windows Explorer onto SMS. Alternatively, use File Open… checking first that either the Scatter or Mesh Module is activated.
  • For 12D, please see your 12D operator!
  • For Vertical Mapper, go to Vertical Mapper, Create Grid, Interpolation…, Triangulation with smoothing, Next >>, Open .tri file…, and select the .tri file created by tin_to_tin.exe. Select Linear solution, choose an appropriate cell size and filename for the Vertical Mapper grid and click Finish.

Additional Options

Additional options are:

  • -b: Specify a -b as one of the arguments to suppress the “Press Enter” request when the program finishes. This is useful if batching a series of conversions.
  • -mif: In addition to the -sms, -12d or -tri flag, specify a -mif to also create .mif/.mid layers of the triangulation and points. Two layers are created, one for the triangles (_T.mif) and one the points (_P.mif). These could be useful for cross-checking the data and for report figures.

Notes

  • The extension of the input TIN file determines the format, so do not change the file extension.

Tips

  • In SMS, the Mesh module offers some useful options for editing TINs that the Scatter module doesn’t. These include moving points (check that Nodes, Locked is not ticked), more options in terms of entering elevations, and inserting breaklines (using Nodestrings). Both modules offer the useful option of swapping triangle edges to improve the triangulation.
  • To setup a right click functionality in Windows 7 or Windows XP the FileMenu Tools utility can be used. Please see the methodology outlined in this page: Running TUFLOW from Right Click in Windows 7. The following changes to the method are necessary:
  1. Change the Menu Text, for example "Convert .12da to .tin"
  2. Associate the utility with the .12da or .tin file types
  3. Under Program Properties set the Program to the full path to the TUFLOW utility on your system, in the case the tin_to_tin.exe
  4. Under Program Properties set the Arguments field to be the output type followed by %FILENAMES%. For example your argument line may appear as:
"-sms" %FILENAMES%

If this was associated with .12da file types, this utility could be used to convert a .12da TIN to a SMS .tin file format. By right-clicking on the .12da file, and selecting File Menu Tools >> "Convert .12da to .tin".

Up
Go-up.png Back to TUFLOW Utilities