GXDU class

class geosoft.gxapi.GXDU
DU functions provide a variety of common utilities that can be applied
efficiently to the contents of a database. Most DU library functions take
as their first argument a DB object, and apply standard processes to data
stored in an OASIS database, including import and export functions.

Note:

The following defines are used by GX functions but are not required
for any methods:

DU_LINES constants
static ado_table_names((str)arg1, (GXVV)arg2) → None:
Scans a ADO-compliant database and returns the table names in a VV
Parameters:
  • arg1 (str) – Database connection string
  • arg2 (geosoft.gxapi.GXVV) – VV to return names in
Returns:

Nothing

Return type:

None

New in version 5.0.8.

Note:

The VV must be created to hold strings of length
STR_DB_SYMBOL; i.e. use
Creat_VV(-STR_DB_SYMBOL, 0), or it will assert.
static an_sig((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4) → None:
Calculate the Analytic Signal of a channel.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line handle
  • arg3 (int) – Input channel [DB_LOCK_READONLY]
  • arg4 (int) – Output Analytic Signal channel [DB_LOCK_READWRITE]
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static append((GXDB)arg1, (GXDB)arg2, (int)arg3) → None:
Append a source database onto a destination database.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

If the source database and destination database have channels
with the same name, then data is appended onto the end
of the channel in lines which have the same number.

If a channel in the destination database is not also in the source
database, it is ignored.
static avg_azimuth((GXDB)arg1, (float)arg2, (float_ref)arg3) → None:
Returns average azimuth of selected lines.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Direction in degrees azimuth (clockwise relative
the +Y direction). The result is in the range
-90 < azimuth <= 90. The method handles lines going
in opposite directions (they do not average to 0!)
The method takes a precision, which is used to generate
a series of "test" angles.
The dot product of the line directions is taken
with each of the test angles, and the absolute values summed.
The maximum value occurs at the angle which most closely
approximates the trend direction of the lines.
static b_spline((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (float)arg5, (float)arg6, (float)arg7) → None:
B-spline Interpolate a Channel.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line handle
  • arg3 (int) – Channel to interpolate [DB_LOCK_READONLY]
  • arg4 (int) – Output interpolated channel [DB_LOCK_READWRITE]
  • arg5 (float) – Data error (Std Dev > 0.0)
  • arg6 (float) – Roughness (Rou > 0.0)
  • arg7 (float) – Tension (0.<= Tension <=1.)
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static base_data((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (GXTB)arg6) → None:
This method corrects an entire database line using a
time-based correction table. It is given 2 input channel
tokens and 1 output channel token as well as the table
object to use.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line Handle to apply correction to
  • arg3 (int) – Input Channel Token [DB_LOCK_READONLY]
  • arg4 (int) – Time Channel Token [DB_LOCK_READONLY]
  • arg5 (int) – Output Channel Token [DB_LOCK_READWRITE]
  • arg6 (geosoft.gxapi.GXTB) – Table Object (a Date/Time/Correction Table)
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static base_data_ex((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (GXTB)arg6, (int)arg7) → None:
This method corrects an entire database line using a
time-based correction table. It is given 2 input channel
tokens and 1 output channel token as well as the table
object to use (table sort flag=1 for sort, =0 for no sort).
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line Handle to apply correction to
  • arg3 (int) – Input Channel Token [DB_LOCK_READONLY]
  • arg4 (int) – Time Channel Token [DB_LOCK_READONLY]
  • arg5 (int) – Output Channel Token [DB_LOCK_READWRITE]
  • arg6 (geosoft.gxapi.GXTB) – Table Object (a Date/Time/Correction Table)
  • arg7 (int) – Table sort flag: 0 - do not sort, 1 - do sort.
Returns:

Nothing

Return type:

None

New in version 5.1.8.

static bound_line((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (GXPLY)arg5) → None:
Set map boundary clip limits.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line Handle [DB_LOCK_READWRITE]
  • arg3 (int) – X Channel [DB_LOCK_READONLY]
  • arg4 (int) – Y Channel [DB_LOCK_READONLY]
  • arg5 (geosoft.gxapi.GXPLY) – Polygon Object to use
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static bp_filt((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (float)arg5, (float)arg6, (int)arg7) → None:
This method applies a band-pass filter to the specified
line/channel and places the output in the output channel.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line handle
  • arg3 (int) – Input channel to filter [DB_LOCK_READONLY]
  • arg4 (int) – Output filtered channel [DB_LOCK_READWRITE]
  • arg5 (float) – Short wavelength cutoff, 0 for highpass
  • arg6 (float) – Long wavelength cutoff, 0 for lowpass
  • arg7 (int) – Filter Length, 0 for default length
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

If the short and long wavelengths are <= 0, the input channel
is simply copied to the output channel without filtering.
static break_line((GXDB)arg1, (int)arg2, (int)arg3) → None:
Break up a line based on line numbers in a channel.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line to be broken up [DB_LOCK_READONLY]
  • arg3 (int) – Channel containing line numbers [DB_LOCK_READONLY]
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static break_line2((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4) → None:
Break up a line based on line numbers in a channel.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line to be broken up [DB_LOCK_READONLY]
  • arg3 (int) – Channel containing line numbers [DB_LOCK_READONLY]
  • arg4 (int) – Reset starting fiducials to zero (0: No, 1: Yes)
Returns:

Nothing

Return type:

None

New in version 8.4.0.

Note:

The same as BreakLine, but with an option to reset each line's starting fiducial to zero.
static break_line_to_groups((GXDB)arg1, (int)arg2, (int)arg3, (str)arg4) → None:
Break up a line into group-lines based on a channel.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line to be broken up [DB_LOCK_READONLY]
  • arg3 (int) – Channel containing line numbers [DB_LOCK_READONLY]
  • arg4 (str) – Class name for new group lines (can be “”)
Returns:

Nothing

Return type:

None

New in version 5.1.8.

Note:

The original line will be deleted.
This is similar to geosoft.gxapi.GXDU.break_line(), but the output lines
are "group" lines, without the line type letters at the
start. (See db.gxh for information of Group Lines).
All channels are associated with each group line, and the
input class name is assigned to each group.
Class names for
groups ensure that (for instance) if you add a new channel to
one group of a given class, it will get added to all other
groups in the same class. If the class name is left empty, then
this will NOT be true. (Groups without class names are treated
as isolated entities for the purposes of channel loading).
static break_line_to_groups2((GXDB)arg1, (int)arg2, (int)arg3, (str)arg4, (int)arg5) → None:
Break up a line into group-lines based on a channel.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line to be broken up [DB_LOCK_READONLY]
  • arg3 (int) – Channel containing line numbers [DB_LOCK_READONLY]
  • arg4 (str) – Class name for new group lines (can be “”)
  • arg5 (int) – Reset starting fiducials to zero (0: No, 1: Yes)
Returns:

Nothing

Return type:

None

New in version 8.4.0.

Note:

The same as BreakLineToGroups, but with an option to reset each line's starting fiducial to zero.
static calculate_draped_survey_altitude((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (GXIMG)arg5, (int)arg6, (float)arg7, (float)arg8, (float)arg9, (int)arg10, (float)arg11, (float)arg12) → None:
Calculate a draped flight path, enforcing maximum descent and ascent rates.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line [DB_LOCK_READONLY]
  • arg3 (int) – X Channel [DB_LOCK_READONLY]
  • arg4 (int) – Y Channel [DB_LOCK_READONLY]
  • arg5 (geosoft.gxapi.GXIMG) – Topography grid
  • arg6 (int) – Output draped altitude channel [DB_LOCK_READWRITE]
  • arg7 (float) – Maximum rate of ascent (%)
  • arg8 (float) – Maximum rate of descent (%)
  • arg9 (float) – Minimum terrain clearance (drape height)
  • arg10 (int) – Number of times to apply Hanning Filter
  • arg11 (float) – Width of Hanning Filter
  • arg12 (float) – Minimum radius of curvature down slopes and at valley bottoms (rDUMMY to disable)
Returns:

Nothing

Return type:

None

New in version 8.3.0.

Note:

Calculate a draped flight path, enforcing maximum descent and ascent rates. Additional Inputs are the sample distance along the line
and a topography grid.
static calculate_draped_survey_altitude2((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (GXIMG)arg5, (int)arg6, (int)arg7, (float)arg8, (float)arg9, (float)arg10, (float)arg11, (int)arg12, (float)arg13, (float)arg14) → None:
Calculate a draped flight path, enforcing maximum descent and ascent rates.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line [DB_LOCK_READONLY]
  • arg3 (int) – X Channel [DB_LOCK_READONLY]
  • arg4 (int) – Y Channel [DB_LOCK_READONLY]
  • arg5 (geosoft.gxapi.GXIMG) – Topography grid
  • arg6 (int) – Output DEM channel [DB_LOCK_READWRITE] (can be NULLSYMB if not required)
  • arg7 (int) – Output draped altitude channel [DB_LOCK_READWRITE]
  • arg8 (float) – Maximum rate of ascent (%)
  • arg9 (float) – Maximum rate of descent (%)
  • arg10 (float) – Nominal terrain clearance (drape height)
  • arg11 (float) – Minimum terrain clearance (hard minimum drape height)
  • arg12 (int) – Number of times to apply Hanning Filter
  • arg13 (float) – Width of Hanning Filter
  • arg14 (float) – Minimum radius of curvature down slopes and at valley bottoms (rDUMMY to disable)
Returns:

Nothing

Return type:

None

New in version 8.4.0.

Note:

Calculate a draped flight path, enforcing maximum descent and ascent rates.
Set both a nominal and minimum drape height.
Additional Inputs are the sample distance along the line
and a topography grid.
static closest_point((GXDB)arg1, (float)arg2, (float)arg3, (float_ref)arg4, (float_ref)arg5, (int_ref)arg6, (float_ref)arg7) → None:
Return closest data point to input location.
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.2.0.

Note:

Selected lines are scanned for the (X, Y) location
which is closest to the input location.
The line and fiducial of the point are returned.

Will register an error if no valid (X, Y) locations
are found.
static copy_line((GXDB)arg1, (int)arg2, (int)arg3) → None:
Copy a line.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Input Line [DB_LOCK_READONLY]
  • arg3 (int) – Output Line [DB_LOCK_READWRITE]
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Existing channels in the output line will be replaced
by copied channels.
static copy_line_across((GXDB)arg1, (int)arg2, (GXDB)arg3, (int)arg4) → None:
Copy a line from one database to another.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Input Database
  • arg2 (int) – Input Line [DB_LOCK_READONLY]
  • arg3 (geosoft.gxapi.GXDB) – Output Database
  • arg4 (int) – Output Line [DB_LOCK_READWRITE]
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Existing channels in the output line will be replaced
by copied channels.
static copy_line_chan_across((GXDB)arg1, (int)arg2, (GXVV)arg3, (GXDB)arg4, (int)arg5) → None:
Copy a list of channels in a line from one database to another.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Input Database
  • arg2 (int) – Input Line [DB_LOCK_READONLY]
  • arg3 (geosoft.gxapi.GXVV) – VV containing a list of channel symbols, must be of INT
  • arg4 (geosoft.gxapi.GXDB) – Output Database
  • arg5 (int) – Output Line [DB_LOCK_READWRITE]
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Existing channels in the output line will be replaced
by copied channels.
static copy_line_masked((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5) → None:
Copy a line, prune items based on a mask channel
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database Object
  • arg2 (int) – Input Line Symbol [DB_LOCK_READONLY]
  • arg3 (int) – Mask Channel Symbol [DB_LOCK_READONLY]
  • arg4 (int) – VVU_PRUNE constants
  • arg5 (int) – Output Line Symbol [DB_LOCK_READWRITE]
Returns:

Nothing

Return type:

None

New in version 5.0.8.

Note:

The input line's channel data is ReFidded to the mask
channel, and then pruned from the output line data,
based on the value of the VVU_PRUNE_XXX variable.
For VVU_PRUNE_DUMMY, only those items where the mask channel
value is not a dummy are retained, while the complement
is retained for VV_PRUNE_VALID.
static create_drillhole_parameter_weight_constraint_database((GXDB)arg1, (int)arg2, (GXREG)arg3, (str)arg4) → None:
Used for weighting inversion models.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database (selected lines used)
  • arg2 (int) – Property channel handle [DB_LOCK_READONLY]
  • arg3 (geosoft.gxapi.GXREG) – Parameters (see notes)
  • arg4 (str) – Output database
Returns:

Nothing

Return type:

None

New in version 8.2.0.

Note:

Control parameters are passed in the REG (to allow for future expansion without
the need to modify the wrappers).
The input drillhole database must contain current X, Y and Z channels.
Drillhole data should be equally spaced (or nearly so) down the hole.
Weights are calculated on a circle perpendicular to the hole at each point.

RADIUS - Maximum radius from drillhole to create weighting points (Default = 100).
INCRMENENT - Grid cell size in weighting circle (Default = 10).
MINIMUM - the minimum weighting value to apply, at the radius (Default = 0.0001).
POWER - Exponential power to use in the weighting function (negative of this is used) (Default = 2).
static dao_table_names((str)arg1, (str)arg2, (GXVV)arg3) → None:
Scans a DAO-compliant database and returns the table names in a VV
Parameters:
  • arg1 (str) – Database file name
  • arg2 (str) – Database Type
  • arg3 (geosoft.gxapi.GXVV) – VV to return names in
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

The VV must be created to hold strings of length
STR_DB_SYMBOL; i.e. use
Creat_VV(-STR_DB_SYMBOL, 0), or it will assert.
static decimate((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5) → None:
Copy and decimate a channel
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line handle
  • arg3 (int) – Origin Channel [DB_LOCK_READONLY]
  • arg4 (int) – Destination Channel [DB_LOCK_READWRITE]
  • arg5 (int) – Decimation factor
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static diff((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5) → None:
Calculate differences within a channel.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line handle
  • arg3 (int) – Origin Channel [DB_LOCK_READONLY]
  • arg4 (int) – Destination Channel [DB_LOCK_READWRITE]
  • arg5 (int) – Number of differences
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Differences with dummies result in dummies.
An even number of differences locates data accurately.
An odd number of differences locates result 1/2 element lower
in the VV.
static direct_grid_data_to_voxel((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (str)arg6, (float)arg7, (float)arg8, (float)arg9, (int)arg10, (int)arg11, (int)arg12, (float)arg13, (float)arg14, (float)arg15, (int)arg16) → None:
Create a voxel using direct gridding.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – X channel [DB_LOCK_READONLY]
  • arg3 (int) – Y channel [DB_LOCK_READONLY]
  • arg4 (int) – Z channel [DB_LOCK_READONLY]
  • arg5 (int) – Data channel [DB_LOCK_READONLY]
  • arg6 (str) – Output voxel filename
  • arg7 (float) – Voxel origin X
  • arg8 (float) – Voxel origin Y
  • arg9 (float) – Voxel origin Z
  • arg10 (int) – Voxel cell count X
  • arg11 (int) – Voxel cell count Y
  • arg12 (int) – Voxel cell count Z
  • arg13 (float) – Voxel cell size X
  • arg14 (float) – Voxel cell size Y
  • arg15 (float) – Voxel cell size Z
  • arg16 (int) – DU_DIRECTGRID_METHOD constants
Returns:

Nothing

Return type:

None

New in version 8.4.0.

Note:

The Z and Data channels may be array channels. If they are, the array sizes must match.
static direct_grid_item_counts_to_voxel((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (str)arg6, (float)arg7, (float)arg8, (float)arg9, (int)arg10, (int)arg11, (int)arg12, (float)arg13, (float)arg14, (float)arg15, (bool)arg16) → None:
Create a voxel using direct gridding containing the number of data points in each cell.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – X channel [DB_LOCK_READONLY]
  • arg3 (int) – Y channel [DB_LOCK_READONLY]
  • arg4 (int) – Z channel [DB_LOCK_READONLY]
  • arg5 (int) – Data channel [DB_LOCK_READONLY]
  • arg6 (str) – Output voxel filename
  • arg7 (float) – Voxel origin X
  • arg8 (float) – Voxel origin Y
  • arg9 (float) – Voxel origin Z
  • arg10 (int) – Voxel cell count X
  • arg11 (int) – Voxel cell count Y
  • arg12 (int) – Voxel cell count Z
  • arg13 (float) – Voxel cell size X
  • arg14 (float) – Voxel cell size Y
  • arg15 (float) – Voxel cell size Z
  • arg16 (bool) – Replace zero values in output with DUMMY? bool
Returns:

Nothing

Return type:

None

New in version 8.4.0.

Note:

The Z and Data channels may be array channels. If they are, the array sizes must match.
static direction((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4) → float:
Returns the direction of a line.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database Object
  • arg2 (int) – Line Symbol
  • arg3 (int) – X reference channel [DB_LOCK_READONLY]
  • arg4 (int) – Y reference channel [DB_LOCK_READONLY]
Returns:

direction in degrees azimuth (clockwise relative the +Y direction). GS_R8DM if the line has no data, or if there is a problem. Problems will register errors.

Return type:

float

New in version 5.0.0.

Note:

The direction is calculated from the first and last
non-dummy locations in the X and Y reference channels.
static distance((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5) → None:
Create a distance channel from X and Y.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line symbol
  • arg3 (int) – X channel [DB_LOCK_READONLY]
  • arg4 (int) – Y channel [DB_LOCK_READONLY]
  • arg5 (int) – Output Distance channel [DB_LOCK_READWRITE]
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static distance_3d((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (int)arg7) → None:
Create a distance channel from XY or XYZ with direction options.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line symbol
  • arg3 (int) – X channel [DB_LOCK_READONLY]
  • arg4 (int) – Y channel [DB_LOCK_READONLY]
  • arg5 (int) – Z channel [DB_LOCK_READONLY] (can be NULLSYMB)
  • arg6 (int) – DU_DISTANCE_CHANNEL_TYPE constants
  • arg7 (int) – Output Distance channel [DB_LOCK_READWRITE]
Returns:

Nothing

Return type:

None

New in version 8.1.0.

static distline((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (float_ref)arg5) → None:
Calculate cummulative distance for a line.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line symbol
  • arg3 (int) – X channel [DB_LOCK_READONLY]
  • arg4 (int) – Y channel [DB_LOCK_READONLY]
  • arg5 (geosoft.gxapi.float_ref) – Cummulative distance (retruned)
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static dup_chan_locks((GXDB)arg1, (GXDB)arg2) → None:
Duplicate all channels protect-info from input DB.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static dup_chans((GXDB)arg1, (GXDB)arg2) → None:
Duplicate all channels from input DB.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static edit_duplicates((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (float)arg7) → None:
Edit duplicate readings at individual location
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

All the channels must be of the same fid incr/start and length.
Protected channels are modified automatically.
static export1((GXDB)arg1, (int)arg2, (str)arg3, (GXVV)arg4, (int)arg5, (str)arg6, (int)arg7, (int)arg8) → None:
Export to a specific format.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

For databases with both groups and lines:
If both lines and groups are selected, save only the lines.
If no lines are selected, (only groups), save the current line
if it is (1) a group and (2) selected, else save the first selected
group. ---
Option to filter out data where one of the channels has a dummy in it.
Option to allow a header with the channel names.

The DU_CHANNELS_DISPLAYED option can be used to export any selection of
channels, listed by the symbols (DB_SYMB) values, cast to int values and
stored in a VV.
static export2((GXDB)arg1, (int)arg2, (str)arg3, (GXVV)arg4, (int)arg5, (str)arg6, (int)arg7, (int)arg8, (int)arg9) → None:
Like geosoft.gxapi.GXDU.export1(), but include line names as data.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.6.

Note:

See geosoft.gxapi.GXDU.export1().
The line names are printed as the first column of data exported.
static export_amira((GXDB)arg1, (GXWA)arg2, (str)arg3, (str)arg4, (str)arg5, (str)arg6, (str)arg7, (str)arg8, (str)arg9, (str)arg10, (str)arg11) → None:
Export to database an AMIRA data file.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (geosoft.gxapi.GXWA) – AMIRA data file handle
  • arg3 (str) – Single column channel names, supporting comma (,) separated names of multiple channels, maximum 32 channels
  • arg4 (str) – VA channel name, required
  • arg5 (str) – Optional Time channel name (must be VA channel and same array size as above VA channel)
  • arg6 (str) – Optional Errors channel name (must be VA channel and same array size as above VA channel)
  • arg7 (str) – Mandatory fields: DATATYPE
  • arg8 (str) – UNITS
  • arg9 (str) – CONFIG
  • arg10 (str) – INSTRUMENT
  • arg11 (str) – FREQUENCY
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Other defined FIELDS stored in the database (see geosoft.gxapi.GXDU.import_amira() function)
will be automatically included in the export
static export_aseg((GXDB)arg1, (str)arg2, (GXVV)arg3, (int)arg4, (str)arg5, (str)arg6) → None:
Export to ASEG-GDF format file(s).
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

At least one of the header file
or data file names must be set. (Unset names will get the
same file name, but with the extensions .dfn (header) or
.dat (data).
For databases with both groups and lines:
If both lines and groups are selected, save only the lines.
If no lines are selected, (only groups), save the current line
if it is (1) a group and (2) selected, else save the first selected
group. ---
static export_aseg_proj((GXDB)arg1, (str)arg2, (GXVV)arg3, (int)arg4, (str)arg5, (str)arg6, (str)arg7, (GXIPJ)arg8) → None:
Export to ASEG-GDF format file(s) (supports projections).
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.1.

Note:

At least one of the header file
or data file names must be set. (Unset names will get the
same file name, but with the extensions .dfn (header) or
.dat (data).
For databases with both groups and lines:
If both lines and groups are selected, save only the lines.
If no lines are selected, (only groups), save the current line
if it is (1) a group and (2) selected, else save the first selected
group. ---

This version supports projections
static export_chan_crc((GXDB)arg1, (int)arg2, (int_ref)arg3, (str)arg4) → None:
Export a channel as XML and compute a CRC value.
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.0.0.

Note:

The output file is an XML describing the channel. The
CRC is of the channel data ONLY. To compute a CRC of the
full channel (include metadata) do a CRC of the generated
file.
static export_csv((GXDB)arg1, (str)arg2, (GXVV)arg3, (int)arg4, (str)arg5, (int)arg6, (int)arg7) → None:
Export to a CSV file.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

For databases with both groups and lines:
If both lines and groups are selected, save only the lines.
If no lines are selected, (only groups), save the current line
if it is (1) a group and (2) selected, else save the first selected
group. ---
Option to filter out data where one of the channels has a dummy in it.
Option to allow a header with the channel names.
static export_database_crc((GXDB)arg1, (int_ref)arg2, (str)arg3) → None:
Export a channel as XML and compute a CRC value.
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.0.0.

Note:

The output file is an XML describing the channel. The
CRC is of the channel data ONLY. To compute a CRC of the
full channel (include metadata) do a CRC of the generated
file.
static export_gbn((GXDB)arg1, (GXVV)arg2, (str)arg3) → None:
Export to a GBN data file.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

The iDispChanList_DBE or geosoft.gxapi.GXDB.symb_list() methods can be
used to obtain a list of channels.
static export_geodatabase((GXDB)arg1, (str)arg2, (str)arg3, (GXVV)arg4, (int)arg5, (int)arg6, (int)arg7, (str)arg8) → None:
Export to a ESRI Geodatabase file.
Parameters:
Returns:

Nothing

Return type:

None

New in version 8.0.0.

Note:

Similar to geosoft.gxapi.GXDU.export_gbn(), with the addition that
Groups go to individual tables, and lines go to
a single table, or individual tables, based on the
value of DU_LINEOUT constants
static export_mdb((GXDB)arg1, (str)arg2, (GXVV)arg3, (int)arg4, (int)arg5, (str)arg6) → None:
Export to a Microsoft Access Database (MDB) file.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Similar to geosoft.gxapi.GXDU.export_gbn(), with the addition that
Groups go to individual tables, and lines go to
a single table, or individual tables, based on the
value of DU_LINEOUT constants
static export_shp((GXDB)arg1, (str)arg2, (GXVV)arg3, (int)arg4, (int)arg5, (str)arg6, (GXLST)arg7) → None:
Export to a shape file or files.
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.1.0.

Note:

Similar to geosoft.gxapi.GXDU.export_mdb(), with the addition that groups go to indiviual files
with group name suffixes, and lines go to a single file, or multiple files
with line name suffixes, based on the value of DU_LINEOUT.
static export_xyz((GXDB)arg1, (str)arg2, (str)arg3) → None:
Export XYZdata from a database to an XYZ file.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (str) – export data file name
  • arg3 (str) – export template name
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

1. The export template can be in the local directory or the GEOSOFT
directory.  The import data file must include the path if it is not
in the local directory.

2. Both the import template and data file must exist.

3. Sample Template file

[EXPORT XYZ]
EXPORT     CHAN {,FORMAT} {,WIDTH} {,DECIMAL}
WRITEDUMMY YES
CLIPMAP    YES
MAXPOINTS  1000
INCREMENT  .5

4. This can be used to export a group, but the group must be the
currently displayed line, and only that group will be exported.
static export_xyz2((GXDB)arg1, (GXWA)arg2, (GXRA)arg3) → None:
Export XYZdata from a database to an XYZ file, using file handles.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static fft((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5) → None:
Apply an FFT to space data.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line handle
  • arg3 (int) – space Channel [DB_LOCK_READONLY]
  • arg4 (int) – real Channel [DB_LOCK_READWRITE]
  • arg5 (int) – imaginary Channel [DB_LOCK_READWRITE]
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static filter((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (GXFLT)arg5) → None:
Apply a convolution filter to a channel.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line handle
  • arg3 (int) – Input channel [DB_LOCK_READONLY]
  • arg4 (int) – Output filtered channel [DB_LOCK_READWRITE]
  • arg5 (geosoft.gxapi.GXFLT) – Filter handle (FLT)
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static gen_lev((GXDB)arg1, (str)arg2, (str)arg3, (float)arg4, (int)arg5) → None:
Generate a Level table from an Intersection Table.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (str) – Input Table file Name
  • arg3 (str) – Output Table file Name
  • arg4 (float) – Max. gradient
  • arg5 (int) – DU_LEVEL constants
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static gen_lev_db((GXDB)arg1, (str)arg2, (float)arg3, (int)arg4) → None:
Generate a Level table from an Intersection Database
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.1.0.

Note:

Requires channels with the following names:

ine, TFid, TZ, TDZ
Line, LFid, LZ, LDZ
Mask
static gen_xyz_temp((str)arg1, (str)arg2) → None:
Generate default XYZ template for a XYZ file.
Parameters:
  • arg1 (str) – xyz file name
  • arg2 (str) – template file name to create
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static get_chan_data_lst((GXDB)arg1, (int)arg2, (int)arg3, (GXLST)arg4) → None:
Populate a LST with unique items in a channel.
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.1.0.

Note:

Items from all selected lines are collected,
sorted, and duplicates removed. The output
LST name and value are set to the item values.
Non-string channels are converted internally to
string values using Copy_VV,
so results may differ from what
you may expect given the current channel's display
width and number of decimals.
If a mask channel is selected, then only those items
where the mask channel is not a dummy are collected.
static get_chan_data_vv((GXDB)arg1, (int)arg2, (int)arg3, (GXVV)arg4) → None:
Populate a VV with unique items in a channel.
Parameters:
Returns:

Nothing

Return type:

None

New in version 6.1.0.

Note:

Items from all selected lines are collected,
sorted, and duplicates removed.
The data is collected in the channel's data type,
so normal geosoft.gxapi.GXVV.sort() rules apply.
If the output VV and channel type are not the
same, then the data is converted using the
Copy_VV function, so see that for conversion rules.
If a mask channel is selected, then only those items
where the mask channel is not a dummy are collected.
static get_existing_feature_classes_in_geodatabase((GXDB)arg1, (str)arg2, (GXLST)arg3, (GXVV)arg4) → int:
Searches the geodatabases for an existing Feature class.
Parameters:
Returns:

0 - Feature class does not exist 1 - Feature class exists

Return type:

int

New in version 8.0.0.

Note:

Searches the geodatabases for an existing Feature class
static get_xyz_num_fields((str)arg1, (int_ref)arg2) → None:
Get the number of fields in the XYZ file.
Parameters:
Returns:

Nothing

Return type:

None

New in version 9.1.0.

static gradient((GXDB)arg1, (GXDB)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (int)arg7, (int)arg8, (int)arg9, (float)arg10, (float)arg11) → None:
This method takes 4 channels from input database and
duplicats each line twice to output database)
(input and Output can be the same channel).
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database InPut
  • arg2 (geosoft.gxapi.GXDB) – DAtabase Output
  • arg3 (int) – X Input Channel [DB_LOCK_READONLY]
  • arg4 (int) – Y Input Channel [DB_LOCK_READONLY]
  • arg5 (int) – Z Input Channel [DB_LOCK_READONLY]
  • arg6 (int) – G Input Channel [DB_LOCK_READONLY]
  • arg7 (int) – X Output Channel [DB_LOCK_READWRITE]
  • arg8 (int) – Y Output Channel [DB_LOCK_READWRITE]
  • arg9 (int) – Z Output Channel [DB_LOCK_READWRITE]
  • arg10 (float) – Angle
  • arg11 (float) – Width
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static grav_drift((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (int)arg7) → None:
Calculate base loop closure and correct for drift.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – database
  • arg2 (int) – line [DB_LOCK_READONLY]
  • arg3 (int) – date [DB_LOCK_READONLY]
  • arg4 (int) – local time (on date) [DB_LOCK_READONLY]
  • arg5 (int) – reading [DB_LOCK_READONLY]
  • arg6 (int) – base [DB_LOCK_READWRITE]
  • arg7 (int) – closure error [DB_LOCK_READWRITE]
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static grav_tide((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (float)arg7, (int)arg8) → None:
Calculate earth tide gravity correction.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – database
  • arg2 (int) – line
  • arg3 (int) – lat [DB_LOCK_READONLY]
  • arg4 (int) – long [DB_LOCK_READONLY]
  • arg5 (int) – date [DB_LOCK_READONLY]
  • arg6 (int) – local time (on date) [DB_LOCK_READONLY]
  • arg7 (float) – GMT difference (added to time to give GMT)
  • arg8 (int) – calculated tide [DB_LOCK_READWRITE]
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static grid_load((GXDB)arg1, (GXIMG)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6) → None:
Load grid data to a database.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (geosoft.gxapi.GXIMG) – grid img
  • arg3 (int) – X decimation factor
  • arg4 (int) – Y decimation factor
  • arg5 (int) – 0 trim leading/trailing dummies (default), 1 trim all dummies, 2 leave all dummies
  • arg6 (int) – flag for creating index channel: 0 no (default), 1 yes.
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static grid_load_xyz((GXDB)arg1, (GXIMG)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (int)arg7, (int)arg8, (int)arg9, (int)arg10) → None:
Load grid data to a database using specified channels
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (geosoft.gxapi.GXIMG) – grid img
  • arg3 (int) – X Channel
  • arg4 (int) – Y Channel
  • arg5 (int) – Z Channel
  • arg6 (int) – Data Channel
  • arg7 (int) – X decimation factor
  • arg8 (int) – Y decimation factor
  • arg9 (int) – 0 trim leading/trailing dummies (default), 1 trim all dummies, 2 leave all dummies
  • arg10 (int) – flag for creating index channel: 0 no (default), 1 yes.
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static head((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (GXTB)arg5, (float)arg6) → None:
Applies a heading correction.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – database object
  • arg2 (int) – line Symbol
  • arg3 (int) – channel to correct [DB_LOCK_READONLY]
  • arg4 (int) – corrected channel [DB_LOCK_READWRITE]
  • arg5 (geosoft.gxapi.GXTB) – heading table
  • arg6 (float) – line direction
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Updates channel with Direction in degrees azimuth (counter-clockwise
relative the +Y direction).
GS_R8DM if the line has no data, or if there is a
problem.
static imp_cb_ply((GXDB)arg1, (GXPJ)arg2, (str)arg3, (int)arg4, (int)arg5) → None:
Import concession boundary polygon file into a database
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (geosoft.gxapi.GXPJ) – Projection Files Object
  • arg3 (str) – import data file name
  • arg4 (int) – X channel handle
  • arg5 (int) – Y channel handle
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

The polygon file is provided by Ana Christina in Brasil.
static import_ado((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4, (str)arg5) → None:
Import an external database table into a group using ADO.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (str) – import database connection string (overrides template value)
  • arg3 (str) – imported table in database file (overrides template value)
  • arg4 (str) – import template name
  • arg5 (str) – Oasis montaj line name to create (overrides template value)
Returns:

Nothing

Return type:

None

New in version 5.0.8.

Note:

1. The import template can be in the local directory or the GEOSOFT
directory.

2. Only the import template must be specified. The database connection string,
the database table and Oasis line name are normally taken from the template
file itself, but if these values are provided, they will override those found in the template.

3. If the line already exists, the data will overwrite the existing data.
static import_all_ado((GXDB)arg1, (str)arg2, (int)arg3) → None:
Import an entire external database using ADO.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.8.

Note:

1. For group storage, the table names are imported "as is". For line storage,
if the table names are valid Geosoft line names, they are used as is.
Otherwise, line names will be created with type LINE_NORMAL, starting at
L0 and incrementing by 10 (L10, L20 etc.)

2. If the line exists, the data will overwrite the existing data.

3. All tables and fields will be imported.

4. If connection string is of type "FILENAME=..." the connection will attempt to resolve
it as a file database. (see also ODBCFileConnect_GUI)
static import_all_dao((GXDB)arg1, (str)arg2, (str)arg3, (int)arg4) → None:
Import an entire external database using DAO.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

1. The file is assumed to be a DAO compliant database.

2. The import data file must include the path if it is not
in the local directory.

3. For group storage, the table names are imported "as is". For line storage,
if the table names are valid Geosoft line names, they are used as is.
Otherwise, line names will be created with type LINE_NORMAL, starting at
L0 and incrementing by 10 (L10, L20 etc.)

4. If the line exists, the data will overwrite the existing data.

5. All tables and fields will be imported.

6. The following are valid type strings for DAO:

MSJET       : Microsoft Access
ODBC        : ODBC source
dBASE III
dBASE IV
dBASE 5
FoxPro 2.0
FoxPro 2.5
FoxPro 2.6
Paradox 3.x
Paradox 4.x
Paradox 5.x
static import_amira((GXDB)arg1, (GXRA)arg2, (GXWA)arg3) → None:
Import an AMIRA data file.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

All the constant declarations are stored within the database
under TEMCONSTANTS. The format is as follows:

1. Lines stored in the file beginning with "/" are comments
2. Each constant occupies a line in the file. It uses the format:
CONSTANT=VALUE
static import_aseg((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4, (str)arg5, (int)arg6) → None:
Import an ASEG-GDF data file.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (str) – template file name
  • arg3 (str) – header file name
  • arg4 (str) – data file name
  • arg5 (str) – Flight Line Channel name
  • arg6 (int) – Number of channels to import at one time
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static import_aseg_proj((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4, (str)arg5, (int)arg6, (str)arg7, (str)arg8, (str)arg9) → None:
Import an ASEG-GDF data file (supports projections).
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (str) – template file name
  • arg3 (str) – header file name
  • arg4 (str) – data file name
  • arg5 (str) – Flight Line Channel name
  • arg6 (int) – Number of channels to import at one time
  • arg7 (str) – projection file name
  • arg8 (str) – Channel pair to associate projection
  • arg9 (str) – Channel pair to associate projection
Returns:

Nothing

Return type:

None

New in version 5.0.1.

Note:

This version supports projections
static import_bin((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4, (int)arg5, (float)arg6) → None:
Import blocked binary or archive ASCII data
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (str) – import data file name
  • arg3 (str) – import template name
  • arg4 (str) – Optional Line name (see note 3.)
  • arg5 (int) – Optional Flight number
  • arg6 (float) – Optional date
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

1. Binary import templates have extension .I2 by convention.  See
BINARY.I2 for a description of the template format.
Archive import templates have extension .I3 by convention. See
ARCHIVE.I3 for a description of the template format.

2. Both the import template and data file must exist.

3. If a line already exists in the database, a new version is created
unless a line name is passed in.  In this case, the specified name
is used and the imported channels on the previous line will be
destroyed.
static import_bin2((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4, (int)arg5, (float)arg6, (GXWA)arg7) → None:
Import blocked binary or archive ASCII data with data error display
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (str) – import data file name
  • arg3 (str) – import template name
  • arg4 (str) – Optional Line name (see note 3.)
  • arg5 (int) – Optional Flight number
  • arg6 (float) – Optional date
  • arg7 (geosoft.gxapi.GXWA) – WA
Returns:

Nothing

Return type:

None

New in version 5.1.6.

Note:

1. Binary import templates have extension .I2 by convention.  See
BINARY.I2 for a description of the template format.
Archive import templates have extension .I3 by convention. See
ARCHIVE.I3 for a description of the template format.

2. Both the import template and data file must exist.

3. If a line already exists in the database, a new version is created
unless a line name is passed in.  In this case, the specified name
is used and the imported channels on the previous line will be
destroyed.
static import_bin3((GXDB)arg1, (str)arg2, (str)arg3, (str_ref)arg4, (int)arg5, (float)arg6, (GXWA)arg7) → None:
Same as geosoft.gxapi.GXDU.import_bin2(), but returns the name of the imported line.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (str) – import data file name
  • arg3 (str) – import template name
  • arg4 (geosoft.gxapi.str_ref) – Optional Line name (on return, the actual line)
  • arg5 (int) – Optional Flight number
  • arg6 (float) – Optional date
  • arg7 (geosoft.gxapi.GXWA) – WA
Returns:

Nothing

Return type:

None

New in version 6.1.0.

Note:

See geosoft.gxapi.GXDU.import_bin2(). Because the name of the created line is
not necessarily the value passed in (and the value passed in
can be blank), this version returns the name of the line
to which the data is actually imported.
static import_bin4((GXDB)arg1, (int)arg2, (str)arg3, (str)arg4, (str)arg5, (int)arg6, (float)arg7, (GXWA)arg8) → None:
Same as geosoft.gxapi.GXDU.import_bin2() but with an import mode
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – DU_IMPORT constants
  • arg3 (str) – import data file name
  • arg4 (str) – import template name
  • arg5 (str) – Optional Line name (see note 3.)
  • arg6 (int) – Optional Flight number
  • arg7 (float) – Optional date
  • arg8 (geosoft.gxapi.GXWA) – WA
Returns:

Nothing

Return type:

None

New in version 9.1.0.

Note:

Same as geosoft.gxapi.GXDU.import_bin2() but with an import mode
static import_daarc500_serial((GXDB)arg1, (int)arg2, (str)arg3, (int)arg4, (int)arg5) → None:
Import Serial data from the RMS Instruments DAARC500.
Parameters:
Returns:

Nothing

Return type:

None

New in version 7.2.0.

Note:

Imports data stored in a serial channel recorded
by the RMS Instruments DAARC500 instrument, and outputs the data to
a line in the database. The channels created depend on the input data type
static import_daarc500_serial_gps((GXDB)arg1, (int)arg2, (str)arg3, (int)arg4) → None:
Import Serial GPS data from the RMS Instruments DAARC500.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database object
  • arg2 (int) – Output line (DB_LOCK_READWRITE)
  • arg3 (str) – Name of file to import
  • arg4 (int) – Channel to import, 1-8
Returns:

Nothing

Return type:

None

New in version 7.2.0.

Note:

Imports GPS data stored in a serial channel recorded
by the RMS Instruments DAARC500 instrument, and outputs the data to
a line in the database. Makes the following channels:

Fid, UTC_Time, Latitude, Longitude, Altitude, GPS_Quality,
NumSat (Number of satellites), GPS_HDOP (Horizontal Dilution of Position),
Undulation, GPS_DiffAge (Age of differential channel).
static import_dao((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4, (str)arg5, (str)arg6) → None:
Import an external database table into a group using DAO.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (str) – import database file name (overrides template value)
  • arg3 (str) – import data file type (overrides template value)
  • arg4 (str) – imported table in database file (overrides template value)
  • arg5 (str) – import template name
  • arg6 (str) – Oasis Montaj line name to create (overrides template value)
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

1. The import template can be in the local directory or the GEOSOFT
directory.  The import data file must include the path if it is not
in the local directory.

2. Only the import template must be specified. The database file name,
file type, the database table and Oasis line name are normally
taken from the template file itself, but if these values are provided,
they will override those found in the template.

3. If the line already exists, the data will overwrite the existing data.
static import_esri((GXDB)arg1, (str)arg2, (str)arg3, (str)arg4) → None:
Import an ArcGIS Geodatabase table or feature class into a GDB group
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (str) – import database connection string (e.g. “d:\Personal\test.mdb|Table” or “d:\File\test.gdb|FeatureClass, overrides template value)
  • arg3 (str) – import template name
  • arg4 (str) – Oasis montaj line name to create (overrides template value)
Returns:

Nothing

Return type:

None

New in version 7.1.0.

Note:

1. The import template can be in the local directory or the GEOSOFT
directory.

2. Only the import template must be specified. The Geodatabase connection string
and Oasis line name are normally taken from the template file itself,
but if these values are provided, they will override those found in the template.

3. If the line already exists, the data will overwrite the existing data.
static import_gbn((GXDB)arg1, (str)arg2) → None:
Import GBN data file.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (str) – File name of the GBN file to import
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static import_io_gas((GXDB)arg1, (str)arg2, (str)arg3) → None:
Import data columns from an ioGAS data file.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (str) – Input data.csv file name
  • arg3 (str) – Input template file name
Returns:

Nothing

Return type:

None

New in version 8.5.0.

Note:

1. All columns in the speficied ioGAS data file will be imported.
2. If a line already exists, the data will overwrite the existing data.
static import_oddf((GXDB)arg1, (str)arg2) → None:
Import ODDF data file.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (str) – File name of the ODDF file to import
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static import_pico((GXDB)arg1, (str)arg2, (str)arg3, (int)arg4) → None:
Import a Picodas data file.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (str) – template file name
  • arg3 (str) – data file name
  • arg4 (int) – Number of channels to import at one time
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static import_ubc_mod_msh((GXDB)arg1, (str)arg2, (str)arg3, (int)arg4, (float)arg5) → None:
Import UBC Mod and Msh files.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database Object
  • arg2 (str) – Mesh file
  • arg3 (str) – 1-5 Mod files, delimited with “|
  • arg4 (int) – Import slice direction (0-2 for X,Y and Z)
  • arg5 (float) – Value to interpret as dummy
Returns:

Nothing

Return type:

None

New in version 6.0.0.

Note:

Each slice in X,Y or Z is imported to its own line in the database
beginning with L0.
static import_usgs_post((GXDB)arg1, (str)arg2) → None:
Import USGS Post data file.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (str) – File name of the USGS post file to import
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static import_xyz((GXDB)arg1, (int)arg2, (str)arg3, (str)arg4) → None:
Import XYZ data into the database.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

1. The import template can be in the local directory or the GEOSOFT
directory.  The import data file must include the path if it is not
in the local directory.

2. Both the import template and data file must exist.
static import_xyz2((GXDB)arg1, (int)arg2, (str)arg3, (str)arg4, (GXWA)arg5) → None:
Import XYZ data into the database.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.1.6.

Note:

1. The import template can be in the local directory or the GEOSOFT
directory.  The import data file must include the path if it is not
in the local directory.

2. Both the import template and data file must exist.
static index_order((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4) → None:
Change the order of a channel using an index channel.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line symbol
  • arg3 (int) – ordered index channel (should be int) [DB_LOCK_READONLY]
  • arg4 (int) – channel to reorder [DB_LOCK_READWRITE]
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static interp((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6) → None:
Replace all dummies by interpolating from valid data.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static interp_gap((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (int)arg7, (int)arg8) → None:
Replace all dummies by interpolating from valid data.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line handle
  • arg3 (int) – Channel to interpolate [DB_LOCK_READONLY]
  • arg4 (int) – Output interpolated channel [DB_LOCK_READWRITE]
  • arg5 (int) – DU_INTERP constants
  • arg6 (int) – DU_INTERP_EDGE constants
  • arg7 (int) – Maximum gap to interpolate (fiducials)
  • arg8 (int) – Maximum items to extend at ends.
Returns:

Nothing

Return type:

None

New in version 8.4.0.

static intersect((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (float)arg5, (str)arg6) → None:
Create Tie Line & Normal Line intersect table.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – X Channel [DB_LOCK_READONLY]
  • arg3 (int) – Y Channel [DB_LOCK_READONLY]
  • arg4 (int) – Z Channel [DB_LOCK_READONLY]
  • arg5 (float) – Intersection tolerance
  • arg6 (str) – Output Table file Name
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static intersect_all((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (float)arg5, (str)arg6) → None:
Create line intersect table from all lines.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – X Channel [DB_LOCK_READONLY]
  • arg3 (int) – Y Channel [DB_LOCK_READONLY]
  • arg4 (int) – Z Channel [DB_LOCK_READONLY]
  • arg5 (float) – Intersection tolerance
  • arg6 (str) – Output Table file Name
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static intersect_gd_bto_tbl((str)arg1, (str)arg2) → None:
Create a new intersection table from an intersection database.
Parameters:
  • arg1 (str) – Input Intersection Database name
  • arg2 (str) – Output intersection TBL
Returns:

Nothing

Return type:

None

New in version 7.1.0.

Note:

If the TBL exists, it is overwritten.
static intersect_old((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (str)arg5, (str)arg6) → None:
Use existing intersection table and re-calculate miss-ties.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – X Channel [DB_LOCK_READONLY]
  • arg3 (int) – Y Channel [DB_LOCK_READONLY]
  • arg4 (int) – Z Channel [DB_LOCK_READONLY]
  • arg5 (str) – Input Table file name
  • arg6 (str) – Output Table file Name
Returns:

Nothing

Return type:

None

New in version 5.1.4.

Note:

Reads intersection information from an existing intersect
table and looks up the values at the intersections for the
input Z channel. This makes it unnecessary to re-calculate
the intersections every time if you want to determine
miss-ties using different Z channels, or the same Z channel
after processing levelling corrections. Existing intersections
whose locations do not exist in the database are ignored.
static intersect_tb_lto_gdb((str)arg1, (str)arg2) → None:
Create a new intersection database from an intersection table.
Parameters:
  • arg1 (str) – Input intersection TBL
  • arg2 (str) – Output Intersection Database name
Returns:

Nothing

Return type:

None

New in version 7.1.0.

Note:

If the GDB exists, it is deleted, so it should not
be loaded.
The database is split by Tie lines (or whatever lines are found in column 3
of the TBL file.
static lab_template((str)arg1, (str)arg2, (int)arg3, (str)arg4, (int)arg5, (int)arg6, (int)arg7, (int)arg8, (int)arg9) → None:
Makes a default template from a lab assay file.
Parameters:
  • arg1 (str) – data file name
  • arg2 (str) – new template name
  • arg3 (int) – DU_LAB_TYPE constants
  • arg4 (str) – delimiter string
  • arg5 (int) – Offset to column labels line (0 for first line)
  • arg6 (int) – Offset to unit labels line, -1 if none
  • arg7 (int) – Offset to first line that contains data
  • arg8 (int) – Sample channel element type, recommend -10 for 10-character ASCII, or GS_LONG for numbers.
  • arg9 (int) – Default channel element type, recommend GS_FLOAT
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

The template can be used to import the file using
sImportBIN_DU.

The first column is assumed to be the sample number.

If the unit label line is the same as the column label
line, column labels are assummed to be followed by
unit labels using the format "Au-ppm", "Au ppm" or
"Au(ppm)".

The number of channels is determined from the number of
columns in the data channel.  If there are more column
labels or unit labels, the last labels are assumed to
be correct.  If there are fewer line labels, default
labels "Col_n", where n is the column number, will be
created and no unit labels will be defined.
static load_gravity((GXDB)arg1, (GXREG)arg2, (int)arg3, (str)arg4) → None:
Load a gravity survey file
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

See GRAVITY.DAT for a description of the file format.

Existing data in the line will be replaced.

The following REG parameters will be set if they appear
in the data file:
default
OPERATOR             ""
DATE                 none
INSTRUMENT           ""
INSTRUMENT_SCALE     "1.0"
BASE_GRAVITY         "0.0"
FORMULA              "1967"
GMT_DIFF             "0.0"
DISTANCE_UNITS       "m"
DENSITY_EARTH        "2.67"
DENSITY_WATER        "1.0"
DENSITY_ICE          "0.95"
MAP_PROJECTION       ""

If the corresponding constant is not specified and the
REG already has the constant defined, it is not changed.
If the constant is not defined and it is not already in
the REG, the indicated default will be set.
static load_ltb((GXDB)arg1, (int)arg2, (GXLTB)arg3, (int)arg4) → None:
Load LTB into a database line.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

A new channel will be created for all LTB fields
that do not already exist.
The LTB field type will be double if all entries can be
converted to double, otherwise it will be a string type
set to the larger of 16 characters or the longest string
in the field.

For _APPEND, the LTB data is simply added the end of each
channel.  geosoft.gxapi.GXDU.re_fid_all_ch() can be used to re-fid data to
match a specifc channel and there-by case all channels to be
the same length before appending data.
static make_fid((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4) → None:
Make a fiducial channel based on an existing channel.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – database object
  • arg2 (int) – line Symbol
  • arg3 (int) – base channel [DB_LOCK_READONLY]
  • arg4 (int) – new fiducial channel [DB_LOCK_READWRITE]
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static mask((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4) → None:
Mask dummies in one channel against another.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line handle
  • arg3 (int) – Channel to mask [DB_LOCK_READWRITE]
  • arg4 (int) – Mask channel [DB_LOCK_READONLY]
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static math((GXDB)arg1, (int)arg2, (GXEXP)arg3) → None:
Apply an expression to the database
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

The MATH_DU method will READWRITE lock channels on the left
side of expressions and READONLY lock channels on the right
side of expressions.  Channels are unlocked before returning.
Therefore, channels on the left side of an expression cannot
be locked READONLY because the geosoft.gxapi.GXDU.math() attempt to lock the
channel READWRITE will fail.  Similarly, channels on the right
side of an expression cannot be locked READWRITE because
geosoft.gxapi.GXDU.math()'s attempt to lock the channels READONLY will fail.

If this is confusing, just make sure no channels used in the
expression are locked before calling geosoft.gxapi.GXDU.math().

See also

geosoft.gxapi.GXEXP.GXH

static merge_line((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5) → None:
Merge a line a the fiducial and copies any data past
that fiducial into the new line.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Input Line1 [DB_LOCK_READONLY]
  • arg3 (int) – Input Line2 [DB_LOCK_READONLY]
  • arg4 (int) – Output Line [DB_LOCK_READWRITE]
  • arg5 (int) – DU_MERGE constants
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static mod_fid_range((GXDB)arg1, (int)arg2, (float)arg3, (float)arg4, (int)arg5, (int)arg6, (int)arg7) → None:
Insert/Append/Delete a range of fids.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – line
  • arg3 (float) – base fid start
  • arg4 (float) – base fid increment
  • arg5 (int) – start index (can be negative)
  • arg6 (int) – number of fids
  • arg7 (int) – DU_MODFID constants
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Channels that do not have the same fid start or fid
increment are not processed.

Protected channels are modified automatically.
static move((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6) → None:
Move/correct a channel to a control channel.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line Handle to Apply this to
  • arg3 (int) – Input channel [DB_LOCK_READONLY]
  • arg4 (int) – Control channel [DB_LOCK_READONLY]
  • arg5 (int) – Result channel [DB_LOCK_READWRITE]
  • arg6 (int) – DU_MOVE constants
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

The input channel is moved to the absolute location
of the control channel.
static nl_filt((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (float)arg6) → None:
This method applies a non-linear filter to the specified
line/channel and places the output in the output channel.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line handle
  • arg3 (int) – Channel to filter [DB_LOCK_READONLY]
  • arg4 (int) – Output filtered channel [DB_LOCK_READWRITE]
  • arg5 (int) – Filter Width
  • arg6 (float) – Filter Tolerance, 0 for 10% of Std. Dev.
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static normal((GXDB)arg1, (int)arg2, (bool)arg3) → None:
Set fid of all channels to match a specified channel.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database handle
  • arg2 (int) – Base Channel for normalization. [DB_LOCK_READONLY]
  • arg3 (bool) – Ignore write protection on channels? bool
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static poly_fill((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (GXPLY)arg6, (int)arg7) → None:
Fill using a polygon with a value of 1.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line Handle
  • arg3 (int) – X Channel [DB_LOCK_READONLY]
  • arg4 (int) – Y Channel [DB_LOCK_READONLY]
  • arg5 (int) – Channel to fill [DB_LOCK_READWRITE]
  • arg6 (geosoft.gxapi.GXPLY) – Polygon Object to use
  • arg7 (int) – DU_FILL constants
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static poly_mask((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (GXPLY)arg6, (int)arg7) → None:
Mask against a polygon.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line Handle
  • arg3 (int) – X Channel [DB_LOCK_READONLY]
  • arg4 (int) – Y Channel [DB_LOCK_READONLY]
  • arg5 (int) – Channel to mask [DB_LOCK_READWRITE]
  • arg6 (geosoft.gxapi.GXPLY) – Polygon Object to use
  • arg7 (int) – DU_MASK constants
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static proj_points((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (int)arg7, (int)arg8, (int)arg9, (int)arg10, (int)arg11, (int)arg12, (int)arg13, (int)arg14, (int)arg15, (int)arg16, (int)arg17, (int)arg18, (int)arg19, (int)arg20) → None:
Project X,Y(Z) channels with different projections
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line Handle to project
  • arg3 (int) – X Input Channel [DB_LOCK_READONLY]
  • arg4 (int) – Y Input Channel [DB_LOCK_READONLY]
  • arg5 (int) – Z Input Channel [DB_LOCK_READONLY] (can be DB_NULL_SYMB)
  • arg6 (int) – X Output Channel [DB_LOCK_READWRITE]
  • arg7 (int) – Y Output Channel [DB_LOCK_READWRITE]
  • arg8 (int) – Z Output Channel [DB_LOCK_READWRITE] (can be DB_NULL_SYMB)
  • arg9 (int) – Input Name Channel [DB_LOCK_READONLY]
  • arg10 (int) – Input Datum Channel [DB_LOCK_READONLY]
  • arg11 (int) – Input Method Channel [DB_LOCK_READONLY]
  • arg12 (int) – Input Unit Channel [DB_LOCK_READONLY]
  • arg13 (int) – Input Local Datum Channel [DB_LOCK_READONLY]
  • arg14 (int) – Output Name Channel [DB_LOCK_READONLY]
  • arg15 (int) – Output Datum Channel [DB_LOCK_READONLY]
  • arg16 (int) – Output Method Channel [DB_LOCK_READONLY]
  • arg17 (int) – Output Unit Channel [DB_LOCK_READONLY]
  • arg18 (int) – Output Local Datum Channel [DB_LOCK_READONLY]
  • arg19 (int) – Error Channel [DB_LOCK_READWRITE]
  • arg20 (int) – Force Local Datum Shifts?
Returns:

Nothing

Return type:

None

New in version 6.3.0.

Note:

Output channels can be the same as input channels
static project_data((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (GXPJ)arg7) → None:
Project X,Y channels
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line Handle to project
  • arg3 (int) – X Input Channel [DB_LOCK_READONLY]
  • arg4 (int) – Y Input Channel [DB_LOCK_READONLY]
  • arg5 (int) – X Output Channel [DB_LOCK_READWRITE]
  • arg6 (int) – Y Output Channel [DB_LOCK_READWRITE]
  • arg7 (geosoft.gxapi.GXPJ) – Projection object to Apply
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Output channels can be the same as input channels
static project_xyz((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (int)arg7, (int)arg8, (GXPJ)arg9) → None:
Project X,Y,Z channels from one system to another.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line Handle to project
  • arg3 (int) – X Input Channel [DB_LOCK_READONLY]
  • arg4 (int) – Y Input Channel [DB_LOCK_READONLY]
  • arg5 (int) – Z Input Channel [DB_LOCK_READONLY]
  • arg6 (int) – X Output Channel [DB_LOCK_READWRITE]
  • arg7 (int) – Y Output Channel [DB_LOCK_READWRITE]
  • arg8 (int) – Z Output Channel [DB_LOCK_READWRITE]
  • arg9 (geosoft.gxapi.GXPJ) – Projection object to Apply
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Output channels can be the same as input channels
static qc_init_separation((GXDB)arg1, (float)arg2, (float)arg3) → None:
Creates the nearest line channels for line separation QC.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (float) – Nominal Line separation
  • arg3 (float) – Nominal Line direction
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

This must be called before QCSeparation_DU. It uses a pager to
establish the relative positions of the selected lines, then,
for every point determines the closest point in another line to
the left and to the right (as determined by looking in the
direction of the line.) These distances are stored to two new
channels in the database, "Closest_Left" and "Closest_Right"
static qc_survey_plan((GXDB)arg1, (GXWA)arg2, (GXPLY)arg3, (float)arg4, (float)arg5, (float)arg6, (float)arg7, (int)arg8, (int)arg9, (float)arg10, (float)arg11, (float)arg12, (float)arg13, (int)arg14, (int)arg15, (int)arg16, (float)arg17, (float)arg18) → int:
Create a database containing proposed survey plan in a PLY
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database to save proposed survey plan
  • arg2 (geosoft.gxapi.GXWA) – WA to save survey plan summary
  • arg3 (geosoft.gxapi.GXPLY) – Boundary PLY
  • arg4 (float) – Survey line spacing
  • arg5 (float) – Survey line azimuth
  • arg6 (float) – Survey line reference X coordinate
  • arg7 (float) – Survey line reference Y coordinate
  • arg8 (int) – Survey line starting number of LINES
  • arg9 (int) – Line number increment for survey line
  • arg10 (float) – Tie line spacing
  • arg11 (float) – Tie line azimuth
  • arg12 (float) – Tie line reference X coordinate
  • arg13 (float) – Tie line reference Y coordinate
  • arg14 (int) – Tie line starting number of LINES
  • arg15 (int) – Line number increment for Tie line
  • arg16 (int) – QC_PLAN_TYPE constants
  • arg17 (float) – Sample spacing (spacing between points in lines)
  • arg18 (float) – Spacing to extend lines outside polygon
Returns:

Nothing

Return type:

int

New in version 5.0.0.

Note:

The LINE on which has the reference (X,Y) will have the starting Line number
The lines on the right hand side of the reference line (while looking
into azimuth of ref. line) have increasing line numbers. The lines
on the left hand side have the decreasing line numbers from the starting
number. Returns an error code or 0 (if successful)
static range_xy((GXDB)arg1, (float_ref)arg2, (float_ref)arg3, (float_ref)arg4, (float_ref)arg5) → None:
Find the range of X, and Y in the selected lines.
Parameters:
Returns:

Nothing

Return type:

None

New in version 8.5.0.

Note:

Returns the range in X and Y of the current X and Y channels.
Returned values are dummy if no valid items are found.
static range_xyz((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (float_ref)arg5, (float_ref)arg6, (float_ref)arg7, (float_ref)arg8, (float_ref)arg9, (float_ref)arg10, (int_ref)arg11) → None:
Find the range of X, Y and Z in selected lines.
Parameters:
Returns:

Nothing

Return type:

None

New in version 8.5.0.

Note:

The X, Y and Z channels should be normal (not array) channels.
Only locations where all values are non-dummy are included in the calculation.
If no non-dummy values are found, Dummy values are returned.
static range_xyz_data((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (float_ref)arg6, (float_ref)arg7, (float_ref)arg8, (float_ref)arg9, (float_ref)arg10, (float_ref)arg11, (float_ref)arg12, (float_ref)arg13, (int_ref)arg14) → None:
Find the range of X, Y, Z and Data values in selected lines.
Parameters:
Returns:

Nothing

Return type:

None

New in version 8.1.0.

Note:

The Z and Data channels may be array channels, but both must have
the same number of columns.
Only values where all channels are non-dummy (or, for VA channels,
where the Z or Data value are defined) are included in the calculation.
If no non-dummy values are found, Dummy values are returned.
This function is optimized for cases where Z and Data are array channels
with many columns (e.g. 32 or more columns).
static re_fid((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (float)arg7, (float)arg8, (float)arg9) → None:
Re-fid a channel based on a reference channel
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database Object
  • arg2 (int) – Line Symbol
  • arg3 (int) – Original Channel [DB_LOCK_READONLY] “Y” values
  • arg4 (int) – Reference Channel [DB_LOCK_READONLY] “X” locations
  • arg5 (int) – Output Channel [DB_LOCK_READWRITE]
  • arg6 (int) – DU_REFID constants
  • arg7 (float) – Start Fid, if GS_R8DM, use ref channel minimum
  • arg8 (float) – Fid increment, if GS_R8DM use nominal spacing of the reference channel.
  • arg9 (float) – Maximum gap to interpolate across
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

The original channel can be an array channel, in which case
the columns (up to the number of columns available in the output)
are individually interpolated. If the number of
columns in the output channel is more than the input channel,
the remaining columns are dummied.

This function is fundamentally different in behaviour from geosoft.gxapi.GXDU.re_fid_ch().
The values in the Reference channel in geosoft.gxapi.GXDU.re_fid() are the "X" locations
corresponding to the "Y" locations in the "Original Channel". Output
Channel values are calculated at the new "X" locations specified by
the Start Fid and the Fid Increment.
static re_fid_all_ch((GXDB)arg1, (int)arg2, (int)arg3) → None:
Simple re-fid of all channels based on a reference channel
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database Object
  • arg2 (int) – Line Symbol
  • arg3 (int) – Reference Channel [DB_LOCK_READONLY]
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Channels can be array channels, in which case
the columns are individually re-fidded.
static re_fid_ch((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4) → None:
Simple re-fid of a channel based on a reference channel
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database Object
  • arg2 (int) – Line Symbol
  • arg3 (int) – Reference Channel [DB_LOCK_READONLY]
  • arg4 (int) – Channel to refid [DB_LOCK_READWRITE]
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

The original channel can be an array channel, in which case
the columns are individually re-fidded.

geosoft.gxapi.GXDU.re_fid_ch() resamples the "Channel to refid" to the "Reference Channel" Fid
range and increment.
static rotate((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (float)arg7, (float)arg8, (float)arg9) → None:
Rotate coordinates.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line symbol
  • arg3 (int) – input X channel [DB_LOCK_READONLY]
  • arg4 (int) – input Y channel [DB_LOCK_READONLY]
  • arg5 (int) – output X channel [DB_LOCK_READWRITE]
  • arg6 (int) – output Y channel [DB_LOCK_READWRITE]
  • arg7 (float) – X point about which to rotate
  • arg8 (float) – Y of point about which to rotate
  • arg9 (float) – angle in degrees CCW
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static sample_gd((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (GXGD)arg6) → None:
Sample a GD at a specified X and Y.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line Handle to sample
  • arg3 (int) – X Input Channel [DB_LOCK_READONLY]
  • arg4 (int) – Y Input Channel [DB_LOCK_READONLY]
  • arg5 (int) – Z Output Channel sampled from GD [DB_LOCK_READWRITE]
  • arg6 (geosoft.gxapi.GXGD) – Grid handle
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Values in result channel
static sample_img((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (GXIMG)arg6) → None:
Sample a IMG at a specified X and Y.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line Handle to sample
  • arg3 (int) – X Input Channel [DB_LOCK_READONLY]
  • arg4 (int) – Y Input Channel [DB_LOCK_READONLY]
  • arg5 (int) – Z Output Channel sampled from IMG [DB_LOCK_READWRITE]
  • arg6 (geosoft.gxapi.GXIMG) – IMG handle
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Values in result channel
static sample_img_line_lst((GXDB)arg1, (GXLST)arg2, (int)arg3, (int)arg4, (int)arg5, (GXIMG)arg6) → None:
Sample an IMG at a specified X and Y, for a LST of lines.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (geosoft.gxapi.GXLST) – LST of (Line Name, Line Handle) values to sample
  • arg3 (int) – X Input Channel [DB_LOCK_READONLY]
  • arg4 (int) – Y Input Channel [DB_LOCK_READONLY]
  • arg5 (int) – Z Output Channel sampled from IMG [DB_LOCK_READWRITE]
  • arg6 (geosoft.gxapi.GXIMG) – IMG handle
Returns:

Nothing

Return type:

None

New in version 8.3.0.

Note:

Values in result channel
static scan_ado((str)arg1, (str)arg2, (str)arg3) → None:
Scans an external ADO database and generates a default template.
Parameters:
  • arg1 (str) – Database connection string
  • arg2 (str) – Database Table Name
  • arg3 (str) – Template file name to Create
Returns:

Nothing

Return type:

None

New in version 5.0.8.

Note:

All the channels are listed
static scan_aseg((str)arg1, (str)arg2, (str)arg3, (str)arg4) → None:
This method scans an ASEG-GDF file and generates a default
template listing all the channels and all the ALIAS lines.
Parameters:
  • arg1 (str) – header file name
  • arg2 (str) – data file name
  • arg3 (str) – Flight Line Channel name
  • arg4 (str) – Template file name to Create
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static scan_dao((str)arg1, (str)arg2, (str)arg3, (str)arg4) → None:
Scans an external DAO database and generates a default template.
Parameters:
  • arg1 (str) – Database file name
  • arg2 (str) – Database Type
  • arg3 (str) – Database Table Name
  • arg4 (str) – Template file name to Create
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

All the channels are listed
static scan_pico((str)arg1, (str)arg2) → None:
This method scans a picodas file and generates a default
template listing all the channels and all the ALIAS lines.
Parameters:
  • arg1 (str) – Data file Name
  • arg2 (str) – Template file name to Create
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static sort((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4) → None:
Sort the contents of a channel.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static sort_index((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5) → None:
Create an ordered index of the contents of a channel.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line symbol
  • arg3 (int) – channel to sort [DB_LOCK_READONLY]
  • arg4 (int) – output index channel (should be int) [DB_LOCK_READWRITE]
  • arg5 (int) – DU_SORT constants
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static sort_index2((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (int)arg7) → None:
Create an ordered index from two channels
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line symbol
  • arg3 (int) – Sort by this channel [DB_LOCK_READONLY]
  • arg4 (int) – DU_SORT constants
  • arg5 (int) – Then by this channel [DB_LOCK_READONLY]
  • arg6 (int) – DU_SORT constants
  • arg7 (int) – output index channel (should be int) [DB_LOCK_READWRITE]
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static split_line((GXDB)arg1, (int)arg2, (int)arg3, (float)arg4) → None:
Splits a line a the fiducial and copies any data past
that fiducial into the new line.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Input Line, will be reduced at fid [DB_LOCK_READWRITE]
  • arg3 (int) – Output Line, will take data above fid [DB_LOCK_READWRITE]
  • arg4 (float) – Fid number of split
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static split_line2((GXDB)arg1, (int)arg2, (int)arg3, (float)arg4, (int)arg5) → None:
Splits a line a the fiducial and copies any data past
that fiducial into the new line.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Input Line, will be reduced at fid [DB_LOCK_READWRITE]
  • arg3 (int) – Output Line, will take data above fid [DB_LOCK_READWRITE]
  • arg4 (float) – Fid number of split
  • arg5 (int) – Reset starting fiducials to zero (0: No, 1: Yes)
Returns:

Nothing

Return type:

None

New in version 8.4.0.

Note:

The same as SplitLine, but with an option to reset each line's starting fiducial to zero.
static split_line_by_direction((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (float)arg5, (float)arg6, (float)arg7, (float)arg8, (bool)arg9, (int)arg10, (int_ref)arg11, (int)arg12, (int)arg13) → None:
The line is split when the heading (calculated from the current X and Y channels) changes by more than a specified amount over
a specified distance. Additional options to discard too-short lines
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line to be broken up [DB_LOCK_READONLY]
  • arg3 (int) – X Channel [DB_LOCK_READWRITE].
  • arg4 (int) – Y Channel [DB_LOCK_READWRITE].
  • arg5 (float) – Maximum angular change allowed (degrees)...
  • arg6 (float) – ...over a distance of
  • arg7 (float) – Delete lines shorter than (can be rDUMMY)
  • arg8 (float) – Break on data XY separation greater than (can be rDUMMY)
  • arg9 (bool) – bool``True`` to save too-short segments as special lines, False to discard
  • arg10 (int) – DU_SPLITLINE constants ONLY DU_SPLITLINEXY_SEQUENTIAL and DU_SPLITLINEXY_VERSIONS
  • arg11 (geosoft.gxapi.int_ref) – First line in the sequence, for DU_SPLITLINE_SEQUENTIAL. On return, the next line in the sequence.
  • arg12 (int) – Increment in the line number sequence, for DU_SPLITLINE_SEQUENTIAL
  • arg13 (int) – Reset starting fiducials to zero (0: No, 1: Yes)
Returns:

Nothing

Return type:

None

New in version 8.5.0.

Note:

Split a line based on changes in heading.
static split_line_by_direction2((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (float)arg5, (float)arg6, (float)arg7, (float)arg8, (bool)arg9, (int)arg10, (int_ref)arg11, (int)arg12, (int)arg13, (int)arg14) → None:
The same as SplitLineByDirection, but with the option to maintain line types when outputting sequentially numbered lines.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line to be broken up [DB_LOCK_READONLY]
  • arg3 (int) – X Channel [DB_LOCK_READWRITE].
  • arg4 (int) – Y Channel [DB_LOCK_READWRITE].
  • arg5 (float) – Maximum angular change allowed (degrees)...
  • arg6 (float) – ...over a distance of
  • arg7 (float) – Delete lines shorter than (can be rDUMMY)
  • arg8 (float) – Break on data XY separation greater than (can be rDUMMY)
  • arg9 (bool) – bool``True`` to save too-short segments as special lines, False to discard
  • arg10 (int) – DU_SPLITLINE constants ONLY DU_SPLITLINEXY_SEQUENTIAL and DU_SPLITLINEXY_VERSIONS
  • arg11 (geosoft.gxapi.int_ref) – First line in the sequence, for DU_SPLITLINE_SEQUENTIAL. On return, the next line in the sequence.
  • arg12 (int) – Increment in the line number sequence, for DU_SPLITLINE_SEQUENTIAL
  • arg13 (int) – Maintain line types for DU_SPLITLINE_SEQUENTIAL (0: No, 1: Yes)
  • arg14 (int) – Reset starting fiducials to zero (0: No, 1: Yes)
Returns:

Nothing

Return type:

None

New in version 9.0.0.

Note:

Split a line based on changes in heading.
static split_line_xy((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (float)arg6, (float)arg7, (int)arg8, (int_ref)arg9, (int)arg10) → None:
Break up a line based on tolerance of lateral and horizontal distance, with
options for the output line names.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line to be broken up [DB_LOCK_READONLY]
  • arg3 (int) – Channel X [DB_LOCK_READWRITE]
  • arg4 (int) – Channel Y [DB_LOCK_READWRITE]
  • arg5 (int) – Line direction, 0-any, 1-X, 2-Y.
  • arg6 (float) – Lateral tolerance, DUMMY for the default (10% of the separation between the first two points.
  • arg7 (float) – Downline Tolerance, DUMMY for none
  • arg8 (int) – DU_SPLITLINE constants
  • arg9 (geosoft.gxapi.int_ref) – First line in the sequence, for DU_SPLITLINE_SEQUENTIAL. On return, the next line in the sequence.
  • arg10 (int) – Increment in the line number sequence, for DU_SPLITLINE_SEQUENTIAL
Returns:

Nothing

Return type:

None

New in version 8.3.0.

Note:

The original line will be deleted.
static split_line_xy2((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (float)arg6, (float)arg7, (int)arg8, (int_ref)arg9, (int)arg10, (int)arg11) → None:
Break up a line based on tolerance of lateral and horizontal distance, with
options for the output line names.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line to be broken up [DB_LOCK_READONLY]
  • arg3 (int) – Channel X [DB_LOCK_READWRITE]
  • arg4 (int) – Channel Y [DB_LOCK_READWRITE]
  • arg5 (int) – Line direction, 0-any, 1-X, 2-Y.
  • arg6 (float) – Lateral tolerance, DUMMY for the default (10% of the separation between the first two points.
  • arg7 (float) – Downline Tolerance, DUMMY for none
  • arg8 (int) – DU_SPLITLINE constants
  • arg9 (geosoft.gxapi.int_ref) – First line in the sequence, for DU_SPLITLINE_SEQUENTIAL. On return, the next line in the sequence.
  • arg10 (int) – Increment in the line number sequence, for DU_SPLITLINE_SEQUENTIAL
  • arg11 (int) – Reset starting fiducials to zero (0: No, 1: Yes)
Returns:

Nothing

Return type:

None

New in version 8.4.0.

Note:

The same as SplitLineXY, but with an option to reset each line's starting fiducial to zero.
static split_line_xy3((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (float)arg6, (float)arg7, (int)arg8, (int_ref)arg9, (int)arg10, (int)arg11, (int)arg12) → None:
Break up a line based on tolerance of lateral and horizontal distance, with
options for the output line names.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line to be broken up [DB_LOCK_READONLY]
  • arg3 (int) – Channel X [DB_LOCK_READWRITE]
  • arg4 (int) – Channel Y [DB_LOCK_READWRITE]
  • arg5 (int) – Line direction, 0-any, 1-X, 2-Y.
  • arg6 (float) – Lateral tolerance, DUMMY for the default (10% of the separation between the first two points.
  • arg7 (float) – Downline Tolerance, DUMMY for none
  • arg8 (int) – DU_SPLITLINE constants
  • arg9 (geosoft.gxapi.int_ref) – First line in the sequence, for DU_SPLITLINE_SEQUENTIAL. On return, the next line in the sequence.
  • arg10 (int) – Increment in the line number sequence, for DU_SPLITLINE_SEQUENTIAL
  • arg11 (int) – Maintain line types for DU_SPLITLINE_SEQUENTIAL (0: No, 1: Yes)
  • arg12 (int) – Reset starting fiducials to zero (0: No, 1: Yes)
Returns:

Nothing

Return type:

None

New in version 9.0.0.

Note:

The same as SplitLineXY2, but with the option to maintain line types when outputting sequentially numbered lines.
static stat((GXDB)arg1, (int)arg2, (int)arg3, (GXST)arg4) → None:
Add a data channel to a statistics object.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

If the input channel is a VA (array) channel, then the columns set using
geosoft.gxapi.GXDB.set_va_windows()() are used in the statistics; all columns are used by default.
static table_line_fid((GXDB)arg1, (int)arg2, (int)arg3, (GXTB)arg4, (int)arg5) → None:
Place a Line/Fid information into a Channel.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Output channel [DB_LOCK_READWRITE]
  • arg3 (int) – Reference channel [DB_LOCK_READONLY]
  • arg4 (geosoft.gxapi.GXTB) – Table to Use
  • arg5 (int) – Table field wanted
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static table_look1((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (str)arg5, (str)arg6, (int)arg7, (float)arg8, (GXTB)arg9) → None:
Create a new channel using a single reference table
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line Handle
  • arg3 (int) – Lookup reference channel [DB_LOCK_READONLY]
  • arg4 (int) – Output Channel Token [DB_LOCK_READWRITE]
  • arg5 (str) – Reference field name in table
  • arg6 (str) – Lookup output name in table
  • arg7 (int) – DU_LOOKUP constants
  • arg8 (float) – CLOSE lookup distance. If 0.0, distance is calculated from lookup reference channel.
  • arg9 (geosoft.gxapi.GXTB) – TB table Object
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Fails if table does not contain requested fields.
The nominal data sample spacing for the CLOSE options is
calculated by finding the fiducial increment the
- primary index channel for Lookup1C_DU;
- secondary index channel for Lookup2C_DU, LookupIValC_DU
and LookupRValC_DU
static table_look2((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (str)arg6, (str)arg7, (str)arg8, (int)arg9, (float)arg10, (GXTB)arg11) → None:
Create a new channel using a double reference  table.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line Handle
  • arg3 (int) – Primary reference channel [DB_LOCK_READONLY]
  • arg4 (int) – Secondary reference channel [DB_LOCK_READONLY]
  • arg5 (int) – Output channel [DB_LOCK_READWRITE]
  • arg6 (str) – Primary reference field name in table
  • arg7 (str) – Secondary reference field name in table
  • arg8 (str) – Lookup result field name in table
  • arg9 (int) – DU_LOOKUP constants
  • arg10 (float) – CLOSE lookup distance. If 0.0, distance is calculated from secondary reference channel.
  • arg11 (geosoft.gxapi.GXTB) – Table Object
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Fails if table does not contain requested fields.
The nominal data sample spacing for the CLOSE options is
calculated by finding the fiducial increment the
- primary index channel for Lookup1C_DU;
- secondary index channel for Lookup2C_DU, LookupIValC_DU
and LookupRValC_DU
static table_look_i2((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (str)arg6, (str)arg7, (str)arg8, (int)arg9, (float)arg10, (GXTB)arg11) → None:
Create a new channel using constant integer primary
reference and a secondary reference table.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line Handle
  • arg3 (int) – Lookup primary reference value
  • arg4 (int) – Lookup secondary reference channel [DB_LOCK_READONLY]
  • arg5 (int) – Output Channel Token [DB_LOCK_READWRITE]
  • arg6 (str) – Primary reference field name in table
  • arg7 (str) – Secondary reference field name in table
  • arg8 (str) – Lookup result field name in table
  • arg9 (int) – DU_LOOKUP constants
  • arg10 (float) – CLOSE lookup distance. If 0.0, distance calculated from secondary reference channel.
  • arg11 (geosoft.gxapi.GXTB) – Table Object
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Fails if table does not contain requested fields.
The nominal data sample spacing for the CLOSE options is
calculated by finding the fiducial increment the
- primary index channel for Lookup1C_DU;
- secondary index channel for Lookup2C_DU, LookupIValC_DU
and LookupRValC_DU
static table_look_r2((GXDB)arg1, (int)arg2, (float)arg3, (int)arg4, (int)arg5, (str)arg6, (str)arg7, (str)arg8, (int)arg9, (float)arg10, (GXTB)arg11) → None:
Create a new channel using a constant real primary
reference and a secondary reference table.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line Handle
  • arg3 (float) – Primary reference value
  • arg4 (int) – Secondary reference value [DB_LOCK_READONLY]
  • arg5 (int) – Output Channel Token [DB_LOCK_READWRITE]
  • arg6 (str) – Primary reference field name in table
  • arg7 (str) – Secondary reference field name in table
  • arg8 (str) – Lookup result field name in table
  • arg9 (int) – DU_LOOKUP constants
  • arg10 (float) – CLOSE lookup distance. If 0.0, distance calculated from secondary reference channel.
  • arg11 (geosoft.gxapi.GXTB) – Table Object
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Fails if table does not contain requested fields.
The nominal data sample spacing for the CLOSE options is
calculated by finding the fiducial increment the
- primary index channel for Lookup1C_DU;
- secondary index channel for Lookup2C_DU, LookupIValC_DU
and LookupRValC_DU
static table_selected_lines_fid((GXDB)arg1, (int)arg2, (int)arg3, (GXTB)arg4, (int)arg5) → None:
Place a Line/Fid information into a Channel for the selected lines in the database.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Output channel [DB_LOCK_READWRITE]
  • arg3 (int) – Reference channel [DB_LOCK_READONLY]
  • arg4 (geosoft.gxapi.GXTB) – Table to Use
  • arg5 (int) – Table field wanted
Returns:

Nothing

Return type:

None

New in version 9.1.0.

static time_constant((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (int)arg7, (int)arg8) → None:
Calculate TEM time constant (Tau)
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database, required
  • arg2 (int) – Line Handle, required
  • arg3 (int) – Response channel, required [DB_LOCK_READONLY]
  • arg4 (int) – Time channel, required [DB_LOCK_READONLY]
  • arg5 (int) – Output Time constant (Tau) channel, required [DB_LOCK_READWRITE]
  • arg6 (int) – Output Intercept channel, no output if NULLSYMB [DB_LOCK_READWRITE]
  • arg7 (int) – Output predicted response channel, no output if NULLSYMB [DB_LOCK_READWRITE] Result is based on least square fit from Tau and Intercept
  • arg8 (int) – Log option applied to time channel: 0 - linear, 1 - log10
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

When DU_TIME_LOG option is used, Time channel will be converted
with logarithmic before calculating time constant.
Logarthmic conversion is always applied to the response channel.
static trend((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5) → None:
Calculates an n'th order trend of a data channel.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line Handle to Apply this to
  • arg3 (int) – Input channel [DB_LOCK_READONLY]
  • arg4 (int) – Result channel [DB_LOCK_READWRITE]
  • arg5 (int) – Trend Order, 0 to 9
Returns:

Nothing

Return type:

None

New in version 5.0.0.

static update_intersect_db((GXDB)arg1, (int)arg2, (int)arg3, (GXDB)arg4) → None:
Update the Z and DZ values in an intersection database, using the current database.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Flight Database Object
  • arg2 (int) – X Channel [DB_LOCK_READONLY] (for location info)
  • arg3 (int) – Z Channel [DB_LOCK_READONLY]
  • arg4 (geosoft.gxapi.GXDB) – Intersection database to update
Returns:

Nothing

Return type:

None

New in version 7.1.0.

Note:

Updates the TZ, TDZ, LZ and LDZ channels at the intersections,
using the current flight database.
static voxel_section((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (GXVOX)arg5, (str)arg6, (float)arg7, (float)arg8, (int)arg9) → None:
Slice a voxel to a grid under a database line.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database Object
  • arg2 (int) – Input Line Symbol [READWRITE]
  • arg3 (int) – X Channel (DB_NO_SYMB if LineDir==0)
  • arg4 (int) – Y Channel (DB_NO_SYMB if LineDir==0)
  • arg5 (geosoft.gxapi.GXVOX) – Voxel to slice
  • arg6 (str) – Output grid name
  • arg7 (float) – X cell size (horizontal)
  • arg8 (float) – Y cell size (vertical)
  • arg9 (int) – Interp: 1 - linear, 0 - nearest
Returns:

Nothing

Return type:

None

New in version 6.4.0.

Note:

Takes the first and XY locations in a line (using the
current X and Y channels) and defines a section grid
as a slice through a voxel file.
The grid cell sizes can be left as GS_R8DM, in which
case an attempt will be made to match the voxel cell
size, based on the line azimuth, voxel rotation, etc.

If the slice does NOT intersect the voxel, or if
there are fewer than 2 valid locations in the line,
then no grid file is created, but there is no error.
(This is to simplify creating multiple grids from
at once, where not all may intersect).
static write_wa((GXDB)arg1, (int)arg2, (GXLST)arg3, (GXWA)arg4) → None:
Write data to an ASCII file.
Parameters:
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

Channels to be written should be placed in a LST object.

Channels are written in the order of the list.  Only the
channel names in the list are used.

Data is formated as in the channel definition and
channels are separated by a single space character.
static xyz_line((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (float)arg6) → None:
Break up a line based on tolerance of lateral distance.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line to be broken up
  • arg3 (int) – Channel X
  • arg4 (int) – Channel Y
  • arg5 (int) – Line direction, 0-any, 1-X, 2-Y.
  • arg6 (float) – Tolerance, DUMMY for the default (10% of the separation between the first two points.
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

The original line will be deleted.
static xyz_line2((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (float)arg6, (float)arg7) → None:
Break up a line based on tolerance of lateral and horizontal distance.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line to be broken up [DB_LOCK_READONLY]
  • arg3 (int) – Channel X [DB_LOCK_READWRITE]
  • arg4 (int) – Channel Y [DB_LOCK_READWRITE]
  • arg5 (int) – Line direction, 0-any, 1-X, 2-Y.
  • arg6 (float) – Tolerance, DUMMY for the default (10% of the separation between the first two points.
  • arg7 (float) – Downline Tolerance, DUMMY for none
Returns:

Nothing

Return type:

None

New in version 5.0.0.

Note:

The original line will be deleted.
static xyz_line3((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (float)arg6, (float)arg7, (int)arg8) → None:
Break up a line based on tolerance of lateral and horizontal distance.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line to be broken up [DB_LOCK_READONLY]
  • arg3 (int) – Channel X [DB_LOCK_READWRITE]
  • arg4 (int) – Channel Y [DB_LOCK_READWRITE]
  • arg5 (int) – Line direction, 0-any, 1-X, 2-Y.
  • arg6 (float) – Tolerance, DUMMY for the default (10% of the separation between the first two points.
  • arg7 (float) – Downline Tolerance, DUMMY for none
  • arg8 (int) – Reset starting fiducials to zero (0: No, 1: Yes)
Returns:

Nothing

Return type:

None

New in version 8.4.0.

Note:

The same as XyzLine2, but with an option to reset each line's starting fiducial to zero.
static z_mask((GXDB)arg1, (int)arg2, (int)arg3, (int)arg4, (float)arg5, (float)arg6) → None:
Mask dummies in one channel against another(Z) with the range Zmin/Zmax.
Parameters:
  • arg1 (geosoft.gxapi.GXDB) – Database
  • arg2 (int) – Line Handle
  • arg3 (int) – Channel to mask [DB_LOCK_READWRITE]
  • arg4 (int) – Mask Channel [DB_LOCK_READONLY]
  • arg5 (float) – Min value of mask range
  • arg6 (float) – Max value of mask range
Returns:

Nothing

Return type:

None

New in version 5.0.0.

DB_DUP constants

Duplicate Types
gxapi.DB_DUP_FIRST = 1
gxapi.DB_DUP_AVERAGE = 2
gxapi.DB_DUP_MINIMUM = 3
gxapi.DB_DUP_MAXIMUM = 4
gxapi.DB_DUP_MEDIAN = 5
gxapi.DB_DUP_LAST = 6

DB_DUPEDIT constants

Duplicate Edit Flags
gxapi.DB_DUPEDIT_SINGLE = 0
gxapi.DB_DUPEDIT_ALL = 1

DU_CHANNELS constants

Channels to Display
gxapi.DU_CHANNELS_DISPLAYED = 0
gxapi.DU_CHANNELS_ALL = 1

DU_EXPORT constants

Export Type
gxapi.DU_EXPORT_CSV = 0
gxapi.DU_EXPORT_ODDF = 1
gxapi.DU_EXPORT_POST_PC = 2
gxapi.DU_EXPORT_POST_UNIX = 3

DU_FILL constants

Filling Options
gxapi.DU_FILL_INSIDE = 0
gxapi.DU_FILL_OUTSIDE = 1

DU_IMPORT constants

Import Mode
gxapi.DU_IMPORT_APPEND = 0
gxapi.DU_IMPORT_REPLACE = 1
gxapi.DU_IMPORT_MERGE = 2
gxapi.DU_IMPORT_MERGE_APPEND = 3

DU_INTERP constants

Inside Interpolation Method
gxapi.DU_INTERP_NEAREST = 1
gxapi.DU_INTERP_LINEAR = 2
gxapi.DU_INTERP_CUBIC = 3
gxapi.DU_INTERP_AKIMA = 4
gxapi.DU_INTERP_PREDICT = 5

DU_INTERP_EDGE constants

Edge Interpolation Method
gxapi.DU_INTERP_EDGE_NONE = 0
gxapi.DU_INTERP_EDGE_SAME = 1
gxapi.DU_INTERP_EDGE_NEAREST = 2
gxapi.DU_INTERP_EDGE_LINEAR = 3

DU_LAB_TYPE constants

File Types
gxapi.DU_LAB_TYPE_FREE = 1
The delimiter string identifies
characters to be used as delimiters.  Use C style escape
sequences to identify non-printable characters.  The
default delimiters for FREE format files are " \t,".
gxapi.DU_LAB_TYPE_COMMA = 2
For COMMA type files, the delimiter string identifies
characters to be removed before comma delimiting.  The
default for COMMA delimited files is " \t".

DU_LEVEL constants

Leveling Options
gxapi.DU_LEVEL_LINES = 0
extract line corrections
gxapi.DU_LEVEL_TIES = 1
extract tie corrections
gxapi.DU_LEVEL_ALL = 2
extract all corrections

DU_LINEOUT constants

Lineout Options (du.h)
gxapi.DU_LINEOUT_SINGLE = 0
gxapi.DU_LINEOUT_MULTIPLE = 1

DU_FEATURE_TYPE_OUTPUT constants

Export to geodatabase feature type (du.h)
gxapi.DU_FEATURE_TYPE_OUTPUT_POINT = 0
gxapi.DU_FEATURE_TYPE_OUTPUT_LINE = 1

DU_GEODATABASE_EXPORT_TYPE constants

Export to geodatabase overwrite mode(du.h)
gxapi.DU_GEODATABASE_EXPORT_TYPE_OVERWRITE_GEODATABASE = 0
gxapi.DU_GEODATABASE_EXPORT_TYPE_OVERWRITE_FEATURECLASS = 1
gxapi.DU_GEODATABASE_EXPORT_TYPE_APPEND = 2

DU_LINES constants

Lines to display
gxapi.DU_LINES_DISPLAYED = 0
gxapi.DU_LINES_SELECTED = 1
gxapi.DU_LINES_ALL = 2

DU_LOADLTB constants

Load table options
gxapi.DU_LOADLTB_REPLACE = 0
gxapi.DU_LOADLTB_APPEND = 1

DU_LOOKUP constants

Lookup Mode
gxapi.DU_LOOKUP_EXACT = 0
Requires an exact match in all indexes.
Results will dummy if Indexes are not found.
gxapi.DU_LOOKUP_NEAREST = 1
Requires that the first index match exactly.
The nearest second index will be used for the finding
the lookup value.
The results will be dummy only if the first index
does not have a match.
gxapi.DU_LOOKUP_INTERPOLATE = 2
The same as _NEAREST, except that the value will
be interpolated between the two nearest
framing values in the table.
gxapi.DU_LOOKUP_NEARESTCLOSE = 3
Same as _NEAREST mode except that the target
value must be within the CLOSE distance to a
table value.
a) the primary index channel for single index
lookups;
b) the secondary index channel for
double index lookups.
Values not in data spacing are dummy.
gxapi.DU_LOOKUP_INTERPCLOSE = 4
Same as _INTERPOLATE mode except that the target
value must be within the CLOSE distance to a
table value.
a) the primary index channel for single index
lookups;
b) the secondary index channel for
double index lookups.
Values not in data spacing are dummy.
gxapi.DU_LOOKUP_INTERPOLATE_DUMMYOUTSIDE = 5
Interpolate between values, dummy beyond two ends
gxapi.DU_LOOKUP_INTERPOLATE_CONSTOUTSIDE = 6
Interpolate between values, constant end values beyond two ends
gxapi.DU_LOOKUP_INTERPOLATE_EXTPLOUTSIDE = 7
Interpolate between values, extrapolate beyond two ends
gxapi.DU_LOOKUP_MAXOPTION = 8
Maximum option value

DU_MASK constants

Masking Options
gxapi.DU_MASK_INSIDE = 0
gxapi.DU_MASK_OUTSIDE = 1

DU_MERGE constants

Merge flags
gxapi.DU_MERGE_APPEND = 0

DU_MODFID constants

Fid Update Options
gxapi.DU_MODFID_INSERT = 0
Will insert fid range by moving data.  Inserted
range will always be dummied out.  If the insertion point
is before start of data, the fid start is changed.
gxapi.DU_MODFID_DELETE = 1
Will delete the range of fids.
gxapi.DU_MODFID_APPEND = 2
Is like INSERT, except that it is only used to
add fids to the start or end of the existing data.  The
data is not moved with repect to the current fid locations.

DU_MOVE constants

Move Style
gxapi.DU_MOVE_ABSOLUTE = 0
move input to absolute value in control channel
gxapi.DU_MOVE_MINUS = 1
subtract control channel from input channel
gxapi.DU_MOVE_PLUS = 2
add control channel to input channel
gxapi.DU_MOVE_INTERP = 3
data is NOT moved, but dummies in the input are interpolated
based on the control channel, assuming both the input and control
vary linearly inside the gaps

DU_REFID constants

Interpolation mode
gxapi.DU_REFID_LINEAR = 0
0
gxapi.DU_REFID_MINCUR = 1
1
gxapi.DU_REFID_AKIMA = 2
2
gxapi.DU_REFID_NEAREST = 3
3

DU_SORT constants

Sort Direction
gxapi.DU_SORT_ASCENDING = 0
gxapi.DU_SORT_DESCENDING = 1

DU_SPLITLINE constants

Sort Direction
gxapi.DU_SPLITLINE_XYPOSITION = 0
gxapi.DU_SPLITLINE_SEQUENTIAL = 1
gxapi.DU_SPLITLINE_TOVERSIONS = 2

DU_STORAGE constants

Storage Type
gxapi.DU_STORAGE_LINE = 0
gxapi.DU_STORAGE_GROUP = 1

QC_PLAN_TYPE constants

Type Plan
gxapi.QC_PLAN_SURVEYLINE = 0
gxapi.QC_PLAN_TIELINE = 1
gxapi.QC_PLAN_BOTHLINES = 2

DU_DISTANCE_CHANNEL_TYPE constants

Distance channel direction type
gxapi.DU_DISTANCE_CHANNEL_MAINTAIN_DIRECTION = 0
Zero distance is always at the start of the line.
gxapi.DU_DISTANCE_CHANNEL_CARTESIAN_COORDINATES = 1
Put zero at the end of the line with min X if X changes most, or min Y if Y changes most

DU_DIRECTGRID_METHOD constants

How to calculate the cell values for direct gridding.
gxapi.DU_DIRECTGRID_MIN = 0
gxapi.DU_DIRECTGRID_MAX = 1
gxapi.DU_DIRECTGRID_MEAN = 2