Caution: This format may be discontinued. Do not build any interface to external systems on the TriGrid DIGIT format. The preferred input for new datasets is via the NODE format, which is the only format that digit files can be used to generate, and which contains all the information contained in digit files except the open/close boundary alternations, and in addition can contain boundaries with non-constant depths along their length, useful for fjoord like coastlines.
This file format is the most difficult to understand. It is the only TriGrid file format that contains no size attributes preceding the data. Digit files consist of a set of lines representing either boundaries or contours. Digit files are used as input to the Sampler program, which supports subsampling of the digitized files.
The Digit file format is an historical format, closely matched to the output of a particular digitizing system. This imposes several constraints:
Each boundary or contour may be divided into segments, which will be treated as contiguous by the Sampler program.
For both boundary and contour files:
line 1
line 2
line N
[EOF]
where each line contains
segment 1
and optionally
segment 2
segment 3
segment 2N
Segment 1 is
line_num depth
x(1) y(1)
x(2) y(2)
x(N) y(N)
N+1 -9999
Segments 2 to 2N are each
88 88.0
x(1) y(1)
x(2) y(2)
x(N) y(N)
N+1 -9999
(Notice that this means that a boundary number 88 must not have a depth of 88.0).
For a boundary file, each boundary is represented by one line. The first segment of each boundary line is considered a digitized coastline. If there is a second segment, it is a water (open) boundary. Each subsequent segment in the boundary is part of an alternating sequence of coastlines and water boundary.
For contour files, the contour numbers must be distinct from the contour numbers used in the accompanying boundary file.
This file has two boundaries. The outer boundary has several segments of digitized coastline, and several of digitized open water boundaries. The inner boundary is a single segment of digitized coastline.
1 0.00 !start of first boundary, depth 0.00 1.570 13.470 !x, y for point 1 1.560 13.450 !x, y for point 2 1.540 13.440 1.530 13.420 1.520 13.400 . . . 3.760 0.430 3.750 0.410 3.760 0.390 3.760 0.390 !x, y for point 777 778 -9999 !end of block, which had 777 points 88 88.00 ! start of 1st boundary, 2nd block, open 3.750 0.370 !x, y for first open boundary point 3.770 0.370 3.790 0.370 . . . 9.710 3.100 9.700 3.120 9.690 3.140 9.690 3.160 9.690 3.160 380 -9999 !379 points in 2nd boundary block - end 88 88.00 !start of 1st boundayr, 3rd block, closed 9.670 3.140 9.660 3.160 9.650 3.180 . . . 1.620 13.470 1.600 13.470 1.580 13.470 1.570 13.470 199 -9999 !end of 1st boundary, nth block 2 0.00 !start of 2nd boundary, depth 0.00 4.190 7.970 4.190 7.950 4.210 7.940 4.220 7.920 . . . 4.120 8.030 4.140 8.020 4.150 8.000 4.170 7.990 4.170 7.990 489 -9999 !end of 2nd boundayr, 488 points
This file has a set of 24 contours. For some depths, there is more than one contour.
101 5.00 !first contour number, depth 4.290 0.610 !x(1) y(1) 4.260 0.660 !x(2) y(2) 4.240 0.710 4.230 0.760 4.220 0.810 4.220 0.860 4.210 0.910 4.190 0.960 4.170 1.010 4.150 1.060 . . . 3.890 3.510 3.890 3.560 3.890 3.610 3.900 3.660 3.900 3.690 64 -9999 !end of line 101, which has 63 points 102 10.00 !start of line 102, depth 10.0 4.800 0.560 4.800 0.610 4.790 0.660 4.780 0.710 . . . 1.920 13.110 1.910 13.160 1.910 13.170 282 -9999 !end of line 102, which has 281 points 103 20.00 !start of line 103, depth 20.0 6.420 0.860 6.400 0.910 6.370 0.960 . . . 3.160 10.220 3.210 10.250 3.220 10.270 15 -9999 !end of line 123, 14 points 124 20.00 !start of line 124, depth 20.0 2.920 11.360 2.870 11.360 2.820 11.350 . . . 3.020 10.940 3.020 10.990 3.020 11.030 56 -9999 !end of line 124, 55 points