The string files are free format ASCII text files which use commas "," as delimiters between fields in a record. With the exclusion of the 2 header records and the end of file record, each record represents a point.
Since the file is comma delimited free format, the number of spaces between fields is unimportant. Spaces only have significance in the text data which may be found in the description fields.
A sample of a string file is shown below with a detailed description of the various aspects of the string following.
smp , 8-Feb-94, ,Sample string file,
|
smp , 8-Feb-94, ,Sample string file,
Field | Description |
Location | Contains the location of the file. This field does not necessarily have to contain any data. If it is blank it will have no impact on processing the string file |
Date | Contains the date on which the file was last modified. This field does not necessarily have to contain any data. If it is blank it will have no impact on processing the string file |
Purpose | Contains a description of the contents of the file. This field is often modified by various string file processing functions to indicate the functions which have been applied to the file. The field does not necessarily have to contain any data. If it is blank it will have no impact on processing the string file. |
Memo file | This field is not used at present. |
0, 6740.000, 2440.000, 152.541, 6830.000, 2440.000, 152.541
Field | Description |
string | Always zero for the axis record |
y1 | Y coordinate for the start of the axis record |
x1 | X coordinate for the start of the axis record |
z1 | Z coordinate for the start of the axis record |
y2 | Y coordinate for the end of the axis record |
x2 | X coordinate for the end of the axis record |
z2 | Z coordinate for the end of the axis record |
1, 6755.850, 2420.000, 155.398, point2, second description field,third
Field | Description |
string | The string number. Any valid number between 1 and 32000 |
Y | Y coordinate of the point |
X | X coordinate of the point |
Z | Z coordinate of the point |
D1 | The first point description field |
D2 | The second point description field |
D3 | The third point description field |
. | . |
D100 | The one hundredth point description field |
The end of file record is similar to the null record with the exception that "END" is in the description field. No data will be read from the file after the end of file record.
0, 0.000, 0.000, 0.000, <---null record
The .dtm file by itself is of no use. It must have a corresponding string file in which the coordinates of the points are defined. Below are a string file and a DTM file which together describe an extremely simple model. The pertinent features of each are also described. The files are box1.str and box1.dtm.
The contents of the string file have already been described above and so there is no need to explain them again. Note however that the DTM file references the string file in two ways.
box ,23-Feb-94, ,
|
The first place the string file is referenced is in the header record. This tells the system the name of the string file to use when a DTM file is processed.
box1.str,0680000000;algorithm=standard;fields=x,y
|
The DTM file consists of a number of distinct parts, some of which must exist and some of which are optional. These are described diagrammatically below and then in more detail further on.
DTM file header record
The DTM file header record consists of a number of fields only one of which must exist.
string file, checksum
Field | Description |
string file | The name of the string file to which is required by the DTM to obtain the coordinates of the triangle vertices. If the string file does not exist then the DTM file is useless. |
checksum |
The checksum field consists of a number of parts. The checksum is used as a method of ensuring the validity of the string file DTM file relationship. If for example a DTM is created and then some time later some points are removed or changed in the string file then the DTM file is no longer valid. The checksum provides a method to ensure that if this circumstance occurs then a warning message will be displayed and the DTM file will not be processed. The checksum need not be present and if you intend to import DTM data from some other source using your own data conversion program then you should not include the checksum. The checksum value "0680000000" is computed from the coordinates which are stored in the string file at the time the string file is saved. During later processing, the checksum value is recomputed and compared to the value from the DTM file header record. If a difference is found then the string file is considered to be inconsistent with the DTM file and processing cannot continue. The checksum algorithm "algorithm=standard" defines the method to be used for computing the checksum algorithm. At present "standard" is the only permissible value. The checksum fields "fields=x,y" define the fields of the string file which will be used in the computation of the checksum value. |
These optional values are assigned by various processing modules and if you plan to convert data from some other source to a DTM file then leave the optional data blank.
Field | Description |
triangle | The triangle number. Note that triangle numbers always start at one in each trisolation. |
vertex1 vertex2 vertex3 |
The point numbers (from the string file) which form the 3 vertices of the triangle. |
neighbour1 neighbour2 neighbour3 |
The triangle numbers in the trisolation which are neighbours of this triangle. If a triangle has no neighbour on a side then the value of the neighbouring triangle is zero. There is a special relationship between the triangle vertices and the triangle neighbours, see below. |
neighbour1 is the triangle number opposite vertex 3
neighbour2 is the triangle number opposite vertex 1