Chapter 2 ....continued
Running the Digital Elevation Model

Section 2.3


2.3

Building parameter files using Topog_Demgen

Before running Splin2h and Grdcon you will need to build parameter files for each of these applications. An .spl file needs to be built for Splin2h, and a .gcn file needs to be built for Grdcon. General guide-lines on building these parameter files via Topog_Demgen are detailed below.


2.3.1 Building the .spl file

To build a .spl file for Splin2h, select the .spl file option in the scroll-down menu under the build function button. This option can also be used to edit an existing .spl file. When this option is selected a small build window will appear as shown in Figure 2.2. This build window has three essential parts, these being:

an image goes in here
Figure 2.2:The .spl build window


2.3.1.1 The build window function buttons

The build window function buttons are used to save settings entered in the build window and to seek help on or quit the build function. Before running Splin2h make sure you save the current settings by pressing the save button.


2.3.1.2 The build window data fields

There are 11 data fields and these are described below:

  1. Drainage enforcement
    Depress the button and select one of four available options in the scroll-down menu. This option allows the user to eliminate or preserve sinks in the elevation data set (an innovative feature of Splin2h). Selecting any of the yes options will eliminate sinks using tolerance criteria specified in the Sink Tolerances data field. The default option (yes, no sink diagnostics) is recommended.

  2. Elevation data
    Depress the button and select one of two available options in the scroll-down menu. Specify whether your input data is mainly spot heights (.xyz file) or contours (.cns file). This effects how Splin2h interprets your input data.

  3. Elevation maxima
    Depress the button and select one of two available options in the scroll-down menu. Specify whether you require elevation maxima to be anywhere or on grid points only. The default option (anywhere) is recommended.

  4. RMS error
    Place the cursor in this field, click the mouse, then enter a value. Specify the Residual Mean Square error value. This value sets how much interpolated elevations are permitted to differ from known elevations. Use values of 0.0 to 0.2 for data that is principally well chosen spot heights, and up to 10% of contour interval if data are mostly poor quality contours.

  5. Derivative tradeoff
    Place the cursor in this field, click the mouse, then enter a value. Specify the Derivative tradeoff value. This value sets the degree of smoothing in the gridded elevation set. Use values of 0.0 - 0.1 for a high degree of smoothing, and a value of 0.5 for well chosen spot height data and a minimum of smoothing.

  6. Sink tolerances
    Place the cursor in this field, click the mouse, then enter three values, each separated by a space. These values are used as criteria to eliminate sinks and are only relevant if the drainage enforcement option is set to YES. Elevation differences less than the sink tolerance value are not considered significant and are removed if they impede drainage. The first tolerance value must be more than 4 times the RMS value. The second tolerance value must be greater than twice the first value. The third tolerance value must be greater than twice the second value. With contour data, set the first tolerance value to about 1/2 the contour interval.

  7. Number of iterations
    Place the cursor in this field, click the mouse, then enter a value, specifying the number of iterations. The default value (25) is recommended.

  8. X min and max
    Place the cursor in this field, click the mouse, then enter two values. Specify the minimum and maximum x values (in metres) of the elevation set to be gridded. Ensure that the grid spacing value (item 11 below) divides into the x data range.

  9. Y min and max
    Place the cursor in this field, click the mouse, then enter two values. Specify the minimum and maximum y values (in metres) of the elevation set to be gridded. Ensure that the grid spacing value (item 11 below) divides into the y data range.

  10. Z min and max
    Place the cursor in this field, click the mouse, then enter two values. Specify the minimum and maximum z values (in metres) of the elevation set to be gridded. Spot data outside this range are ignored. Contour data outside this range cause Splin2H to stop with an error.

  11. Grid spacing
    Place the cursor in this field, click the mouse, then enter a value. Specify the Grid spacing value. This is the distance (in metres) between points in the fitted elevation grid. Ensure that the grid spacing value divides into the x and y data ranges (items 8 and 9 above). The smaller the spacing the better the resolution of the grid. But beware, fine grids take longer to compute. A grid of about 500 x 500 points is recommended as an upper limit.


2.3.1.3 The build window input files fields

The input files field (Figure 2.3) is nested within in the build window. The input files field is used to input the name and format of each of the input files to Splin2h.

You can make the input files field appear by pressing the Input Files button. When this is selected a new window will appear. It consists of two main parts, these being the file name area and the file format area.

an image goes in here
Figure 2.3:The .spl input files field

If you are building an .spl file for the first time, the steps to follow are:

  1. Place the cursor in the field labelled ' Selection', click the mouse, then enter the name of an input file.

  2. Press the apply function button beneath this field. That file name will now appear in the field labelled File Names. Now, select this file by clicking on it and pressing the select function button.

  3. Now enter the file type, header format and data format for this file in the fields below. Press the help function button for explanations of the file type and various file formats.

  4. When the file type, header format and data format fields are filled, press the OK function button. The input files field will disappear, returning you to the main build window.

Sometimes only one file is used (such as contours or a set of x,y,z triplets), though mixtures of contours and points are permissible. With both types of data it is highly advisable to input stream line data as well, since this dramatically improves the performance of Splin2h. If you want to input more than one file, repeat the steps outlined above. If you want to delete an input file, select it from the field labelled File Names using the mouse, then press the del function button.


2.3.2 Building the .gcn file

To build a .gcn file for Grdcon, select the .gcn file option in the scroll-down menu under the build function button. This option can also be used to edit an existing .gcn file. When this option is selected a small build window (Figure 2.4) will appear. This build window has two essential parts, these being:

an image goes in here
Figure 2.4:The .gcn file build window


2.3.2.1 The build window function buttons

The function buttons are used to save settings entered in the build window and to seek help on or quit the build function. Before running Grdcon make sure you save the current settings by pressing the save button.


2.3.2.2 The build window data fields

Before Topog_Demgen displays the build window for the .gcn file, it reads the .spl file (if one exists) in order to provide intelligent defaults for some of the input lines. You will note that in most instances you can supply the default values detected from the .spl file. There are nine data fields and these are described below.

  1. Low and high contours
    Place the cursor in this field, click the mouse, then enter two values separated by a space. Specify the desired lowest and highest contour elevations (in metres). Ensure that the contour interval (item 2 below) divides evenly into the contour range adopted. Also ensure that your .grd file spans these elevation ranges, else an error will be reported when you run Grdcon.

  2. Contour interval
    Place the cursor in this field, click the mouse, then enter a value. Specify the desired contour interval (in metres). Ensure that the contour interval is divisible into the contour range adopted in item 1 above. The maximum number of contours allowed in a Grdcon run is 200, so adjust your contour range and interval to fit within this.

  3. Special value option
    Depress the button and select one of two available options in the scroll-down menu. Specify whether your input data (the .grd file) is clipped or unclipped. The .grd file is considered clipped if a polygon was used in the previous Splin2h run to truncate the elevation grid.

  4. X min and max
    Place the cursor in this field, click the mouse, then enter two values. Specify the minimum and maximum x values (in metres) of the elevation set to be contoured. Ensure that the range specified does not lie outside the range of the .grd file.

  5. Y min and max
    Place the cursor in this field, click the mouse, then enter two values. Specify the minimum and maximum y values (in metres) of the elevation set to be contoured. Ensure that the range specified does not lie outside the range of the .grd file.

  6. X grid resolution
    Place the cursor in this field, click the mouse, then enter a value. This is the spacing between grid points in the x dimension (ie. along columns). If you use the same value that was used in the Splin2h run (the recommended option) then no new interpolation of gridded values is carried out.

  7. Y grid resolution
    Place the cursor in this field, click the mouse, then enter a value. This is the spacing between grid points in the y dimension (ie. along rows). If you use the same value that was used in the Splin2h run (the recommended option) then no new interpolation of gridded values is carried out.

  8. Contour point spacing divisor
    Place the cursor in this field, click the mouse, then enter a value. The contour point spacing divisor value is used to adjust the number of points allocated to each contour string. It is related to the x and y data range as specified in the .sys file. If the larger of the ranges is 2000 m and the user adopts the default contour point spacing divisor of 400, then a point will be placed nominally at every 5 m along the contour. The computation is performed as follows:

    
          2000  /  400   =  5   
        |_______|  |___|   |_|
           /	 |	 \
          /	         |	  \
    data range (m)   |	contour point 
                	 |	 spacing (m)
    		 |
          contour point spacing divisor
    
    

    The smaller the value of the contour spacing divisor, the greater the number of points allocated to each contour.

  9. Minimum contour length
    Place the cursor in this field, click the mouse, then enter a value. The minimum contour length value is used to specify the minimum nunber of points per contour, thus enabling the user to discard small contour segments that often arise as artifacts from the DEM interpolation. We recommend that you delete any contour segment consisting of less than 10 points.
Take me out of frames Chapter 2 continued.......

last modified on 15 June 1997