.
Tutorial
.
.
This tutorial describes step by step how to work with the program SurGe. It is assumed, in this tutorial, that you have installed the last version of SurGe including the SurGe Project Manager.
Content
How to read and display simple input data
The program SurGe.exe needs basic input data in an ASCII file containing
point coordinates XYZ. Other input data (boundaries, faults, spatial polylines,
...) are optional. The basic input data must contain at least two different
XYZ points with different z-coordinates.
In this section we will use the file EX1.DTA, which is stored in the directory
EXAMPLES. The file is identical with the following list:
# Input data - example 1
608.400 116.800 209.356 LB01
29.800 23.300 196.790 LB02
190.500 166.600 203.735 LB03
358.000 538.500 224.650 LB04
487.800 449.400 205.038 LB05
961.800 480.800 200.520 LB06
137.900 396.500 217.890 LB07
545.836 248.764 208.320 LB08
741.158 11.243 224.570 LB09
424.061 306.638 198.340 LB10
902.721 58.265 208.030 LB11
655.554 570.684 201.530 LB12
806.266 592.387 200.520 LB13
774.918 351.248 254.650 LB14
369.805 213.799 198.060 LB15
305.903 117.344 197.340 LB16
216.682 57.059 196.930 LB17
501.464 356.237 199.570 LB18
765.102 118.346 209.050 LB19
695.073 148.211 209.050 LB20
646.671 206.911 209.050 LB21
869.115 142.032 209.050 LB22
948.412 217.210 209.050 LB23
401.570 263.552 198.230 LB24
577.672 409.789 200.440 LB25
641.522 445.833 200.070 LB26
235.767 606.487 245.370 LB27
46.277 532.339 200.310 LB28
482.927 602.368 250.360 LB29
160.589 282.089 230.980 LB30
Each row of the XYZ file contains data related to one point. The first three
items in each row of the XYZ file must contain x, y and z coordinates of
the point and the fourth item must be a label for the point - character
string containing 1-23 characters. Items in the row must be separated
by at least one space. If the character # is
in the first column of a row, the row is ignored and can be used as a comment.
The XYZ file is an ordinary ASCII file and can be edited with any ASCII
editor.
Important warning: Do not save the data file in unicode format. SurGe
cannot read unicode format!
To start the program SurGe.exe for input file EX1.DTA,
select the project Example 1 and the map The first example map
in the SurGe Project Manager and press Run SurGe button.
Immediately after the start SurGe.exe reads input file and displays points
XYZ in blue color. Now you can use two useful shortcut keys -
K, which displays z-coordinates of XYZ points and N,
which displays their labels. If you press Alt+S, points (and labels
and / or z-coordinates, if they are displayed) will be displayed in
colors indicating their z-values.
To move displayed objects (now only points) you can use cursor keys. If you
use cursor keys with key Ctrl, only moved points are displayed (without
labels and z-coordinates).
To zoom map, use key PgUp (zoom-in) or PgDn (zoom-out). Again,
you can use key Ctrl with these keys. Step of moving and zoom can
be changed with shortcut keys "1", "2", "3", "4"
or "5".
To have better orientation in the map, you can display a map mesh with labels
(by Ctrl+E) or without labels (by Ctrl+S).
Key R can be used for restoration of the basic display (without labels,
z-coordinates, isolines, map mesh, ...). Using Ctrl+R you can change
background color (which is by default black) between black and white.
How to create a surface
Let us suppose, you need to calculate a surface passing through points given
in file EX1.DTA. Start the program SURGEF.EXE using
the menu item Interpolation / Calculate grid (or press the shortcut
key F3). SURGEF.EXE is a console application written in FORTRAN. It
reads the parameter file PAR.3D, which is created by SurGe.exe. This file
contains information about the input data file name, interpolation parameters
and so on.
The program SURGEF needs to enter some information.
The default values (calculated internally by SURGEF) are enclosed in brackets
- if you agree with the default value, simply press Enter.
If there is a file EX1F.GRA (binary file containing previously computed grid),
SURGEF asks, if it has to be read:
READ FILE .GRD? (Y/N) [N]
This feature has a special application, which will be explained later. So
press Enter.
The next information to be entered is grid size in direction x; the program
SURGEF computes this size internally so that a precise interpolation can
be achieved:
GRID SIZE IN X-DIRECTION (MIN. 19) [100]:
Press Enter because this value is suitable for good interpolation. The next input corresponds to the grid size in direction y:
GRID SIZE IN Y-DIRECTION (MIN. 12) [ 64]:
You should not change this value, so press Enter.
The next query is:
GRID SIZE ENLARGEMENT [ 24]:
This value defines the number of grid rows and columns, which has to
overlap the interpolation area. The value 10-50 will improve the shape of
the surface at the border of the interpolation area. So leave the default
value and press Enter.
The last query is:
SMOOTHING [ 16]:
This value (specifying how many times smoothing has to be performed) are
estimated by SURGEF so that the resulting surface will be smooth enough.
Press Enter to accept the default value.
The program SURGEF computes the surface showing the iteration process of
interpolation, tensioning and smoothing. The process can be stopped by
Esc key - in this case the actual iteration step is completed before
the stop. If the computation is finished, the created surface is stored in
the binary file EX1F.GRA (as values of matrix elements) and you can press
Enter to finish SURGEF.
How to display a created
surface
As soon as the file EX1F.GRA exists, you can use functions for displaying the surface. The shortcut key C is used for displaying the raster color map. Shadowed relief display (key Alt+Q) improves 3D feel of raster color map. The key Alt+S displays the color scale with corresponding levels. To restore the original display (only points in this case), press the key R.
How to calculate and display isolines
Before displaying, isolines must first be calculated. Select the menu item Interpolation / Calculate isolines. The following dialog appears:
In this dialog you can set levels of the first and the last isoline, the
interval between isolines and divisor (isolines with level divisible by divisor
will be labelled). Then press the button OK. The calculated isolines
are stored in the file NAME.VRs, where
s is a suffix (see
[3]) and they are immediately displayed.
If you select a too small difference between isolines, calculation can last
several seconds. If the surface is later created with different interpolation
/ approximation parameters, you should recalculate isolines to correspond
to the actual surface.
Isolines stored in the file
NAME.VRs can be displayed by the shortcut
key I.
How to display 3D view of
surface
In the main menu select item Display / 3D view. The following dialog appears:
If the grid has too big size (for example more than 500 in the x-direction), the 3D display will be to too dense and maybe too slow. You can specify step of reading grid file (in our case the grid file is EX1F.GRA) greater than 1 to decrease size of displayed grid. As soon as the button OK is pressed, 3D view of the surface is displayed. SurGe switches into special mode with its own menu. Each item of menu corresponds to certain shortcut key - try all of them to rotate 3D view, to increase / decrease z-scale and so on (details are in the chapter 3D display the User's Manual). To return into move/zoom map mode, press Esc key.
How to change interpolation / approximation parameters
Quality of surface generated by the program SURGEF can be changed in dialog box invoked in main menu by Interpolation / Interpolation parameters:
The first parameter (Filter) is intended for reduction of input points, if number of points is very large and if there are points with small horizontal distance between them. Usage of the parameter Filter is explained in the next section of this chapter (see How to filter input data).
Parameter Smoothness enables to control smoothness of generated surface.
The larger value, the sharper interpolation is obtained. Typical values
are:
0.00 - 0.30 ... for smooth interpolation
0.40 - 0.60 ... for normal interpolation (default value is 0.50)
0.70 - 1.50 ... for sharp interpolation
Sharp / smooth model at local extremes can be improved by extending of the
smoothing parameter. Beginning from the version 5.50, the smoothing parameter
can have two formats:
1) number 0.00 - 9.99, which is equivalent to the above described
smoothing parameter
2) number 100.00 - 999.99, where the first two digits divided by 10
determine so called shape factor, which has influence on the shape
of surface in the surrounding of sharp local extremes. The smallest value
1.0 means, the shape will not be changed and any greater value (1.1-9.9)
means, the local extreme will be sharper. The remaining digits have the original
meaning.
Remark: If the smoothing parameter has the first format, the shape
factor has the default value 1.0.
Parameter Accuracy specifies, how accurate the generated surface has to be. It represents the percentage value from Zmax-Zmin, where Zmin is the minimal value and Zmax is the maximal value of all z-coordinates. If maximal difference between z-coordinates of points XYZ and generated surface is less than Accuracy·(Zmax-Zmin)/100, the process of interpolation / approximation is finished.
In fact, the parameter Enlargement is not a parameter affecting interpolation / approximation method. The value specifies number of grid rows and columns, which has to overlap interpolation area. By this way, the shape of the surface near to the grid boundary will be improved. The value of parameter Enlargement should be approximately set to (i1+j1)/10 (where i1 and j1 are dimensions of grid). If it is greater than 98, the program SURGEF computes it internally.
The parameter Linear tensioning enables to set the degree of linear
tensioning. It can have four values:
0 ... no linear tensioning
1 ... medium linear tensioning
3 ... strong linear tensioning
4 ... full linear tensioning
In most cases the number of iterations can be decreased by the transformation Pnew = A·Pold + B, where P is smoothed matrix (see User's Manual) and constants A and B minimize the term å(A·f(Xi,Yi)+ B - Zi)2. The resulting surface is somewhat smoother, but the number of iterations is decreased by cca 30%. The check button Faster convergence enables this feature.
Pre-defined parameters contains list
of interpolation / approximation modes and enables to set appropriate parameters
for selected mode. The modes and pre-defined parameters are:
Mode | Filter | Smoothness | Accuracy | Linear tensioning |
Trend Surface | 30 |
0.1 |
90 |
0 |
Smooth approximation | 200 |
0.2 |
20 |
0 |
Smooth interpolation | 500 |
0.2 |
1 |
1 |
Normal interpolation | 500 |
0.5 |
1 |
1 |
Sharp interpolation | 500 |
200.7 |
1 |
1 |
LES interpolation | 1000 |
-0.5 |
1 |
1 |
Digital model of terrain | 1000 |
200.7 |
1 |
3 |
Important note: The Trend surface and Smooth approximation set special multiplier for SMOOTHING parameter estimated by SURGEF. To deactivate this setting, select Normal interpolation.
How to obtain sharp
interpolation
To demonstrate sharp interpolation we will use the file EX1.DTA (select the
subproject Example 1 in the SurGe Project Manager and The
first example map). In the main menu select item Interpolation /
Interpolation parameters. Set the parameter Smoothness to 200.7
and the parameter Accuracy to value 0. Start SURGEF (see
[2]) and answer according to the following
table:
prompt of SURGEF | answer | |
READ FILE .GRD? (Y/N) [N] |
Enter | |
GRID SIZE IN X-DIRECTION (MIN. 22) [100]: |
150 | Enter |
GRID SIZE IN Y-DIRECTION (MIN. 14) [ 96]: | Enter | |
GRID SIZE ENLARGEMENT [ 30]: | Enter | |
SMOOTHING [ 36]: | Enter |
In 3D view you can see, the resulting surface is sharp in comparison with normal interpolation performed in chapter "Basic operations".
How to obtain smooth
interpolation
To demonstrate smooth interpolation we will use the file EX1.DTA (select
the subproject Example 1 in the SurGe Project Manager and The
first example map). In main menu select select item Interpolation
/ Interpolation parameters. Set the parameter Smoothness to 0.2
and the parameter Accuracy to value 0. Start SURGEF (see
[2]) and answer according to the following
table:
prompt of SURGEF | answer | |
READ FILE .GRD? (Y/N) [N] |
Enter | |
GRID SIZE IN X-DIRECTION (MIN. 22) [100]: |
150 | Enter |
GRID SIZE IN Y-DIRECTION (MIN. 14) [ 96]: | Enter | |
GRID SIZE ENLARGEMENT [30]: | Enter | |
SMOOTHING [ 36]: | Enter |
In 3D view you can see, the resulting surface is smooth in comparison with normal interpolation performed in chapter "Basic operations".
How to obtain smooth
approximation
To demonstrate smooth approximation we will use the file EX1.DTA (select
the subproject Example 1 in the SurGe Project Manager and The
first example map). In main menu select select item Interpolation
/ Interpolation parameters. Set the parameter Smoothness to 0.0,
the parameter Accuracy to value 40 and switch Faster convergence
on. Start SURGEF (see [2]) and answer according
to the following table:
prompt of SURGEF | answer | |
READ FILE .GRD? (Y/N) [N] |
Enter | |
GRID SIZE IN X-DIRECTION (MIN. 22) [100]: |
150 | Enter |
GRID SIZE IN Y-DIRECTION (MIN. 14) [ 96]: | Enter | |
GRID SIZE ENLARGEMENT [ 30]: | Enter | |
SMOOTHING [ 36]: | Enter |
In 3D view you can see, the resulting surface is very smooth (in comparison with normal interpolation performed in chapter "Basic operations") and it does not pass through the points exactly.
Trend surface can be obtained as a very smooth approximation. It is convenient
to select a small grid size (and later to double it once or more times, if
it is needed), because smoothing of large grids is not effective enough.
Small grid size can be set directly in
SURGEF (as an answer to the GRID SIZE IN X-DIRECTION) or via low
Filter value. It is also essential to set high precision (a safe value
is 90) to avoid iterations and to select a greater number of
SMOOTHING cycles.
For demonstration purposes we will use the file EX5.DTA (select the subproject
Example 5 in the SurGe Project Manager). The easiest way, how
to set appropriate parameters, is to select Trend surface in the
list of pre-defined parameters (see the
dialog box Interpolation parameters under the Interpolation
menu). Now we can run SURGEF and leave default values:
prompt of SURGEF | answer | |
READ FILE .GRD? (Y/N) [N] |
Enter | |
GRID SIZE IN X-DIRECTION (MIN. 22) [100]: |
Enter | |
GRID SIZE IN Y-DIRECTION (MIN. 29) [133]: | Enter | |
GRID SIZE ENLARGEMENT [ 29]: | Enter | |
SMOOTHING [ 650]: | Enter |
As you can see, the SMOOTHING parameter is very high - the appropriate
value should be 5-10 times higher than the grid
size. If you want a more even surface, decrease the grid size and increase
SMOOTHING. Try, for example, to set grid size to 60 and SMOOTHING to 5000.
Important note: The Trend surface and Smooth approximation
in the dialog box Interpolation parameters sets a special multiplier
for the SMOOTHING parameter estimated by SURGEF - that is why it is so high.
To deactivate this setting, select Normal interpolation; otherwise
smoothing will last a long time, if the grid size is great.
How to utilize trend surface for improving
extrapolation
Trend surfaces (see the previous section) can be used as a base for normal
interpolation. Because the process needs several steps and settings, it is
automated as described in the section
Interpolation with trend surface
in the User's Manual.
For demonstration we will use the same data file as in the previous section
- select the subproject Example 5 in the SurGe Project Manager,
run SurGe and in the Interpolation / Interpolation parameters /
Pre-defined parameters select Normal interpolation.
In the first step select Interpolation / Data analysis (see
the section Data analysis in the
User's Manual) to fix Target grid size. In our example we can
leave the default values.
In the second step select Interpolation / Interpolation with trend
surface and leave 1 in the following dialog box Preservation of
extrapolation trend. Now SurGe runs SURGEF twice (do not be surprised).
In the next picture you can see the resulting surface (on the right side)
in comparison with the surface obtained by normal interpolation (on the left
side). It is obvious, former has better grading in areas without points.
Try the same with Preservation of extrapolation trend 2 and 3.
How to interpolate terrain
data
If the input data represents measurement from some terrain, it is suitable
to use "strong" linear tensioning with a small number of smoothing (which
is close to the Triangulation with Linear Interpolation method). As
a rule, characteristic points of terrain are measured - this means that the
person performing such a measurement surveys only points where the slope
of terrain changes (tops, edges, valleys and so on). For interpretation of
such data, the Triangulation with Linear Interpolation method is usually
used, so the ABOS method is applicable as well.
To demonstrate this feature we will use the file EX3.DTA (select the subproject
Example 3 in the SurGe Project Manager). In main menu select
item Interpolation / Interpolation parameters. Set the parameter
Smoothness to 0.2, Linear tensioning to 3 and switch Faster
convergence on. Start SURGEF (see
[2]) and answer according to the following
table:
prompt of SURGEF | answer | |
READ FILE .GRD? (Y/N) [N] |
Enter | |
GRID SIZE IN X-DIRECTION (MIN.232) [460]: |
Enter | |
GRID SIZE IN Y-DIRECTION (MIN.251) [499]: | Enter | |
GRID SIZE ENLARGEMENT [ 60]: | Enter | |
SMOOTHING [ 79]: | 2 | Enter |
There is possibility to filter input data (points XYZ) using parameter Filter. Value of this parameter should be in the interval <3,9999> and has the following meaning: If the horizontal distance between two points [Xi,Yi,Zi] and [Xj,Yj,Zj] is greater than max{(x2-x1),(y2-y1)}/Filter, these two points are replaced by one point [Xk,Yk,Zk] with average coordinates Xk=(Xi+Xj)/2, Yk=(Yi+Yj)/2 and Zk=(Zi+Zj)/2. If it occurs, the resulting surface will be generally approximative. Default value of filter is 500. Special value 0 means that only the points having the same x and y coordinates will be filtered. The filter pre-processes the resolution of resulting map, which is similar to the resolution of a digital picture - if the distance of two points with different colors is smaller than the pixel size of the digital picture, you can see only one point with "average" color.
To demonstrate effect of the parameter Filter, we will use example EX4.DTA (select the subproject Example 4 in the SurGe Project Manager), which contains 7000 points.
Now you can experiment with parameter Filter. In the first step set
the Filter to value 100 and perform interpolation. Start SURGEF (see
[2]) and answer according to the following
table:
prompt of SURGEF | answer | |
READ FILE .GRD? (Y/N) [N] |
Enter | |
GRID SIZE IN X-DIRECTION (MIN.100) [410]: |
Enter | |
GRID SIZE IN Y-DIRECTION (MIN. 67) [274]: | Enter | |
GRID SIZE ENLARGEMENT [ 51]: | Enter | |
SMOOTHING [ 4]: | Enter |
As you can see (for example in raster color map display - press shortcut key C), the resulting surface is too "noisy":
Now set the Filter to 30, again start SURGEF and answer according
to the following table:
prompt of SURGEF | answer | |
READ FILE .GRD? (Y/N) [N] |
Enter | |
GRID SIZE IN X-DIRECTION (MIN. 30) [130]: |
Enter | |
GRID SIZE IN Y-DIRECTION (MIN. 20) [87]: | Enter | |
GRID SIZE ENLARGEMENT [ 28]: | Enter | |
SMOOTHING [ 4]: | Enter |
You can see, the "noise" is significantly reduced:
Even better filtering effect can be obtained, if the parameter Accuracy is set to some higher value (10 - 30). Try it.
How to use different modes of
interpolation
A click on mouse right button displays a local menu, which enables to perform several types of interpolation:
In addition to the Normal interpolation mode, SurGe offers several other modes suitable for special purposes:
Linear mode is a little bit faster than normal mode. This mode
is favourable for zero based maps and digital model of terrain (especially
if it is used with linear tensioning 3). The disadvantage is worse extrapolation
outside convex envelope of points XYZ.
Convex mode uses balanced combination of normal and linear
tensioning. It is faster than normal mode - in case of great number of data
and large grid, this mode can be 4-5 times faster than normal mode, especially
if used for preview (smoothing is zero). The disadvantage is worse extrapolation
outside convex envelope of points XYZ.
Per partes constant mode performs only per partes constant
interpolation.
Normal, Linear, Convex and Per partes constant modes can be combined with the following modes:
Auto mode runs SURGEF.EXE without waiting for user
response.
Preview mode performs very fast interpolation without
smoothing and without waiting for user response.
Up to now we have been using the program SurGe in move/zoom mode.
If you press Enter, the program switches into digitization mode
(press Esc to return back to move/zoom mode). In this mode,
the cursor changes to little cross and cursor keys have another function
- they move cursor around the screen (shortcut keys 1,
2, 3, and 4 change step of movement). If
you press Ctrl key and a cursor key, you still can move map as in
move/zoom mode. In the program bar you can see x, y and z (if the surface
was created) coordinates of the cursor position. Information about actual
mode is displayed in the status bar.
The digitization mode has different main menu. The first item (Object)
contains objects, which have to be digitized. For example, if you want to
digitize a boundary, select Object / Boundary.
The digitization of any object can be also selected by menu item
Digitization in move/zoom mode (for example Digitization /
Boundary).
Important: If you want to save changed objects, you must select menu item Object / Save or you must return to move/zoom mode and select menu item Digitization / Save objects.
In the digitization mode there are three functions for editing points XYZ.
You can add point, delete point or change z-coordinate of point.
To demonstrate this feature, select the subproject Example 2 in the
SurGe Project Manager and press Run SurGe. This example contains
not only points XYZ, but also the boundary (thick red line), the spatial
polyline (dot orange line) and the faults (green lines).
Switch to digitization mode (press Enter, if you are in move/zoom
mode) and select points as digitized object (choose Object / Points
in the main menu). Let us suppose, you want to delete point with label LB03
(if you want to highlight the label, press Alt+W and enter "LB03").
Locate cross cursor so that the point is the nearest point to the cursor.
Press Ctrl+B or click right mouse button - you can see, the
point disappears.
Now let us suppose, you want to add new point. Locate cross cursor so that
it has approximately coordinates X=250 and Y=300 (check the program bar,
where the coordinates are displayed). Press B or click left mouse
button. In the provided dialog box enter z-coordinate of the new point and
press Enter. A new point has always label starting with
## and it is considered to be so called added point. Added
points are stored (when you select menu item Object / Save) in separate
file with extension DBs.
If you want to change z-coordinate of a point, again locate cross cursor
so that the point is the nearest point to the cursor and press
Shift+B. In provided dialog box enter new z-coordinate of the point.
There can be up to 100 boundaries in the program SurGe, each defined as a
polyline. In the digitization mode you can start to create a new boundary,
add a new segment, delete last segment or to move selected point.
We will use the same data as in the previous section. Switch to digitization
mode (press Enter, if you are in move/zoom mode) and select digitized
object boundary (choose Object / Boundaries in main menu).
To create new boundary, press Ctrl+H (or click right mouse button).
Than you can locate cross cursor at desired position of the first boundary
point of new boundary and press H (or click left mouse button). Do
the same for second boundary point. If the first two points have different
location, you can see the first segment of new boundary (thick red line).
By this way you can continue and so create desired boundary. The last boundary
segment can be deleted using shortcut key D. If you want to close
the boundary, press key U.
A point of existing boundary can be moved - locate the cursor near
to selected point of boundary and press Shift+H (the point will have
light blue color). Then locate cursor to new position and press
M.
Item Make boundary as a convex envelope under menu Boundaries
creates a new boundary as a convex envelope (convex hull) of points XYZ.
The number entered in the following dialog box enables to scale the convex
envelope. Using this feature you can change the size of interpolation area
and to remove grid values outside of the convex envelope.
How to digitize spatial polylines
Spatial polylines are used in the program SurGe as an expletive mean for
definition of the surface. There can be up to 300 spatial polylines containing
up to 10000 points. Each endpoint of the polyline segment can have undefined
value (1E29) or defined value (less than 1E29). There must be at least two
defined values for each polyline - the remaining values are computed
as soon as the digitization mode is finished. Spatial polylines are displayed
as orange dot lines.
Let us again use the file EX2.DTA. Switch to digitization mode (press
Enter, if you are in move/zoom mode) and select digitized object polylines
(choose Object / Polylines in main menu).
To create a new polyline, press Ctrl+L (or click right mouse button).
Than you can locate cross cursor at desired position of the first point of
new polyline and press L (or click left mouse button). In the provided
dialog box enter z-coordinate of the point. Do the same for second polyline
point. If the first two points have different location, you can see the first
segment of new polyline (dot orange line). By this way you can continue and
so create desired polyline. The last polyline segment can be deleted using
shortcut key D. If you want to close the polyline, press key
U.
A point position of existing polyline can be moved - locate the
cursor near to selected point of polyline and press Shift+L (the point
will have light blue color). Then locate the cursor to new position and press
M.
Sometimes it is desired to define polyline with constant z-values at its
points. In this case press key F and in the displayed dialog box enter
the constant value. Then, if you press L to define new point of the
polyline, the constant is assigned to z-coordinate of the point automatically.
This feature can be switched of by shortcut key Ctrl+F.
If a polyline is created, it is necessary
to set its number of internal points. In fact, SURGEF does not work with
polylines directly - it works only with the points, which are evenly
distributed along the polyline. To specify the number of these points, locate
the cross cursor near to the polyline and press P. Then in the
provided dialog box enter the number of internal points (typical values are
50 - 200).
Menu item Faults enables to edit sequences of line segments (in horizontal plain), at which the resulting surface has to be discontinuous. Each fault is defined by pair of points and is displayed in green color. Choose Object / Faults in the main menu. To define a new end point of fault, locate cursor at desired position and press key Z. The fault can be deleted using key D - that one, which center is next to the cursor position. The position of fault endpoint can be changed by key Shift+Z. Maximal number of faults is 1000.
How to create and display cross-sections
In the digitization mode you can specify a cross-section and display it.
It is possible to create the cross-section through up to 9 surfaces (layers).
To demonstrate cross-section mode, we will use files EX1.DTA, EX1.DTB, EX1.DTC
and EX1.DTD (select the Example 1 in the Surge Project
Manager). These files contain the same set of the points, but with different
z-coordinates.
In the first step you must create surfaces for all these files (see
Chapter 1: Basic operations). Remember,
you must specify the same grid dimensions for all surfaces.
In the second step switch to digitization mode (press Enter, if you
are in move/zoom mode) and select digitized object cross-section (choose
Object / Cross-section in main menu). The first or next point of
cross-section can be specified using key G (or click left mouse button).
Points are displayed by red color. Polyline connecting red points is displayed
using key E. All specified cross-section points can be deleted by
key Ctrl+G and then new cross-section can be defined.
Try to create cross-section through points LB28, LB07, LB10, LB14 and LB06.
Then press Enter and fill items in the following dialog box like this:
In the first column enter the suffix of layer, in the second column brief
description of layer and press Enter - the program switches
into cross-section mode. The cross-section is constructed through all specified
surfaces and displayed in a 2D plot. There is a special menu in the cross-section
mode. Title of the plot and description of axes can be modified using menu
items Graph title (key N), Description of x axis (key
X) and Description of y axis (key Y). The range of y
axis can be changed by item Change range of y axis (key
Ctrl+Y). Menu item Save cross-section (key U) enables
to save the position of cross-section polyline into file
NAME.RZY for later using in the
digitization mode. Name of the cross-section must be specified as a single
character A-I.
If there is a saved cross-section, you can display it in the digitization
mode using key Shift+G. If you press this key, the following dialog
box appears:
In this example, six cross-sections were saved and the cross-section D was selected. You can enter any combination of letters stated in dialog bar without delimiters (for example ADC). As soon as you press button OK, positions of these cross-sections are displayed by thick lines in red color. If you select only one cross-section, you can then press Enter and directly switch to the cross-section mode.
How to measure horizontal distance
As soon as the second point of the cross-section is specified, you can see in the program bar the distance measured along the cross-section polyline (the last item after D=). To display cross-section polyline use the key E. To delete specified cross-section points and to reset the distance to zero use key Ctrl+G.
In the digitization mode there is also possibility to modify isolines. The first function, Mark isoline (key X), serves for selection of a isoline. After selection, the isoline is represented by sequence of white points. If the display is (due to operations) damaged, it can be restored by menu item Redraw modified isoline (key A). Selected isoline can be smoothed (Smooth isoline, key S) as a whole, or partially (Smooth between points, key V) between the points selected using menu items Mark first point (key Alt+1) and Mark second point (key Alt+2). There is also possibility to mark single point of isoline (Mark point, key Shift+I) and move it (Move point, key M). Certain number (the number can be changed by Change number n, key Ctrl+Q) of isoline points can be moved by Move n points (key Q). Modified isoline can be saved into file NAME.VRz using menu item Save modified isoline (key Ctrl+I). Write marked isoline (key W) enables to store selected isoline as ASCII file IZ.$$$.
In some cases it is useful to display texts and some characteristic terrain
lines and / or objects to improve orientation in the map. For this purpose,
there is a special digitization level named Background under
menu Digitization. Objects of background are handled as polylines
and there are the following functions for creating, changing or deleting
objects of background:
Start new object (Ctrl+B) | ends construction of the current object and starts construction of a new one |
New point of object (B) | a new point of object polyline is specified at cursor position |
Delete last point (D) | the last specified point is deleted |
Close polygon (U) | the next point will be at the same position as the first point of the polyline |
Mark point (Shift+B) | mark the nearest point of the polyline by white color |
Move point (M) | move marked point to a new position |
New text (T) | specify text string, font size, font thickness, font color and text orientation |
Change text (Shift T) | change text string, font size, font thickness, font color and text orientation |
Three functions are intended for manipulation with whole objects:
Select object/text (S) | select / unselect the object next to the cursor. Selected object is displayed by violet color |
Move selected object/text (Ctrl+M) | move whole object; moving vector is given by marked point and the cursor position |
Delete selected object/text (Ctrl+D) | delete selected object |
All background objects can be saved into file NAME.BG by the last menu item Save background (key W).
You can use keys for moving map (Ctrl and arrow keys, PgUp, PgDn) and keys for display of point labels, z-coordinates, isolines, raster color map and so on. (see [4]).
To ensure compatibility with other mapping packages, SurGe can export grid
in ASCII format compatible with Surfer (Golden Software). Most of mapping
packages can import grids in this format. If you have created a grid and
if you want to save it as an ASCII file, select the menu item Output
/ ASCII File. The ASCII file
NAME.GRs will be saved in your working
directory.
Let us suppose, you have created grid from input data EX1.DTA. Select the
menu item Output / ASCII File - in your working directory you
can see new ASCII file EX1.GRA.
How to import other map/GIS grid formats
SurGe and SurView utilize the GRIDCONV.EXE command line utility (see Conversion command line utilities) for importing some common map/GIS grid formats - DEM, Surfer ASCII, ArcGis and GRASS. If a file containing one of these grids is entered as a parameter (without a suffix), SurGe or SurView tries to recognize the format and calls GRIDCONV.EXE to create a native SurGe grid. In the case of SurGe, the basic data file is also created. DEM files are recognized according to the file extension DEM, other formats are recognized according to the first lines of the file.
The following command line statements are examples of how to import grid files:
SurGe baraboo.dem
SurGe calls GRIDCONV to read the BARABOO.DEM file and creates BARABOOF.GRa
and BARABOO.DTa files.
SurView MNT450.ASC
SurView calls GRIDCONV to read the MNT450.ASC ArcGis file and creates the
MNT450F.GRa file, which is immediately displayed.
This picture shows an ArcGis grid displayed by SurView.
In some cases it is suitable to work with existing grid, which can result
from another evaluation - for example from evaluation of seismic data. Let
us name such grid as an external grid. SurGe can import external grids,
if they are stored in ASCII format compatible with DEM
(USGS Digital Elevation Model), Surfer (Golden
Software), ArcGis and GRASS. Most of mapping packages can export grids in
this format.
If you want to import an external Surfer ASCII grid, rename it according
to the name conventions (see [3]). For
example, if your file containing basic data has name SEISM.DT9, rename the
external grid file to SEISM.GR9.
In the next example we will use the grid EX1.GRA created in the previous section. To prevent SurGe from automatic reading of binary grid file, delete file EX1F.GRA (it is not necessary - do it only for demonstration purposes).
Let us suppose, the grid EX1.GRA created in the previous section is such external grid. Read input data EX1.DTA as described in [1]. Select the menu item File / Read grid from ASCII file. The external grid is read, transformed into binary format and immediately written as binary file EXIF.GRA (check now your working directory). Moreover, you can work with grid as if it was created by interpolation process.
Let us suppose, you have grid, which is approximative (the surface does not pass through the points XYZ exactly), but you want more precise surface. In such case proceed according to the following steps.
1. Read input data.
2. Start interpolation using the menu item Interpolation / Calculate
grid.
3. Answer Y to the prompt of SURGEF:
READ FILE .GRD? (Y/N) [N]
4. Now, SURGEF will read existing grid. If you want to smooth this grid, enter positive number as an answer to the next prompt:
SMOOTHING OF READ GRID [ 0]
5. Answer to the remaining prompts as usually.
SURGEF will perform steps 4. through 9. (see User's
manual) of interpolating algorithm.
By this way you can achieve precise interpolation while the surface is corrected
only in surroundings of the points
XYZ, through which original surface did
not pass exactly.
How to directly convert seismic reflection times
to structure depth
The processing of seismic data is one of the most significant tasks for
geologists if they have to create a geological map of some underground rock
structure. The typical results of seismic measurement are times at which
reflected sound waves return from a certain boundary between different types
of rock. These times are, of course, measured from some datum level and they
are usually recorded using a dense mesh covering the area of interest with
a typical number of nodes between 10000 and 100000.
Because the homogeneity of covering rocks cannot be assumed and the speed
of sound waves in covering rocks is unknown or known only approximately,
the measurement must be supported by precise depth values usually measured
at exploration wells. In general, the interpreter has to work with two sets
of data - the first one is the dense mesh of reflection times and the second
one is the measurement of rock structure depth at wells. Let us note that
the number of wells is usually small in comparison to the number of points
at which the reflection time is measured.
To demonstrate the interpretation of seismic measurement we will use the
data set SEISM1.DTc containing reflection times - the corresponding grid
is shown in the next figure.
The file SEISM1.DTc contains reflection times in the range from 1736 to 1875 seconds at 25853 points. It is obvious that the lower the value of reflection time, the higher the position of the rock structure boundary.
The depth of the rock structure was also measured at 14 wells and the results were stored in the file containing the second data set SEISM1.DTa - see the next list of the file content.
1225.976 2339.511 -2246 W-01
837.871 2270.595 -2250 W-02
428.004 2118.255 -2271 W-03
859.634 1878.863 -2272 W-04
181.357 1519.776 -2292 W-05
1940.525 2187.171 -2277 W-06
2738.498 2292.358 -2255 W-07
2981.517 2375.783 -2238 W-08
3344.232 935.805 -2338 W-09
2121.882 812.481 -2317 W-10
493.292 500.547 -2309 W-11
1519.776 1733.777 -2267 W-12
3663.421 2143.645 -2264 W-13
2999.652 2172.662 -2252 W-14
As follows from the list, the range of depths is -2338 to -2238 meters. As a rule, the depth of geological structure is a negative value measured from some datum plane (for example sea-level).
The standard procedure of seismic data processing is the following:
1. The map of reflection times is created.
2. For all wells the sound speed is calculated from known structure depth
and reflection time at the well.
3. The velocities known at well positions are used for creation of the so-called
velocity map.
4. The velocity map is multiplied by the map of reflection times and thus
the map of depths is obtained.
The SURGEF offers another solution: to create map of depth directly from the structure depths at wells using the reflection time grid as an external grid. It means that the grid containing the map of reflection times SEISM1f.GRc is copied (renamed) into the file SEISM1f.GRa and this grid is read at the beginning of the interpolation process. It may seem to be strange especially if we realize that the reflection times are positive values while the structure depths are negative. Let us have a closer look at the procedures performed by SURGEF.
Firstly, the SURGEF is run for the data set SEISM1.DTa and it is instructed to read the external grid SEISM1f.GRa (which is the copy of SEISM1f.GRc and represents the map of reflection times) by answering Y to the prompt:
READ FILE .GRD? (Y/N) [N] Y
Then SURGEF changes this grid using the linear transformation Pnew = A·Pold + B, where the constants A and B minimize the term å(A·f(Xi,Yi)+ B - Zi)2, as described in section Smoothing in the SurGe User's Manual.
In this case the constant A was computed as the negative number -1.160139 and together with B (-217.38) changed the grid so that the sum of squared differences between the new surface and structure depths at wells is minimal. As expected there were some differences between the new surface and the structural depths at wells because of heterogeneity of covering rocks; however these differences were used in the next iteration cycle (cycles) as in the normal interpolation process.
As a result, the new surface passes through negative z-coordinates of structural depths while conserving the morphology corresponding to the reflection times.
How combine interpolation and approximation
Another example, how to utilize existing grid, is a combination of interpolation and approximation:
Suppose, that you have a set of points in the file COMB.DTA and you need to create a surface, which is approximative, but it goes exactly
through some selected points. In this case the following procedure is recommended:
1) Rename the file containing your data to COMB.DBA.
2) Create a new basic data file COMB.DTA and copy into it the points, through which the surface has to pass exactly.
3) Start SurGe and select only Added points in Interpolation / Objects for interpolation.
4) Select Smooth approximation in Interpolation / Interpolation parameters and Calculate grid.
5) Select only Points in Interpolation / Objects for interpolation.
6) Select Normal approximation in Interpolation / Interpolation parameters and set Accuracy to 0.
7) Calculate grid and do not forget to answer Y to the SURGEF prompt "READ FILE .GRD?".
How to modify the size and the shape of the grid
area
If there is no boundary in input data, the size of grid area is given by
minimal and maximal coordinates of
XYZ points. This size can be changed by
a boundary - if a boundary exists and if it is involved into interpolation
(see the dialog box Interpolation / Objects for interpolation),
the size of grid area is given by minimal and maximal coordinates of boundary
points.
To demonstrate this feature we will use the file EX3.DTA containing terrain
data (select the subproject Example 3 in the SurGe Project
Manager). Switch to the digitization mode (press Enter, if you
are in the move/zoom mode). You can create a boundary "by hand" (see the
section How to digitize a
boundary), but try to use the menu item Boundaries /
Make boundary as a convex envelope. By this way you will create the
boundary automatically and you can scale it by scaling factor entered in
the provided dialog box (select 1.1 to enlarge the grid area by 10%). Now
return to the move/zoom mode (press Esc, if you are in the digitization
mode) and perform the interpolation as described in the chapter
How to interpolate terrain
data.
The boundary can change not only the size of the grid area, but also its
shape - select Interpolation / Blank grid outside boundary
to remove grid values outside the boundary (enlarged convex envelope in our
case). You should obtain the result like this:
How to perform mathematical calculations with
grids
There is a possibility to perform certain mathematical calculations with
grids. Let us suppose, you have created grids for examples EX1.DTA and EX1.DTB
representing top and bottom of a layer and you want to create a grid representing
the thickness of the layer. It means, you need the grid for which value at
each node is equal to value of the first grid minus value of the second grid.
Proceed according to the following steps:
1. Read input data EX1.DTA as described in
[1].
2. In the menu Interpolation select menu item Math calculation
with grids. You will see this dialog box:
The actual surface (in our case the surface corresponding to the suffix A)
will be used as the first operand of the calculation. The second surface
(in our case corresponding to suffix B) will be the second operand, so enter
B (or b) in the first edit field. In the middle edit field you have to enter
operation - in our case character - (minus). The last field has contain a
suffix of result surface. Be sure, you do not enter the suffix of existing
surface - otherwise, it will be replaced without prompt (if you are not sure
press Cancel button and check your working directory). Type, for example,
Z (or z) and press OK button. At this moment, the new surface with
extension Z is created and stored (as a file EX1F.DTZ) in working directory.
Z-coordinates of all points and spatial polylines are re-calculated so that
they correspond to the new surface. If you want to save them, select the
menu item Digitization / Save objects.
Meaning of other operations is explained in
User's manual.
How to simulate wedging out of
layers
Construction of a layer geometry is one of the basic tasks in reservoir
engineering. The boundaries between individual layers are constructed as
surfaces passing through structural depths (z-coordinates) measured in wells.
As explained in the section How to directly
convert seismic reflection times to structure depth, layer construction
may be combined with seismic measurement, if it is available.
If there is a small layer thickness indicated in some wells, no algorithm
for smooth interpolation can ensure that the bottom layer boundary will not
exceed the top layer boundary. The next two figures illustrate such situation
- in the first figure there is a top layer boundary (contained in the file
GRES.DTa) and the bottom layer boundary (contained in the file GRES.DTb)
of a gas reservoir structure including the position of the cross-section
A-A', where the bottom layer boundary exceeds the top one (see the second
figure). Such a phenomenon suggests that a so-called wedging out of layer
(which is common in geology) should be interpreted.
This problem can be effectively solved in the SurGe graphical interface using
mathematical operations offered in the dialog Math calculation with
grids, where selected binary mathematical operation is performed for
all z-values at nodes of grids representing the two surfaces.
There are two mathematical operations represented by characters $ and %,
which can be utilized for solving the wedging out of layer problem. In the
case of the first operation ($) the resulting value is the z-value of the
first surface, but if the z-value of the second surface is greater, the resulting
value is the average. In the case of the second operation (%) the resulting
value is the z-value of the second surface, but if the z-value of the second
surface is greater than the z-value of the first surface, the resulting value
is the average.
Both mentioned operations were applied for the presented surfaces and the
resulting new surfaces were stored with new suffices 1 and 2. The following
figure contains the cross-section A-A' through the new surfaces indicating
that the wedging out of layer problem was properly solved.
Maps of thickness and volume
calculation
This example is concerned with the estimate of the new snow volume in avalanche field after an avalanche event. Two data sets were available for solving this problem - AVALAN.DT0 containing the measurement of snow surface before the avalanche event and AVALAN.DT1 containing the measurement of snow surface after the avalanche event.
On the next figure there are two maps of snow surface created from the above-mentioned files corresponding to the situation before and after the avalanche event; the white line determines supposed boundary of the avalanche field.
There are no visible differences between both surfaces, but as soon as the first surface is subtracted from the second (using the menu item Interpolation / Math calculation with grids), the map of the new snow thickness is obtained (see the next figure).
It is obvious that snow increased also outside the supposed boundary of avalanche
field - it was probably caused by the additional snowing, by creation of
snow drifts and so on.
To calculate the volume of new snow layer, the VOLUME utility (see
Calculation of volumes) can be used:
From this figure the following results are obtained:
The volume of the new snow layer in the avalanche field is 484424 m3, the
horizontal area of avalanche field determined by the boundary is 293144 m2
and the maximal thickness of new snow layer is 3.73 m.
A map can be printed in using the menu item File / Print. The following dialog box will appear:
Here you can select a printer installed on your system, paper size and / or paper orientation. If you press OK button, you will see the dialog box like this:
The first line contains page sizes (in cm), as they were detected for the
selected printer. The second line contains range of x values
(x2-x1) and range of y values
(y2-y1).
In the third line SurGe suggests size of printed map. The size is suggested
so that map will fit into page. You can change these values. If you enter
less values, you will obtain a smaller map. If you enter greater values,
you will obtain larger map - in this case the map could exceed the page
margins.
To shift the map beginning, set X start and Y start values.
The greater value of X start will move map to the right, the greater
value of Y start will move map to the up. You can also use a negative
value(s) to move map to the left (down).
If you want to print axes, check button Print axes.
A printed map will contain all objects displayed on the screen - for example, if point labels and map mesh are displayed on the screen, they will be printed.
In the dialog for isolines calculation (see [5]) you can set levels of the first and the last isoline, the step between isolines and the divisor. Remember, only isolines with level divisible by the divisor will be labelled. As a rule, if isolines are displayed on the screen, they will be printed. Labeled isolines are drawn by thick lines, while other isolines are drawn by thin lines - see the next picture with a detail of printed output.
In this picture the step between isolines is 1 and the divisor is 5.
The construction of a cross-section is described in the User's manual (see [6]). In the cross-section mode there is the menu item Cross-section / Print, which enables to print displayed cross-section on selected printer. As in the case of map printing (see [7]), you can select in the first dialog box a printer installed on your system, paper size and / or paper orientation. The meaning of items in the second dialog is the same (see [8]), but check button Print axes is missing (axes are always printed in the print of cross-section). The title and axes description can be changed by shortcut keys N, X and Y. The next picture shows an example of printed cross-section through two surfaces.
How to create PostScript
print
It is sometimes suitable to create printed output in PostScript or PDF format. In Windows environment it is not difficult. The only thing, which has to be done, is installation of a PostScript printer. If you want to have PostScript print, follow these steps:
In the Start menu select Settings / Printers and Faxes. In the presented dialog box select File / Add Printer. Press the Next button and in the next dialog choose Local printer. Again press the Next button and in the following dialog once again. You should see the dialog box Select a Printer Port. Choose FILE (Print to File) and again press the Next button. In the following dialog select a PostScript printer (I recommend HP Color LaserJet 8500 PS). The remaining answers of printer installation are up to you.
Now you can create PostScript print from any application, which can print to a Windows printer. If you select your PostScript printer before printing, you will be asked for a file name. Remember to use the file extension .PS (standard extension for PostScript files).
PostScript files can be viewed by GSview, which is available from:
GSview requires Ghostscript, which must be downloaded separately. GSview
enables to create a PDF file - just select File / Convert and
pdfwrite.