Contour with a Control File

If you have a standard contouring configuration, you may prefer to define a control file.

To learn how to configure the file, use a text editor to display the CONTOUR control file (*.CON) that is provided with Oasis montaj, and read the Application Notes below.

Use the Map Tools > Contour > Have Control File menu option (CONTCON GX) to draw contours on a map using a specified grid file and an existing contour control file.

Contour from Control File dialog options

Input grid

Specify the input grid file name.

Script Parameter: CONTCON.GRID

Contour control file

Specify the contour control file name (*.con).

Script Parameter: CONTCON.CON

Application Notes

 Contour Control File Parameters

The control file consists of eight lines of parameters as indicated below. Only the last line may be repeated. Within each line, parameter values are separated by blanks or commas. Note that the GX automatically determines default values from the data.

The file is free-format, which means that the positioning of data within a line is not important. If more than one value is to be placed on any line, the values must be separated by a blank or comma. Each line, with the exception of the title line, must end with a slash character (/), after which any user comments may be entered on the same line. Any parameter not specified will assume a default value.

The CONTCON GX contours according to the parameters specified in an ASCII control file. The following describes the control file parameters you can use.

LINE 1: MAP DEFINITION

This line consists of four fundamental parameters needed for generating a contour map, such as map scale and conversion factor for ground units. Either a MDF (Map Description File) name or the map scale must be specified (but not both). We recommend using the MDF method together with MAPSET to do the map design. All parameters on this line are optional. This line may be skipped over by placing a " 1 " at the beginning. In this case, a default map scale will be automatically selected by CONTOUR to produce a 8.5 inch x 11 inch plot. You may select either the MDF parameter or the scale parameter, but not both.

MDF

The name of a Map Description File (.MDF assumed). The MDF specifies the map scale, ground units, origin and data clip limits. If an MDF is used, the following UF, XO, YO parameters are ignored, and the values specified in the MDF are reused.

SCALE

The numeric map scale value. For example, it is set to 20000 for a 1: 20000 map. The scale parameter, in conjunction with next parameter UF, determines the physical dimensions of the contour plot. If neither a scale nor a MDF is entered, a default map scale is automatically calculated to produce an 8. 5 inch x 11 inch plot.

UFAC

Unit factor for converting ground units to metres. UF, in conjunction with scale, determines the physical dimensions of the contour plot. Typical values are:

1

ground unit in metres (Default)

3.280840

ground unit in feet

6.213712e-4

ground unit in miles

0.001

ground unit in kilometres

X0, Y0

The location of the plot origin relative to the standard reference system used by the grid. By default, the map origin is placed 10 cm (at map scale) below and left of the grid origin. Although default parameters will be calculated, it is recommended that you specify the origin. This will ensure that all plots for the same map will register correctly when merged. Note: XO, YO are ignored if an MDF file is used. Also, if a grid title is to be plotted (as specified with GTITLE from Line 2), the ground plot origin will be adjusted to make room for the title.

LINE 2: GENERAL PARAMETERS

The five parameters on this line define certain contour generation options such as depression hachure marks, contour path smoothing, contour suppression in high gradient regions and so on.

BORDER

Former option for plotting map corners or map boundary. This Parameter is obsolete as of Ooasis montaj version 6.4 and should be left blank. In order to maintain the Low tick parameter as the second argument of line 2, always start line 2 with a comma "," .

LOWTIC

Option to mark the inner most low contour in a depression with hachure ticks.

0

Do not mark lows.

1

Mark the lows (Default).

SMOOTH

Contour smoothing option:

-1

Double the number of points in each contour trace. This will improve the appearance of maps created from grids with larger cell sizes.

-2

Apply one pass contour smoothing, then contour doubling. Smoothing applies a three-point Hanning filter to the contour trace.

0

Do not smooth or double contours.

>0

Number of times to apply the contour smoothing filter. We do not recommend applying smoothing more than two times.

Default as follows:

For grid cell size smaller than 1 mm, two passes of Hanning, no contour doubling i.e. SMOOTH=2.

For grid cell size between 1 and 3 mm, one pass Hanning and contour doubling i.e. SMOOTH=-2.

For grid cell size greater than 3 mm, no Hanning, no contour doubling i.e. SMOOTH=0.

Excessive contour smoothing can cause the ends of suppressed contours to cross adjacent contours, especially with noisy data. if this happens, we recommend smoothing the grid rather than the contours. This is done by using the GRIDHANN program to apply a HANNING filter to the grid before contouring.

It may also be necessary to re-sample the grid to a more appropriate grid cell size if the grid is too coarse. We recommend a grid cell size that is 2.5 mm (or 0.1 inch) at map scale when plotted. Re-sampling can be done by re-gridding the grid using BIGRID, or by re-sampling the grid using GRIDWIND. BIGRID will produce a better result and should be used if the re-sampling reduces the grid cell size by a factor of three or more. GRIDHANN should always be applied to the re-sampled grid.

SUPPOP

In order to improve legibility of a contour map in high dynamic-range areas, contours of each level are suppressed when they get too close together (as determined by DENSE in line 8). SUPPOP controls how the suppression is performed:

1(Default)

Suppresses all contours that exceed the suppression density. This is the standard method which also allows room for contour labels in high gradient areas. This option will also flatten the visual appearance of the map.

2

Only works with contour levels that divide the next higher level by 4. The outer two contours are dropped, and the centre contour continues until the gradient causes it to drop as well. This option produces the best visual appearance since high gradient areas still appear densely contoured. However, this option seldom leaves room for contour labels in high gradient areas.

3

This is similar to option 2, except that it also applies to contour levels that divide the next higher level by 5. In this case, whichever of the central two contours are closer to the centre of the area (defined by the next higher level) is left in. As with Binary #1 this option produces better visual product than Normal suppression, but the contour dropping for the even 5th contours may, at times, appear discontinuous. This option rarely leaves room for contour labels in high gradient areas.

NTH

Grid decimation option for faster execution of CONTOUR in creating check plots. Usually, every point in the grid is used for contouring, i.e. the default is nth=l. When the grid is large, for quick check plots, one may wish to use every other grid row and column. In this case, setting nth=2 will make CONTOUR run four times faster. But there will be loss of fine detail. Setting nth=3 will make the program run nine times faster. Setting nth greater than 3 is not recommended.

The maximum grid size CONTOUR can handle has been extended to 4096 x 4096. The total rows or total columns used cannot exceed 4096. Grids larger than this size can still be contoured using NTH. In this case, total rows or total columns still cannot exceed 16384, else the program is unable to read in the grid. If the grid is larger than the 4096 x 4096 limit, CONTOUR automatically sets a minimum default value for NTH. You may override this by setting NTH to a higher value.

LINE 3: SPECIAL LINE ATTRIBUTES

These parameters define the attributes (colour and thickness) of the lines to be used in plotting the various features on a contour map. Please refer to the Line Attributes for the proper syntax to define line attributes.

PDEF

The default line attributes. If a line attribute for an individual contour feature such as extreme values has not been explicitly assigned, the default line given here is used. The default is DEFAULT, which is defined in CONTOUR.AAT.

PTICK

The line attributes to use for marking the low tick hachure marks. The default is PDEF.

PXVAL

The line attributes to use for writing extreme values. The default is PDEF.

PFRAME

The line attributes to use for plotting the map boundary (if the parameter BORDER has been set earlier in Line 2). The default is PDEF.

PSIDEL

The line attributes to use for writing the external contour labels on map edge. The default is PDEF.

LINE 4: TEXT SIZES

This set of parameters consists of the size (in millimetres) of the various labels and marks used by CONTOUR.

HLB

Contour label number size. The default is 1.5 mm, max 10 mm.

HTL

Grid title lettering size. The default is 5 mm, max 15 mm.

HCR

Grid corner marks and registration cross size. The default is 3 mm. Maximum size is 15 mm.

HTK

Low-tick hachure mark size. The default is HTK = HLB * 0.8 (if hlb is 1.5 mm, then htk=1.2 mm). Maximum size is 10 mm.

HXV

Extreme value number size. The default is HXV=HLB (usually 1.5 mm). Maximum size is 10 mm.

HSL

External contour label size on the map edge. The default is HSL=HLB. Maximum size is 10 mm.

LINE 5: LINE COSMETICS

These parameters control the fine details of plotting short contour segments and the positioning of contour labels. They all are expressed in millimetres.

OMINL

The minimum length that open contours must have in order to be plotted. The default is 10 mm, max 50. Set OMINL=0 to plot all open contours.

CHINL

The minimum length that closed contours must have in order to be plotted. The default is 10 mm, max 50. Set CMIML=0 to plot all closed contours.

SKIPA

The minimum distance from the beginning of an open contour before the first label is written. The default is 15 mm. This parameter helps to prevent contour labels from clustering just inside the map edge.

SKIPB

The radius around the first label on a closed contour beyond which all other labels on this contour must occur. The default is 65 mm. This parameter is used to prevent the first and last labels of a closed contour from being too close to each other.

SKIPC

This is the minimum gap between successive labels for open and closed contours. The default is 150 mm.

SKIPD

The gap between hachure ticks to mark a low contour in a depression. The default is 10 mm.

SKIPE

The minimum length of the innermost low contour that will also have low hachure tick marks drawn, if extreme low values are to be labelled. The default is 60 mm. This parameter prevents hachure tick marks from overwriting the minimum value annotation in a depression.

SKIPF

The pinch limit. By eliminating the elongated tails of pinched contours (which appear in some instances on an unaltered grid), the contour map appears more aesthetically pleasing. The default is 0.5 mm, max 2. Setting SKIPF=0 disables this option. A value greater than 1 mm is not recommended.

LINE 6: EXTREME VALUES

This option controls the writing of the actual highest or the lowest (extreme) grid value either on a peak or inside a low, as appropriate. A clean window is created for each number.

XVAL

Controls the annotation of extreme high and low points in the data. Enter the negative of the values listed below to suppress the plotting of contour lines (e.g. if you just want the extreme values marked on your map):

0

Extremes are not annotated. (Default)

1

Mark highs with a star, lows with a triangle, and post the extreme value (rounded to one digit after decimal).

2

Mark highs with a star, lows with a triangle, but do not annotate the extreme value.

11

Same as 1, but mark highs with an H and lows with an L.

12

Same as 2, but mark highs with an H and lows with an L.

DIGXV

This is a code used to select the number of digits after the decimal point used when labelling extreme values (local highs and lows):

0

Automatically determines the number of significant digits.

-1

Round annotations to integer values (no decimal)

1

Round annotations to integer, include decimal point but do not include any digits after the decimal.

2

Round annotations to a single digit after the decimal. (Default)

>2

Plot decimal point and round to one decimal less than DIGXV. For example, DIGXV = 4 would plot three decimals after the decimal point. See Also the parameter HXV in line 4.

MINXV

When marking extreme points, mark only the extremes that are highest or lowest within a square of MINXV grid cells in each direction. This is to prevent marking too many insignificant extreme points in noisy data. The default is 25.

MARKXV

The number of times the symbols for extreme values are drawn. Each time the symbol is drawn it is slightly enlarged and surrounds the previous one. This can be used to make the symbol darker on devices with very thin line thickness. The default is 3. See Also parameter HXV in line 4.

LINE 7: LEVELS AND LABELS

This set of parameters defines how to interpret the contour levels in line 8, the contour Z limits for the map as a whole and the type of contour labels to create.

LEVOPT

This determines how the contour levels specified in line 8 will be interpreted.

0 (Default)

The levels are treated as hierarchical contour intervals such as 10, 50, 250 (specify positive values only!).

1

The contour levels are treated as fixed, individual iso-lines such as -2500, 0, 1000, 5000.

CONBEG, CONEND

Contouring is restricted to the minimum and maximum Z range defined by these two parameters. The default is to generate contours over the entire Z range in the input grid. The limits specified here apply to the map as a whole i.e. for all contour types, low ticks, extreme values and so on. These limits override and take precedence over the limits specified for individual contour intervals on line 8. The units for CONBEG, CONEND are the same as for CONLO, CONHI in line 8. If CONBEG equals CONEND (and they match one of the contour intervals in line 8), only the contours of that value will be generated. For example, if both are set to 0, only the 0 contour will appear on the plot.

Note: If LEVOPT = 1 (the contour levels in the next line (8) are specific contour iso-lines), then CONBEG and CONEND are ignored. See Also CONLO, CONNI in Line 8. Label orientation option: 0 default, orient labels up-gradient. 1 orient labels reading up always.

LBUP

Label style. The contour labels may be oriented up gradient or upward facing on the map. For options 0 and 1, the labels trace the curve of the contour. For options 2 and 3, the label is drawn in a straight line within the space. This is useful in cases where the path of the contour is tortuous, and the label might not otherwise plot, but it is more likely that some overlap of labels and adjacent contours will occur.

LBMULT

Contour label multiplier. The contour labels are multiplied by this number before plotting. The default is 1.0.

LOGOPT

Logarithmic labelling option:

0 (Default)

Use actual grid values, no logarithm.

1

The contours are labelled logarithmically by taking the log base 10 of the label value and plotting the result.

2

The contours are labelled logarithmically by taking the log base e (natural) of the label value and plotting the result.

Note

The contouring program first scans the grid header (PRCS parameter) to check if the grid was created as a logarithmic one (by using the LOG option in gridding). If so, it then changes the default LOGOPT value to 1; sets the default number of contour levels to 1; and sets the default value of this single contour interval to 1. However, it is recommended, for logarithmic grids, that you explicitly set LOGOPT to 1 and specify the desired contour levels in line 8.

LABELCOL

This controls the output and colouring of contour labels.

-1

Do not plot labels on the contour lines.

0 (Default)

Plot black labels (default).

1

Plot labels the same colour as the contour lines.

LINE 8: CONTOUR LEVEL DEFINITIONS

This set of parameters defines the basic interval and describe the characteristics of each contour level, including the z range to be applied for each individual level. This set may contain from 0 to 32 lines up to a maximum of 32 contour levels: If no level is specified (0 lines), optimum contour intervals are automatically selected by CONTOUR, based on grid statistics. This may suffice for a preliminary view of the contours.

The parameter LEVOPT on Line 7 determines how the contour levels in this set will be interpreted. If levopt is 0 (the default value), the levels are treated as hierarchical contour intervals. If levopt is 1, the contour levels are treated as fixed, individual iso-lines. Only CINT is required. The remaining parameters will assume default values depending upon the level number. Contour level entries must be in increasing order, although the same interval can be repeated more than once with different Z ranges and line attributes (see CONLO, CONNI in this set).

CINT

The contour interval for this level. The first line of this set must give the basic contour level of the map (i.e. 10 for a 10 nT contour map). For hierarchical contour intervals, the value of CINT must be positive, and we recommend that each subsequent level be a factor of 4 or 5 times the previous level. For example, a typical 10 nT CONTOUR control file could be:

10 /basic 10 nT contour

50 /next level (5 times)

250 /next level (5 times)

1000 /next level (4 times)

The defaults of the remaining parameters are defined in the CONTOUR.AAT attribute file as Cl, C2, C3, etc. The line attribute will increase from Cl for each level (Cl for level 1 - 10 nT, C2 for level 2 - 50 nT, etc). All levels above the first are labelled.

Note: CINT must be reasonable for the grid at hand. If CINT is too small, the plot file will be huge. On the other hand, too large a CINT will not show enough detail in the contour map.

LINTYP

The line style to use for this interval:

1

Solid line (Default)

2

Long dashes

3

Dotted

4

Short dashes

5

Alternating long dashes and dots

6

Alternating long and short dashes

CATT

The line attributes to use for this interval. The default is to use C#, where # is the order of the contour level. Default line attributes are assumed to be defined in CONTOUR.AAT. Line attributes may also be explicitly defined using the following syntax:

C#=[kcmyrgb][0-255][t][microns]

The colours k, c, m, y, r, g and b correspond to black, cyan, magenta, yellow, red, green and blue respectively. These can each be followed by a number between 0 and 255 indicating the colour intensity, 255 being full intensity. If an intensity is not specified, full intensity is assumed. The line thickness can be specified by the letter "t" followed by a thickness in microns.

Examples:

C2=rt500 second contour level (C2) will be red, 0.5 mm thick.

C1=r64t250 first contour level will be pink, 0.25 mm thick.

C3=r64b64t200 purple, 0.2 mm thick

LABEL

Sets how the contours are labelled:

0

The contour is not labelled.

1

Labels inside the map borders only.

2

Outside labels on map edge only.

3

Both inside and outside labels.

Outside labels may be necessary around small polygonal enclosures or when SUPPOP = 2 or 3. Inside labels may be scarce in such cases.

To avoid clutter, assign outside labels only to the major contour intervals and not the lower levels.

The default is to label every contour, except when there is more than one contour level specified. In that case, the default is not to label the lowest level contours. The inside labels are always written using the attribute specified for the contour itself. The outside labels are written using attribute PSIDEL defined in line 3.

See Also:

LBUP and LBMULT in line 7; PSIDEL in line 3; HLB in line 4; SKI PA, SKIPB and SKI PC in line 5.

DENSE

When the two adjacent contours of the same level get closer than the value of dense, the contours are suppressed using a method selected by SUPPOP in line 2. For the highest contour interval, the default is 0.5 mm. For all other levels, the default is 0.75 mm. To remove contour suppression, set DENSE to 0. If contour suppression is removed, there will not be enough room to write contour labels in high gradient areas. The program may adjust the specified limiting contour density, to avoid the situation where a contour has been marked for suppression while contours with a smaller interval have not. For example, if the 100 unit contours are marked for suppression and the 25 unit contours are not, the limiting density of the 100 unit contours will be increased so that they will not be suppressed.

DIGITS

A code that sets the number of digits after the decimal point in a contour label:

0

Automatically determine the number of significant digits. (Default)

-1

Round contour labels to integer values (no decimal).

1

Round labels to integer, include decimal point but do not include any digits after the decimal.

>1

Plot decimal point and round to one decimal less than DIGITS. For example, DIGITS = 4 would plot three decimals after the decimal point. Maximum DIGITS is 8 (decimal point plus 7 significant digits of precision).

CONLO, CONHI

The minimum and maximum levels within which to plot this contour interval. By default, the entire range of the grid (or the range for the whole map in Line 7) is contoured. For example, to plot only one specific contour level on a grid, say the 59000 nT level, set conlo and conhi to 59000 and make sure that cint can be evenly divided into 59000 (e.g. cint = 500). Another example would be to use different line attributes for positive and negative levels. To do this, set conlo to 0 for plotting the positive levels, and conhi to 0 for plotting the negative levels. For example, attributes Cl, C2 and C3 are used for negatives, and attributes C4, C5 and C6 for positives.

LINE ATTRIBUTES

The attributes (colour and thickness) to be used to draw contours and the various annotations are defined using an attribute name of up to 15 characters, optionally followed by an "=" sign and the attribute settings: name=settings Attribute settings define the line colour and thickness using: a letter followed by a number indicating the level of colour to thickness. The following letters are recognized:

r

red 0-255

g

green 0-255

b

blue 0-255

c

cyan 0-255

m

magenta 0-255

y

yellow 0-255

k

black 0-255

t

thickness in microns 0-5000

If a colour letter is specified without an intensity value, then the full intensity (255) is assumed. A thickness in microns must follow a t character. Attribute settings can be pre-defined in a file named CONTOUR.AAT.

If an attribute name is used with no attribute settings, and the name is not included in the CONTOUR.AAT file, a 150 micron thick black line is assumed.

Examples:

thin=ktlOO

Defines a black, 100 micron thick line, named thin.

red=r

Defines a red line, default 150 microns thick, named red.

Purple=mc128t300

Defines a purplish line (full magenta, half cyan), which is 300 microns thick, named purple. standard

Standard

Searches CONTOUR.AAT for standard to determine the settings.

3

Searches CONTOUR.AAT for 3 to determine the settings.

2=kt500

Defines a 500 micron thick black line named 2.