Define Strata¶
Surfaces (strata) can be represented with elevations in a fixed XY-grid.

Many different interpolation methods for calculating a grid from elevation data are described in the literature. Gemini Terrain has developed its own methods for different types of elevation data (contour lines, triangular networks, and point clouds) in a gmi-layer.

We gain access to these methods when we define a stratum for the application layer. We can have many different strata in a drawing, typically when we have multiple layers in the ground such as soil and rock. In the vertical list field, we get an illustrative icon for each application layer that defines a stratum.

Stratum settings can be found in the Strata tab in the properties dialog for application layers, or by left-clicking on the application layer in the first column where the stratum symbol is displayed.
Calculation Methods for Strata¶
Although a grid is generated by the program, the original data is always used. Users can specify a higher resolution for the grid at any time.
The process for generating a grid from contour lines is best illustrated with an example.
Contour Lines¶
A simple map with contour lines might look like this:

While the program draws the contour lines, it will calculate intersection points with vertical planes normal to the X- or Y-axis at given intervals. Grid density can be set by the user. The intersection points are stored with X-, Y-, and Z-coordinates in memory in a table for each vertical plane.
After the drawing of the entire map is completed, the intersection points for each such vertical plane will be sorted by distance from the origin. Then the intersection points in each plane can be drawn as a terrain profile, and the image might look as shown here:

After this sorting is completed, the system will go through the vertical planes one by one and interpolate values at the specified grid points. Afterwards, the model might look something like this:

However, this model will reproduce the terrain very inaccurately. The main lack of accuracy occurs because the system only looks at one vertical plane at a time, without considering neighboring planes. In this way, an unfortunate "terrace effect" will occur in the direction normal to the vertical planes.
Warning
Study this in the illustration above. Another problem is that unwanted effects occur along the edges of the area that run parallel to the vertical planes.
The model is therefore smoothed by setting up vertical planes in the opposite direction as well. We will hereafter call the first planes the main planes and the other planes the cross planes.

The intersection points with the cross planes will be inserted into the tables for the main planes according to specific rules before they are sorted and interpolated. This will improve the accuracy of the terrain model considerably, especially when there are few contour lines in the database. We will particularly notice the improvement along the edges of the area that are parallel to the main planes.

Digitizing more contour lines will provide an even better terrain model. This will involve more work, but is still recommended in areas where the terrain is very rugged.
Triangular Networks¶
For triangular networks, the process is the same, but the smoothing steps are omitted. Smoothing is unnecessary since grid elevations are retrieved exactly from the triangular network, and the result is the same regardless of which direction we go with the vertical planes.
Point Clouds¶
For point clouds, the vertical planes do not find direct intersection with original data as with contour lines and triangular networks. With this method, the program uses a weighted average of all points within the selected grid size. These points are weighted by 1 divided by the square of the distance.

Figure caption: A = Grid size (dotted), B = Vertical planes, C = Original points, D = Calculated grid point
Handling Gaps in Data¶
Areas with gaps, that is, areas where the program does not find points within the grid size, must be treated specially. A gap can have varying size from one to many grid points without calculated elevation.

Figure caption: A = Gap
In the figure above, we see an example where one grid point has not received a calculated elevation. The program then runs vertical planes in both directions. For each plane, the elevation is interpolated, and the final value becomes the average of these two values.
Note
It is the elevations in the grid that are used in the interpolation.
In earlier versions of the program, it worked poorly to choose grid density less than average point density, resulting in empty rows or columns in the terrain grid. Normally, one should not choose grid density less than the average density in the point cloud, but the program will handle it.
For each grid cell that lacks elevation, neighboring cells are examined. The program goes iteratively outward until an elevation is found or a maximum of 5 meters outside the cell of interest. We then normally do not get completely empty rows or columns in the terrain grid, by finding point elevations closer than 5 meters to a cell.