GXDH class

class GXDH(handle=0)

GXDH class.

This class is used for importing and interacting with Drill Hole data files. For detailed information on Drill Hole data, see the documentation for Wholeplot.

Note:

The GXDH class has some defines not used by any functions.
DH_DEFINE_PLAN DH_DEFINE_SECT constants
add_hole(hole)

Add a hole and return it’s index.

Parameters:hole (str) – Name of hole
Returns:x - Hole index
Return type:int

New in version 5.0.

License: Geosoft Extended End-User License

add_survey_table(hole)

Add a survey table for a new hole.

Parameters:hole (int) – Hole index

New in version 5.1.8.

License: Geosoft Extended End-User License

Note: The information is created from the collar table info. If the survey info already exists, does nothing.

assay_hole_lst(assay_db, lst)

Populate an GXLST with holes in an assay database

Parameters:
  • assay_db (int) – Index of the assay database
  • lst (GXLST) – GXLST handle

New in version 6.3.

License: Geosoft Extended End-User License

assay_lst(lst)

Return the GXLST of from-to and point assay datasets

Parameters:lst (GXLST) – GXLST to be populated

New in version 5.1.8.

License: Geosoft Extended End-User License

Note: Assay dataset name is given as LST_ITEM_NAME Assay dataset number is given as LST_ITEM_VALUE Returns an empty GXLST if no datasets.

classmethod auto_select_holes(flag)

Use automatic hole selection based on slice.

Parameters:flag (int) – Turn on (TRUE) or off (FALSE)

New in version 5.0.

License: Geosoft Extended End-User License

chan_type(chan_code)

Return the data type for a channel code.

Parameters:chan_code (str) – Channel code
Returns:Channel data type
Return type:int

New in version 7.0.

License: Geosoft Extended End-User License

Note: Finds and sorts all the unique non-dummy items for the selected channel.

clean()

Delete extraneous holes from project databases.

New in version 5.1.2.

License: Geosoft Extended End-User License

Note: Removes from Project databases any lines not connected to a line found in the collar table list. If all the database lines would be removed, the database is simply deleted.

clean_will_delete_db()

See if “cleaning” will delete project databases.

Returns:1 if calling clean will remove all “lines” from one of the GXDH project databases.
Return type:int

New in version 5.1.2.

License: Geosoft Extended End-User License

composite_db(mast_db, comp_db, hol_sel, int_sel, fix_int, lith_ch, int_file, wt_ch, rej1_val, rej2_val, rej3_val, rej3_op, rej3_ch)

Make a composite database

Parameters:
  • mast_db (GXDB) – Input assay GXDB object
  • comp_db (GXDB) – Output composite GXDB object
  • hol_sel (int) – DH_COMPSTDB_HOLSEL constants
  • int_sel (int) – DH_COMPSTDB_INTSEL constants
  • fix_int (float) – Fixed interval length
  • lith_ch (str) – Name of lithology cannel
  • int_file (str) – Name of interval file
  • wt_ch (str) – Name of Weight channel
  • rej1_val (float) – dRej1Val for intervals short than, (GS_R8DM for no action)
  • rej2_val (float) – dRej2Val for intervals gap greater than, (GS_R8DM for no action)
  • rej3_val (float) – dRej3Val for Rej3Ch with Rej3Op, (GS_R8DM for no action)
  • rej3_op (int) – dRej3Op: 0: >, 1: >=, 2: <, 3: <=
  • rej3_ch (str) – Name of Rej3Ch channel

New in version 5.1.8.

License: Geosoft Extended End-User License

compositing_tool_gui(map, x, y1, y2)

Annotate a strip log map using the compositing tool.

Parameters:
  • map (GXMAP) – Current strip log map
  • x (float) – X location on map of selected strip
  • y1 (float) – Y End of hole interval in view coords
  • y2 (float) – Y Other end of hole interval in view coords
Returns:

DH_COMP_CHOICE constants

Return type:

int

New in version 5.1.3.

License: Geosoft Extended End-User License

Note: If any of the input X or Y values are dummies the tool uses default values.

compute_hole_xyz(hole)

Computes XYZ for survey and assay data for a single hole.

Parameters:hole (int) – Hole index

New in version 7.3.

License: Geosoft Extended End-User License

compute_sel_extent(e_min, e_max, n_min, n_max, z_min, z_max)

Computes the extents for selected holes.

Parameters:

New in version 5.0.

License: Geosoft Extended End-User License

compute_xyz()

Computes XYZ for survey and assay data.

New in version 5.1.2.

License: Geosoft Extended End-User License

classmethod convert_old_line_names(db, lst)

Convert old “DD001.Assay” type lines to “DD001”

Parameters:

New in version 6.3.

License: Geosoft Extended End-User License

Note: The input GXLST must be filled using a function like GXDB.symb_lst, which puts the name and symbol into the GXLST items. Any names with a period are truncated at the period, and the line name in the database is changed to the new name (just the hole name). The GXLST is modified to have the new names. A value is put into the GXDB GXREG “DH_CONVERTED_NAMES” parameter so this process is done only once on a database.

DO NOT use on old-style single-database Wholeplot projects.

creat_chan_lst(lst)

Fills a GXLST with available string and numeric channel code values.

Parameters:lst (GXLST) – GXLST to fill with channel code values.

New in version 5.1.8.

License: Geosoft Extended End-User License

Note: Channel codes are in the format “[Assay] Au”, where the name in the square brackets is descriptive part of the project database containing the given channel name. The above code might refer to the “Au” channel in the “Tutorial_Assay.gdb” database.

classmethod create(db)

Create GXDH.

Parameters:db (str) – Name of current database
Returns:GXDH Object
Return type:GXDH

New in version 5.0.

License: Geosoft Extended End-User License

classmethod create_collar_table(project, chan, db)

Create a collar table GXDB with channels set up.

Parameters:
  • project (str) – Project name
  • chan (int) – Number of channels
  • db (str_ref) – Collar table name (returned)

New in version 5.1.6.

License: Geosoft Extended End-User License

Note: The database name will be of the form

“d:directoryProject_Collar.gdb”

classmethod create_collar_table_dir(project, dir, chan, db)

Create a collar table in the specified directory.

Parameters:
  • project (str) – Project name
  • dir (str) – Directory to create project in
  • chan (int) – Number of channels
  • db (str_ref) – Collar table name (returned)

New in version 5.1.8.

License: Geosoft Extended End-User License

Note: The database name will be of the form

“d:directoryProject_Collar.gdb”

create_default_job(ini, type)

Create a default job from scratch.

Parameters:
  • ini (str) – File name of the INI file to create (forces correct suffix)
  • type (int) – DH_PLOT constants

New in version 5.1.2.

License: Geosoft Extended End-User License

classmethod create_external(db)

Create a GXDH from an external process (no montaj running).

Parameters:db (str) – Name of example project database
Returns:GXDH Object
Return type:GXDH

New in version 5.1.6.

License: Geosoft Extended End-User License

Note: The regular create assumes a workspace is open and creates the project from the databases which are currently loaded. This function instead creates the project from all projects in the input databases’s directory.

classmethod current()

Creates a drill project from current environment.

Returns:GXDH Object
Return type:GXDH

New in version 6.1.

License: Geosoft Extended End-User License

Note: If no GXDH database is open the Open GXDH Project GXGUI will be displayed which may be cancelled by the user in which case the GX will terminate with cancel.

classmethod datamine_to_csv(file, proj)

Convert a Datamine drillhole file to CSV files ready for import.

Parameters:
  • file (str) – Datamine database file to import (*.dm)
  • proj (str) – Drillhole project name

New in version 6.3.

License: Geosoft Extended End-User License

Note: Creates three CSV files and the accompanying template files ready for batch ASCII import into a drill project.

Project_Collar.csv, .i3 Project_Survey.csv, .i3 Project_Assay.csv, .i3
delete_holes(lst)

Delete a list of holes from the project.

Parameters:lst (GXLST) – GXLST of holes to delete

New in version 5.1.2.

License: Geosoft Extended End-User License

Note: Removes all lines in the input GXLST from GXDH project databases. If all the database lines would be removed, the database is simply deleted.

delete_will_delete_db(lst)

See if deleting holes will delete project databases.

Parameters:lst (GXLST) – GXLST of holes to delete
Returns:1 if deleting the GXLST of holes will remove all “lines” from one of the GXDH project databases.
Return type:int

New in version 5.1.2.

License: Geosoft Extended End-User License

depth_data_lst(lst)

Fills a GXLST with available channel code values from Depth databases.

Parameters:lst (GXLST) – GXLST to fill with channel code values.

New in version 6.4.

License: Geosoft Extended End-User License

Note: Channel codes are in the format “[Assay] Au”, where the name in the square brackets is descriptive part of the project database containing the given channel name. The above code might refer to the “Au” channel in the “Tutorial_Assay.gdb” database.

edit_classification_table_file_gui(chan, class_file, fill_patterns, colors_only)

Edit a symbol color/pattern CSV file

Parameters:
  • chan (str) – Channel
  • class_file (str_ref) – CSV filename (in/out can be blank)
  • fill_patterns (int) – 0 - Collar Symbols -1 - Rock Patterns
  • colors_only (int) – 0 - Symbols/patterns (2D) -1 - Colors only (3D)
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 9.3.

License: Geosoft Extended End-User License

export_file(file, type)

Exports a Drill Hole database to an external file.

Parameters:

New in version 5.0.

License: Geosoft Extended End-User License

export_geodatabase_lst(lst, file, pre, feat_class, overwrite)

Exports whole or part of a Drill Hole database to an ArcGIS Geodatabase as feature class(es).

Parameters:
  • lst (GXLST) – Hole Names in the Name and Value parts of the GXLST
  • file (str) – File name (.pdb folder for File Geodatabase or .sde connector for SDE)
  • pre (str) – String to prefix dataset names with
  • feat_class (str_ref) – Feature class name to export (pass empty for all or name of table, will contain the name of the output dataset for if a rename occurs)
  • overwrite (int) – Overwrite existing feature classes? False will create copies.

New in version 7.1.

License: Geosoft Extended End-User License

Note: A table with metadata about the created feature classes will be written to the Geodatabase. This table will have the same name with the postfix “_Metadata” attached

export_las(assay_db, hole, interval, file)

Exports a Drill Hole database to a LAS v2 file.

Parameters:
  • assay_db (int) – Assay database index
  • hole (int) – Hole index
  • interval (float) – Interval for output
  • file (str) – File name

New in version 5.1.8.

License: Geosoft Extended End-User License

export_lst(lst, file, type)

Exports a GXLST of holes in a Drill Hole database to an external file.

Parameters:

New in version 5.1.8.

License: Geosoft Extended End-User License

Note: Use functions like GXDB.selected_line_lst to construct the GXLST

find_hole(hole)

Find a hole and return it’s index.

Parameters:hole (str) – Name of hole
Returns:x - Hole index -1 - Not found
Return type:int

New in version 5.0.

License: Geosoft Extended End-User License

find_hole_intersection(hole, img, x, y, z)

Return XYZ locations of the intersection of a hole with a DEM grid.

Parameters:
  • hole (int) – Hole index
  • img (GXIMG) – DEM Grid
  • x (float_ref) – Returned X location
  • y (float_ref) – Returned Y location
  • z (float_ref) – Returned Z location
Returns:

1 if intersection found 0 if no intersection found

Return type:

int

New in version 7.0.

License: Geosoft Extended End-User License

Note: Input the hole index and an GXIMG object. Returns XYZ location of the hole intersection with the DEM. Interpolation inside the DEM uses the native GXIMG interp method. If no intersection is found the returned XYZ locations are rDUMMY.

flush_select()

Flush all selections to database selection engine.

New in version 5.0.

License: Geosoft Extended End-User License

from_to_data_lst(assay, lst)

Fills a GXLST with available string and numeric channel code values from From-To databases.

Parameters:
  • assay (str) – Assay dataset (“” for all)
  • lst (GXLST) – GXLST to fill with channel code values.

New in version 6.4.

License: Geosoft Extended End-User License

Note: Channel codes are in the format “[Assay] Au”, where the name in the square brackets is descriptive part of the project database containing the given channel name. The above code might refer to the “Au” channel in the “Tutorial_Assay.gdb” database.

get_chan_code_info(chan_code, assay_db_index, chan)

Return the assay database index and channel name from a channel code string.

Parameters:
  • chan_code (str) – Input channel code “[Assay] channel”
  • assay_db_index (int_ref) – Returned assay database index
  • chan (str_ref) – Channel name

New in version 7.3.

License: Geosoft Extended End-User License

Note: The input channel code is in the form “[Assay] channel”

get_collar_table_db(db)

Get the name of the database containing the collar table.

Parameters:db (str_ref) – Returned file name

New in version 5.1.2.

License: Geosoft Extended End-User License

get_data_type(db, type)

Get the type of data in a Wholeplot database.

Parameters:

New in version 5.1.3.

License: Geosoft Extended End-User License

Note: Returns DH_DATA_UNKNOWN if it can’t determine the type.

get_databases_sorted_vv(gvv)

Get the names of the project databases in a GXVV, same as get_databases_vv but the list is sorted alphabetically.

Parameters:gvv (GXVV) – GXVV of type -STR_FILE

New in version 8.2.

License: Geosoft Extended End-User License

get_databases_vv(gvv)

Get the names of the project databases in a GXVV.

Parameters:gvv (GXVV) – GXVV of type -STR_FILE

New in version 5.1.2.

License: Geosoft Extended End-User License

get_default_section(az, x1, x2, l, w)

Computes default section azimuths, extents for selected holes.

Parameters:
  • az (float_ref) – Azimuth of section (returned)
  • x1 (float_ref) – Corner X (Easting) of section (returned)
  • x2 (float_ref) – Corner Y (Northing) of section (returned)
  • l (float_ref) – Section length (returned)
  • w (float_ref) – Section width (returned)

New in version 5.0.

License: Geosoft Extended End-User License

get_geology_contacts(lst, chan_code, geology, surface, gap, vv_x, vv_y, vv_z)

Return XYZ locations of top or bottom geological surfaces

Parameters:
  • lst (GXLST) – GXLST of holes to check
  • chan_code (str) – Channel code
  • geology (str) – Geology item
  • surface (int) – DH_SURFACE constants Surface selection (top or bottom)
  • gap (float) – Max gap to skip when compositing (GS_R8DM for none)
  • vv_x (GXVV) – X locations of the contact
  • vv_y (GXVV) – Y locations of the contact
  • vv_z (GXVV) – Z locations of the contact

New in version 7.0.

License: Geosoft Extended End-User License

Note: For the input GXLST of holes, returns XYZ location of top or bottom contact with the input geology. Those selected holes which do NOT have contacts, return rDUMMY for the corresponding locations.

get_hole_group(hole, assay)

Get the Group symbol for this hole/table combination.

Parameters:
  • hole (int) – Hole index
  • assay (str) – Table Name
Returns:

Hole Symbol

Return type:

int

New in version 5.0.

License: Geosoft Extended End-User License

get_hole_survey(hole, vv_x, vv_y, vv_z, vv_d)

Get the Survey information of a Hole.

Parameters:
  • hole (int) – Hole index
  • vv_x (GXVV) – X
  • vv_y (GXVV) – Y
  • vv_z (GXVV) – Z
  • vv_d (GXVV) – Depth

New in version 5.0.

License: Geosoft Extended End-User License

get_info(hole, name, data)

Get Collar Information.

Parameters:
  • hole (int) – Hole index
  • name (str) – Name of information
  • data (str_ref) – Buffer to place information

New in version 5.0.

License: Geosoft Extended End-User License

Note: If the DH_ELEV channel is requested it will also search for the DH_RL channel, which is the new name for the collar elevation.

get_ipj(ipj)

Get the project GXIPJ.

Parameters:ipj (GXIPJ) – GXIPJ Handle

New in version 5.1.8.

License: Geosoft Extended End-User License

Note: The projection for the project is the projection stored in the DH_EAST channel in the collar table.

get_map(index)

Get a plotting map

Parameters:index (int) – Map Index
Returns:GXMAP Object
Return type:GXMAP

New in version 8.0.1.

License: Geosoft Extended End-User License

get_map_names_vv(vv)

Get plotted map names.

Parameters:vv (GXVV) – Returned map names (string type GXVV)

New in version 5.1.8.

License: Geosoft Extended End-User License

Note: This will return the currently plotted map name(s) in a GXVV. This should only be called after a call to wholeplot. The GXVV size is set to the number of maps created.

get_num_maps()

Get the number plotting maps

Returns:Number of plotting maps
Return type:int

New in version 8.0.1.

License: Geosoft Extended End-User License

get_oriented_core_dip_dir(lst, alpha, beta, top_ref, dip, dip_dir)

Converted alpha/beta values in oriented cores to dip/dip direction.

Parameters:
  • lst (GXLST) – List of holes to process (e.g. from hole_lst)
  • alpha (str) – Channel code for input alpha data
  • beta (str) – Channel code for input beta data
  • top_ref (int) – 1: Top of core reference 0: Bottom of core reference
  • dip (str) – Channel name for output dip data
  • dip_dir (str) – Channel name for output dip direction

New in version 6.4.

License: Geosoft Extended End-User License

Note: The input data are the oriented core alpha and beta values, using either top or bottom reference. The values for each hole in the GXLST are converted to “absolute” dip and dip-direction values, using the resurveyed hole orientations at each depth. The alpha and beta data must be from the same database, and the output dip and dip/dir channels are written to the same database.

get_project_name(project)

Get the Wholeplot project name.

Parameters:project (str_ref) – Returned string

New in version 5.1.2.

License: Geosoft Extended End-User License

get_reg()

Get the GXREG Object used in this project.

Returns:GXREG Object
Return type:GXREG

New in version 5.0.

License: Geosoft Extended End-User License

classmethod get_section_id(azimuth, east, north, id)

Create a section ID based on its location

Parameters:
  • azimuth (float) – Section Azimuth
  • east (float) – Section Easting
  • north (float) – Section Northing
  • id (str_ref) – Section ID

New in version 6.1.

License: Geosoft Extended End-User License

get_selected_holes_vv(vv)

Populate a GXVV with the indices of all selected holes

Parameters:vv (GXVV) – Returned hole indices (must be type INT)

New in version 8.0.

License: Geosoft Extended End-User License

classmethod get_table_default_chan_lst(lst, type)

Return list of default channels by collar/assay/survey table type.

Parameters:

New in version 7.3.

License: Geosoft Extended End-User License

Note: Fills a GXLST with the default channel names created according to type (Collar, Survey, Assay). Value is in the LST_ITEM_NAME part.

classmethod get_template_blob(db, template, imp_type)

Retrieve the import template from the database.

Parameters:
Returns:

0: No template stored in the database 1: Template retrieved and written to a file.

Return type:

int

New in version 6.0.

License: Geosoft Extended End-User License

Note: The template can be retrieved in order to refresh the database with a call to the DHIMPORT.GX.

The import types correspond to the DHIMPORT.IMPTYPE variable: 0: ASCII, 1: Database/XLS, 2: ODBC

If no template blob exists, templ

classmethod get_template_info(template, data_type, file, table)

Retrieve the file, GXDH Table name and type from an import template.

Parameters:

New in version 6.0.

License: Geosoft Extended End-User License

Note: As of version 6.0, the import templates (*.i3, *.i4) produced by the Wholeplot import wizards contain the following lines:

FILE assay.txt (except for ODBC) DRILLTYPE 3 DRILLTABLE Assay

The FILE is normally the input file name, except for ODBC, where it is not defined. The DRILLTYPE is one of DH_DATA_XXX, and the DRILLTABLE is the name of the Wholeplot database table; e.g. Project_Assay.gdb in the above case. The DRILLTABLE is only included in the template for DH_DATA_FROMTO and DH_DATA_POINT, but this function will return the appropriate table names (e.g. Collar, Survey, ENSurvey) for the other types. If the DRILLTYPE is NOT found in the template, a value of DH_DATA_UNKNOWN is returned for the data type; likely an indication that this is not a new-style template produced by Wholeplot.

classmethod get_template_info_ex(template, data_type, file, table, lst)

Retrieve the file, GXDH Table name, type and channel list from an import template.

Parameters:

New in version 7.3.

License: Geosoft Extended End-User License

Note: As of version 6.0, the import templates (*.i3, *.i4) produced by the Wholeplot import wizards contain the following lines:

FILE assay.txt (except for ODBC) DRILLTYPE 3 DRILLTABLE Assay

The FILE is normally the input file name, except for ODBC, where it is not defined. The DRILLTYPE is one of DH_DATA_XXX, and the DRILLTABLE is the name of the Wholeplot database table; e.g. Project_Assay.gdb in the above case. The DRILLTABLE is only included in the template for DH_DATA_FROMTO and DH_DATA_POINT, but this function will return the appropriate table names (e.g. Collar, Survey, ENSurvey) for the other types. If the DRILLTYPE is NOT found in the template, a value of DH_DATA_UNKNOWN is returned for the data type; likely an indication that this is not a new-style template produced by Wholeplot. This version also returns a list of the channels in the template checks can be made to see if the import will exceed the database channel limit.

get_unique_channel_items(chan_code, selected_holes, vv)

Return a GXVV with unique items in a channel.

Parameters:
  • chan_code (str) – Channel code
  • selected_holes (int) – Selected holes (1), All holes (0)
  • vv (GXVV) – GXVV filled with items (converted to this GXVV type)

New in version 7.0.

License: Geosoft Extended End-User License

Note: Finds and sorts all the unique non-dummy items for the selected channel.

get_unique_channel_items_from_collar(chan_name, selected_holes, vv)

Return a GXVV with unique items in a channel.

Parameters:
  • chan_name (str) – Channel
  • selected_holes (int) – Selected holes (1), All holes (0)
  • vv (GXVV) – GXVV filled with items (converted to this GXVV type)

New in version 7.3.

License: Geosoft Extended End-User License

Note: Finds and sorts all the unique non-dummy items for the selected channel.

get_units(units, conv_factor)

Get the positional units and conversion factor to m.

Parameters:
  • units (str_ref) – Units (i.e. “m”)
  • conv_factor (float_ref) – Conversion (units/m)

New in version 5.0.

License: Geosoft Extended End-User License

grid_intersection(xi, yi, zi, dip, az, grid, xo, yo, zo)

Algorithm to determine the intersection of a straight hole with a surface (DEM) grid.

Parameters:
  • xi (float) – Input location on hole X
  • yi (float) – Input location on hole Y
  • zi (float) – Input location on hole Z
  • dip (float) – Dip (positive up) in degrees
  • az (float) – Azimuth in degrees
  • grid (str) – DEM grid
  • xo (float_ref) – Returned intersection point X
  • yo (float_ref) – Returned intersection point Y
  • zo (float_ref) – Returned intersection point Z
Returns:

1 if an intersection is found, 0 if not.

Return type:

int

New in version 7.3.

License: Geosoft Extended End-User License

Note: Given a point on the hole and the straight hole dip and azimuth, ocate (an) intersection point with the input DEM grid.

h_assay_db(assay)

Database for an assay data set.

Parameters:assay (int) – Assay dataset number
Returns:x - GXDB DB_NULL if no assay data (no error registered)
Return type:GXDB

New in version 5.1.3.

License: Geosoft Extended End-User License

Note: Works for both single and multiple GXDB Wholeplots.

h_assay_symb(assay, hole)

Line/Group symbol for a specific assay data set hole.

Parameters:
  • assay (int) – Assay dataset number
  • hole (int) – Hole index number
Returns:

x - DB_SYMB NULLSYMB if no survey data for this hole (no error registered)

Return type:

int

New in version 5.1.3.

License: Geosoft Extended End-User License

Note: Works for both single and multiple GXDB Wholeplots.

h_collar_db()

Database for the collar table.

Returns:x - GXDB DB_NULL if no collar table (no error registered)
Return type:GXDB

New in version 5.1.3.

License: Geosoft Extended End-User License

Note: Works for both single and multiple GXDB Wholeplots.

h_collar_symb()

Line/Group symbol for the collar table.

Returns:x - DB_SYMB NULLSYMB if no collar table (no error registered)
Return type:int

New in version 5.1.3.

License: Geosoft Extended End-User License

Note: Works for both single and multiple GXDB Wholeplots.

h_dip_az_survey_db()

Database for the Dip-Azimuth survey data

Returns:x - GXDB DB_NULL if no dip-azimuth survey data (no error registered)
Return type:GXDB

New in version 5.1.3.

License: Geosoft Extended End-User License

Note: Works for both single and multiple GXDB Wholeplots.

h_dip_az_survey_symb(hole)

Line/Group symbol for a specific hole Dip-Azimuth survey.

Parameters:hole (int) – Hole index number
Returns:x - DB_SYMB NULLSYMB if no Dip-Azimuth survey data for this hole (no error registered)
Return type:int

New in version 5.1.3.

License: Geosoft Extended End-User License

Note: Works for both single and multiple GXDB Wholeplots.

h_en_survey_db()

Database for the East-North survey data

Returns:x - GXDB DB_NULL if no East-North survey data (no error registered)
Return type:GXDB

New in version 5.1.3.

License: Geosoft Extended End-User License

Note: Works for both single and multiple GXDB Wholeplots.

h_en_survey_symb(hole)

Line/Group symbol for a specific hole East-North survey.

Parameters:hole (int) – Hole index number
Returns:x - DB_SYMB NULLSYMB if no EN survey data for this hole (no error registered)
Return type:int

New in version 5.1.3.

License: Geosoft Extended End-User License

Note: Works for both single and multiple GXDB Wholeplots.

classmethod have_current()

Returns True if a drill project is loaded

Return type:bool

New in version 6.1.

License: Geosoft Extended End-User License

classmethod have_current2(db)

Returns True if a drill project is loaded, and the collar database if it is loaded.

Parameters:db (str_ref) – Collar table name (returned)
Return type:bool

New in version 6.1.

License: Geosoft Extended End-User License

hole_lst(lst)

Populate an GXLST with the list of the selected holes

Parameters:lst (GXLST) – GXLST handle

New in version 5.0.

License: Geosoft Extended End-User License

hole_lst2(lst)

Populate an GXLST with the list of all the holes

Parameters:lst (GXLST) – GXLST handle

New in version 5.1.2.

License: Geosoft Extended End-User License

classmethod hole_select_from_list_gui(lst, sel_lst)

Select/Deselect holes using the two-panel selection tool.

Parameters:
  • lst (GXLST) – All holes
  • sel_lst (GXLST) – Selected holes
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 7.0.

License: Geosoft Extended End-User License

hole_selection_tool_gui()

Select/Deselect holes using plan map tool.

Returns:0 - Ok -1 - User Cancelled
Return type:int

New in version 5.1.8.

License: Geosoft Extended End-User License

holes()

Return number of holes.

Returns:x - Number of holes
Return type:int

New in version 5.0.

License: Geosoft Extended End-User License

classmethod import2(project, db, line, hole, table, type, log)

Imports data into a Drill Hole Database (obsolete).

Parameters:
  • project (str) – Drill project name
  • db (GXDB) – GXDB Handle
  • line (int) – Line
  • hole (int) – Hole channel
  • table (str) – Table
  • type (int) – DH_DATA constants
  • log (str) – Log file name

New in version 7.0.

License: Geosoft Extended End-User License

import_las(assay, file, interval, interp, wa)

Imports LAS Data into a GXDH database

Parameters:
  • assay (str) – Assay database to use
  • file (str) – LAS file name
  • interval (float) – Averaging/desampling interval (cm)
  • interp (int) – Interpolation method
  • wa (GXWA) – Log file handle

New in version 6.0.1.

License: Geosoft Extended End-User License

Note: The argument for the assay database is the file name without the project name and underscore, e.g. for “Project_Assay.gdb” use “Assay”

classmethod is_esri()

Running inside ArcGIS?

Returns:0 - if No 1 - if Yes
Return type:int

New in version 5.1.8.

License: Geosoft Extended End-User License

is_null()

Check if this is a null (undefined) instance

Returns:True if this is a null (undefined) instance, False otherwise.
Return type:bool
litho_grid_3d(chan_code, tpat, vox, cell_size, gap, non_contact_radius, gridding_type, reg, retain_grid_files)

Create a lithology voxel grid with lith codes mapped to single values.

Parameters:
  • chan_code (str) – Lithology channel code
  • tpat (GXTPAT) – Codes, colors etc.
  • vox (str) – Name of GXVOX Persistent Storage file
  • cell_size (float) – Cell Size (GS_R8DM for automatic calculation)
  • gap (float) – Max gap to skip when compositing (GS_R8DM for none)
  • non_contact_radius (float) – Non-contact radius.
  • gridding_type (int) – Gridding type (0: Rangrid, 1: TinGrid)
  • reg (GXREG) – Rangrid control GXREG (see GXRGRD class for parameters)
  • retain_grid_files (int) – Retain top/bottom grids?

New in version 7.0.

License: Geosoft Extended End-User License

Note: Values in the input channel are assigned the index of the corresponding item found in the input GXTPAT. The compositing gap refers to the size of gaps in the data (either a blank lithology or missing from-to interval) which will be ignored when compositing lithologies into contiguous from-to intervals. The non-contact radius is used to dummy out the level grids around holes where the gridded lithology is not found. If not specified (dummy) then half the distance to the nearest contacting hole is used.

load_data_parameters_ini(db, dir)

Load data parameters from INI files..

Parameters:
  • db (GXDB) – Source database
  • dir (str) – Directory to store INI files

New in version 6.0.

License: Geosoft Extended End-User License

Note: Wholeplot data graphing parameters for each channel are stored in the channel GXREG. This function lets a user transfer pre-defined settings to individual INI files (eg. cu.ini).

load_plot_parameters(ini, type)

Load parameters from a Job into the Drill object.

Parameters:

New in version 6.0.

License: Geosoft Extended End-User License

load_select(file)

Load selections to from a file.

Parameters:file (str) – File Name

New in version 5.0.

License: Geosoft Extended End-User License

mask_ply(pply, ipj, tol, mask, select, append)

Set mask channel based on view selection polygon.

Parameters:
  • pply (GXPLY) – Masking polygon
  • ipj (GXIPJ) – Projection from data to polygon coordinates
  • tol (float) – Slice thickness - rDUMMY for no limiting thickness
  • mask (str) – Name of mask channel
  • select (int) – DH_HOLES constants
  • append (int) – DH_MASK constants

New in version 5.1.3.

License: Geosoft Extended End-User License

Note: Data values inside the polygon area, and within the slice thickness have their mask channel values set to 1. If the specified mask channel does not exist, it is created. DH_MASK_NEW — Mask is created new for each selected hole DH_MASK_APPEND — Current selection is added to previous.

modify3d_gui(ini, page)

Modify parameters for a 3D plot.

Parameters:
  • ini (str) – Job Name (*.in3)
  • page (int_ref) – Page to open GXGUI on
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 5.1.6.

License: Geosoft Extended End-User License

modify_crooked_section_holes_gui(ini, page)

Modify parameters to replot holes and hole data to an existing crooked section map.

Parameters:
  • ini (str) – Job Name (*.ins)
  • page (int_ref) – Tab page ID.
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 7.2.

License: Geosoft Extended End-User License

Note: Will plot to an empty crooked section.

modify_fence_gui(ini, page)

Modify parameters for a section plot.

Parameters:
Returns:

0 - Ok 1 - Interactively define a fence. -1 - User Cancelled

Return type:

int

New in version 7.0.

License: Geosoft Extended End-User License

Note: The fence section function.

modify_hole_traces_3d_gui(ini, page)

Modify parameters for a hole traces plot to an existing 3D view.

Parameters:
  • ini (str) – Job Name
  • page (int_ref) – Page to open GXGUI on
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 6.1.

License: Geosoft Extended End-User License

modify_hole_traces_gui(ini, page)

Modify parameters for a hole traces plot to a current map.

Parameters:
  • ini (str) – Job Name
  • page (int_ref) – Page to open GXGUI on
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 5.1.2.

License: Geosoft Extended End-User License

modify_hole_traces_gui2(ini, plot_type, page)

Modify parameters for a hole traces plot to a current plan or section view.

Parameters:
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 8.3.

License: Geosoft Extended End-User License

Note: Currently supports DH_PLOT_PLAN and DH_PLOT_SECTION

modify_plan_gui(ini, page)

Modify parameters for a plan plot.

Parameters:
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 5.1.2.

License: Geosoft Extended End-User License

modify_plan_holes_gui(ini, page)

Modify parameters to replot holes and hole data to an existing plan map.

Parameters:
  • ini (str) – Job Name (*.ins)
  • page (int_ref) – Tab Page ID
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 7.1.

License: Geosoft Extended End-User License

Note: Modifies only hole trace, hole data, topo, voxel slice data.

classmethod modify_rock_codes_gui(file)

Modify/create a rock codes file.

Parameters:file (str) – File name
Returns:0 - Ok -1 - User Cancelled
Return type:int

New in version 5.1.2.

License: Geosoft Extended End-User License

classmethod modify_rock_codes_gui2(db, file)

Modify/create a rock codes file, channel population option.

Parameters:
  • db (GXDB) – Database
  • file (str) – File name
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 6.1.

License: Geosoft Extended End-User License

Note: Same as above, but passes the current database so that the “Populate from channel” button can be used to automatically populate the rock code list. The database should be a Wholeplot database.

modify_section_gui(ini, page)

Modify parameters for a section plot.

Parameters:
Returns:

0 - Ok 1 - Interactively define a NS section 2 - Interactively define an EW section 3 - Interactively define an angled section -1 - User Cancelled

Return type:

int

New in version 5.1.2.

License: Geosoft Extended End-User License

Note: The stacked section function uses the same control file format, but the plotting of profiles and plan views is disabled, and if multiple sections are requested, they are plotted in a stack on the left side of the same map, not to individual maps.

modify_section_holes_gui(ini, page)

Modify parameters to replot holes and hole data to an existing section map.

Parameters:
  • ini (str) – Job Name (*.ins)
  • page (int_ref) – Tab page ID.
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 7.1.

License: Geosoft Extended End-User License

Note: Works for both regular and stacked sections. Modifies only hole trace, hole data, topo, voxel slice data.

modify_stacked_section_gui(ini, page)

Modify parameters for a section plot.

Parameters:
Returns:

0 - Ok 1 - Interactively define a NS section 2 - Interactively define an EW section 3 - Interactively define an angled section -1 - User Cancelled

Return type:

int

New in version 5.1.8.

License: Geosoft Extended End-User License

Note: The stacked section function uses the same control file format, but the plotting of profiles and plan views is disabled, and if multiple sections are requested, they are plotted in a stack on the left side of the same map, not to individual maps.

modify_strip_log_gui(ini, page)

Modify parameters for a strip log plot.

Parameters:
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 5.1.3.

License: Geosoft Extended End-User License

classmethod modify_structure_codes_gui(file)

Modify/create a structure codes file.

Parameters:file (str) – File name
Returns:0 - Ok -1 - User Cancelled
Return type:int

New in version 6.1.

License: Geosoft Extended End-User License

classmethod modify_structure_codes_gui2(db, file)

Modify/create a structure codes file, channel population option.

Parameters:
  • db (GXDB) – Database
  • file (str) – File name
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 6.1.

License: Geosoft Extended End-User License

Note: Same as above, but passes the current database so that the “Populate from channel” button can be used to automatically populate the structure code list. The database should be a Wholeplot database.

classmethod null()

A null (undefined) instance of GXDH

Returns:A null GXDH
Return type:GXDH
num_assays()

Number of assay datasets.

Returns:The number of assay datasets.
Return type:int

New in version 5.1.3.

License: Geosoft Extended End-User License

Note: Works for both single and multiple GXDB Wholeplots.

num_selected_holes()

Returns number of selected holes.

Returns:The number of selected holes
Return type:int

New in version 5.0.

License: Geosoft Extended End-User License

numeric_chan_lst(lst)

Fills a GXLST with available numeric channel code values.

Parameters:lst (GXLST) – GXLST to fill with channel code values.

New in version 7.2.

License: Geosoft Extended End-User License

Note: Channel codes are in the format “[Assay] Au”, where the name in the square brackets is descriptive part of the project database containing the given channel name. The above code might refer to the “Au” channel in the “Tutorial_Assay.gdb” database.

numeric_from_to_data_lst(assay, lst)

Fills a GXLST with available numeric channel code values from From-To databases..

Parameters:
  • assay (str) – Assay dataset (“” for all)
  • lst (GXLST) – GXLST to fill with channel code values.

New in version 7.2.

License: Geosoft Extended End-User License

Note: Channel codes are in the format “[Assay] Au”, where the name in the square brackets is descriptive part of the project database containing the given channel name. The above code might refer to the “Au” channel in the “Tutorial_Assay.gdb” database.

classmethod open(db)

Open GXDH from collar database and load all associated databases.

Parameters:db (str) – Name of collar database
Returns:GXDH Object
Return type:GXDH

New in version 7.1.

License: Geosoft Extended End-User License

open_job(job, type)

Open a GXDH plotting job

Parameters:

New in version 5.0.

License: Geosoft Extended End-User License

plot_hole_traces(map, job)

Plot hole traces to a regular (plan) map.

Parameters:
  • map (GXMAP) – Map handle
  • job (str) – Parameter file (INI) name

New in version 5.1.2.

License: Geosoft Extended End-User License

Note: Both the hole traces and data can be plotted. The DHPLANHOLES GX uses the default plan map parameter file “_plan.inp”.

plot_hole_traces_3d(mview, job)

Plot hole traces to an existing 3D map view.

Parameters:
  • mview (GXMVIEW) – Existing 3D map view
  • job (str) – Parameter file (INI) name (normally *.in3)

New in version 6.1.

License: Geosoft Extended End-User License

Note: Both the hole traces and data can be plotted. The DH3DHOLES GX uses the default 3D map parameter file “_3D.in3”.

plot_holes_on_section(job, plot_type, view)

Plot the currently selected holes on an existing section view.

Parameters:

New in version 8.3.

License: Geosoft Extended End-User License

Note: Plot the currently selected holes to a section view.

plot_symbols_3d(mview, job)

Plot 3D symbols to an existing 3D map view.

Parameters:
  • mview (GXMVIEW) – Existing 3D map view
  • job (str) – Parameter file (INI) name (normally *.in3)

New in version 9.1.

License: Geosoft Extended End-User License

punch_grid_holes(img, vv_x, vv_y, vv_z, blank_dist)

Dummy out locations in a grid around non-contact holes.

Parameters:
  • img (GXIMG) – DEM grid
  • vv_x (GXVV) – X locations of the contacts
  • vv_y (GXVV) – Y locations of the contacts
  • vv_z (GXVV) – Z locations of the contacts
  • blank_dist (float) – Blanking distance

New in version 7.0.

License: Geosoft Extended End-User License

Note: Grid is dummied out to the blanking distance around holes where the input Z value is dummy. If a contacting hole is closer then twice the blanking distance, the blanking distance is reduced accordingly. Distances are measured horizontally (e.g. Z is ignored). If the blanking distance is zero or dummy, the distance is automatically set to half the distance to the closest hole intersection.

qa_collar(wa)

Do QA/QC on Hole Collar data.

Parameters:wa (GXWA) – GXWA Handle

New in version 5.1.3.

License: Geosoft Extended End-User License

qa_collar_lst(lst, wa)

Do QA/QC on Hole Collar data - GXLST of holes.

Parameters:

New in version 7.0.1.

License: Geosoft Extended End-User License

qa_dip_az_curvature(wa, tolerance)

Do QA/QC Curvature checking on Dip Azimuth data.

Parameters:
  • wa (GXWA) – GXWA Handle
  • tolerance (float) – Dip/Azimuth curvature tolerance (degree per meter)

New in version 5.1.3.

License: Geosoft Extended End-User License

Note: Checks all holes with Dip-Azimuth survey data

qa_dip_az_curvature2(wa, tolerance, hole)

Do QA/QC Curvature checking on Dip Azimuth data for a single hole.

Parameters:
  • wa (GXWA) – GXWA Handle
  • tolerance (float) – Dip/Azimuth curvature tolerance (degree per meter)
  • hole (str) – Hole name

New in version 6.4.2.

License: Geosoft Extended End-User License

Note: Checks single hole with Dip-Azimuth survey data

qa_dip_az_curvature_lst(lst, tolerance, wa)

Do QA/QC Curvature checking on Dip Azimuth data for holes in a GXLST.

Parameters:
  • lst (GXLST) – GXLST of holes (name, index)
  • tolerance (float) – Dip/Azimuth curvature tolerance (degree per meter)
  • wa (GXWA) – GXWA Handle to write to
Returns:

The number of holes found and checked.

Return type:

int

New in version 7.0.

License: Geosoft Extended End-User License

Note: Checks all holes with Dip-Azimuth survey data

qa_dip_az_survey(db, wa, line, hole)

Do QA/QC on Dip/Az Survey data.

Parameters:
  • db (GXDB) – GXDB Handle
  • wa (GXWA) – GXWA Handle
  • line (int) – Line
  • hole (str) – Current hole Name

New in version 5.1.3.

License: Geosoft Extended End-User License

Note: Error if no Dip-Azimuth survey database, or if the requested line does not exist in the database.

qa_dip_az_survey_lst(lst, wa)

Do QA/QC on Dip/Az Survey data for holes in a GXLST.

Parameters:
Returns:

The number of holes found and checked.

Return type:

int

New in version 7.0.

License: Geosoft Extended End-User License

Note: Error if no Dip-Azimuth survey database, or if a requested hole does not exist in the drill project.

qa_east_north_curvature(wa, tolerance)

Do QA/QC Curvature checking on Dip Azimuth data.

Parameters:
  • wa (GXWA) – GXWA Handle
  • tolerance (float) – Dip/Azimuth curvature tolerance (degree per meter)

New in version 5.1.3.

License: Geosoft Extended End-User License

Note: Checks all holes with East-North survey data

qa_east_north_curvature2(wa, tolerance, hole)

Do QA/QC Curvature checking on Dip Azimuth data for a single hole.

Parameters:
  • wa (GXWA) – GXWA Handle
  • tolerance (float) – Dip/Azimuth curvature tolerance (degree per meter)
  • hole (str) – Hole name

New in version 6.4.2.

License: Geosoft Extended End-User License

Note: Checks single holes with East-North survey data

qa_east_north_curvature_lst(lst, tolerance, wa)

Do QA/QC Curvature checking on Dip Azimuth data for holes in a GXLST.

Parameters:
  • lst (GXLST) – GXLST of holes (name, index)
  • tolerance (float) – Dip/Azimuth curvature tolerance (degree per meter)
  • wa (GXWA) – GXWA Handle
Returns:

The number of holes found and checked.

Return type:

int

New in version 7.0.

License: Geosoft Extended End-User License

Note: Checks all holes with East-North survey data

qa_east_north_survey(db, wa, line, hole)

Do QA/QC on East/North Survey data.

Parameters:
  • db (GXDB) – GXDB Handle
  • wa (GXWA) – GXWA Handle
  • line (int) – Line
  • hole (str) – Current hole Name

New in version 5.1.3.

License: Geosoft Extended End-User License

Note: Error if no East-North survey database, or if the requested line does not exist in the database.

qa_east_north_survey_lst(lst, wa)

Do QA/QC on East/North Survey data for holes in a GXLST.

Parameters:
Returns:

The number of holes found and checked.

Return type:

int

New in version 7.0.

License: Geosoft Extended End-User License

Note: Error if no East-North survey database, or if a requested hole does not exist in the drill project.

qa_from_to_data(db, wa, line, hole)

Do QA/QC on From/To data.

Parameters:
  • db (GXDB) – GXDB Handle
  • wa (GXWA) – GXWA Handle
  • line (int) – Line
  • hole (str) – Current hole Name

New in version 5.1.3.

License: Geosoft Extended End-User License

qa_point_data(db, wa, line, hole)

Do QA/QC on Point data.

Parameters:
  • db (GXDB) – GXDB Handle
  • wa (GXWA) – GXWA Handle
  • line (int) – Line
  • hole (str) – Current hole Name

New in version 5.1.3.

License: Geosoft Extended End-User License

qa_write_unregistered_holes(db, wa)

Write out unregistered holes in a database.

Parameters:

New in version 6.1.

License: Geosoft Extended End-User License

Note: Looks at each line in a database and sees if it is listed in the collar tables’ hole list.

re_survey_east_north(hole, vv_x, vv_y, vv_z, vv_d, east, north, elev, top, bot)

Resurvey an East-North-RL survey.

Parameters:
  • hole (str) – Hole ID (for error messages)
  • vv_x (GXVV) – Input East
  • vv_y (GXVV) – Input North
  • vv_z (GXVV) – Input RL
  • vv_d (GXVV) – Returned depths down the hole
  • east (float) – Input collar East
  • north (float) – Input collar North
  • elev (float) – Input collar RL
  • top (float) – Input top of hole depth
  • bot (float_ref) – Returned bottom depth

New in version 5.1.3.

License: Geosoft Extended End-User License

Note: Re-interpolates in X, Y and Z to proper depth interval and returns depths for each point

re_survey_pol_fit(hole, vv_dip, vv_az, vv_depth, east, north, elev, top, bot, inc, dip_conv, order, vv_x, vv_y, vv_z, vv_d)

Use the polynomial fit resurveying method.

Parameters:
  • hole (str) – Hole ID (used for error messages)
  • vv_dip (GXVV) – Dip
  • vv_az (GXVV) – Azimuth
  • vv_depth (GXVV) – Depth
  • east (float) – Collar X (easting) (depth = 0)
  • north (float) – Collar Y (northing)(depth = 0)
  • elev (float) – Collar Z (elevation) (depth = 0)
  • top (float) – Minimum hole depth to start output values
  • bot (float) – Maximum hole depth for output values
  • inc (float) – Increment for output values
  • dip_conv (int) – DIP_CONVENTION constants
  • order (int) – Polynomial order
  • vv_x (GXVV) – X (Easting) - Output
  • vv_y (GXVV) – Y (Northin) - Output
  • vv_z (GXVV) – Z (Elevation) - Output
  • vv_d (GXVV) – Depths - Output

New in version 5.1.2.

License: Geosoft Extended End-User License

Note: Uses the polynomial fit method to calculate (X, Y, Z) locations down the hole from azimuth, dip, depth values. The collar is assumed to be at zero depth, and depth is the measure distance down the hole (even if it’s horizontal). A negative dip convention means vertical down is -90 degrees. The polynomial order must be in the range 1-20, with 5 being adequate for most smoothly curving holes. The order is reduced to no more than the number of input points.

re_survey_rad_curve(hole, vv_dip, vv_az, vv_depth, east, north, elev, top, bot, inc, dip_conv, vv_x, vv_y, vv_z, vv_d)

Use radius of curvature resurveying method.

Parameters:
  • hole (str) – Hole ID (used for error messages)
  • vv_dip (GXVV) – Dip
  • vv_az (GXVV) – Azimuth
  • vv_depth (GXVV) – Depth
  • east (float) – Collar X (easting) (depth = 0)
  • north (float) – Collar Y (northing)(depth = 0)
  • elev (float) – Collar Z (elevation) (depth = 0)
  • top (float) – Minimum hole depth to start output values
  • bot (float) – Maximum hole depth for output values
  • inc (float) – Increment for output values
  • dip_conv (int) – DIP_CONVENTION constants
  • vv_x (GXVV) – X (Easting) - Output
  • vv_y (GXVV) – Y (Northin) - Output
  • vv_z (GXVV) – Z (Elevation) - Output
  • vv_d (GXVV) – Depths - Output

New in version 5.1.2.

License: Geosoft Extended End-User License

Note: Uses the Radius of curvature method to calculate (X, Y, Z) locations down the hole from azimuth, dip, depth values. The collar is assumed to be at zero depth, and depth is the measure distance down the hole (even if it’s horizontal). A negative dip convention means vertical down is -90 degrees.

re_survey_straight(hole, dip, az, east, north, elev, top, bot, inc, dip_conv, vv_x, vv_y, vv_z, vv_d)

Resurvey a straight hole.

Parameters:
  • hole (str) – Hole ID (used for error messages)
  • dip (float) – Collar Dip
  • az (float) – Collar Azimuth
  • east (float) – Collar X (easting) (depth = 0)
  • north (float) – Collar Y (northing)(depth = 0)
  • elev (float) – Collar Z (elevation) (depth = 0)
  • top (float) – Minimum hole depth to start output values
  • bot (float) – Maximum hole depth for output values
  • inc (float) – Increment for output values
  • dip_conv (int) – DIP_CONVENTION constants
  • vv_x (GXVV) – X (Easting) - Output
  • vv_y (GXVV) – Y (Northin) - Output
  • vv_z (GXVV) – Z (Elevation) - Output
  • vv_d (GXVV) – Depths - Output

New in version 5.1.2.

License: Geosoft Extended End-User License

Note: Assumes a straight hole to calculate (X, Y, Z) locations down the hole from azimuth, dip, depth values. The collar is assumed to be at zero depth, and depth is the measure distance down the hole (even if it’s horizontal). A negative dip convention means vertical down is -90 degrees.

re_survey_straight_seg(hole, vv_dip, vv_az, vv_depth, east, north, elev, top, bot, inc, dip_conv, vv_x, vv_y, vv_z, vv_d)

Resurvey a hole with straight segments between locations.

Parameters:
  • hole (str) – Hole ID (used for error messages)
  • vv_dip (GXVV) – Dip
  • vv_az (GXVV) – Azimuth
  • vv_depth (GXVV) – Depth
  • east (float) – Collar X (easting) (depth = 0)
  • north (float) – Collar Y (northing)(depth = 0)
  • elev (float) – Collar Z (elevation) (depth = 0)
  • top (float) – Minimum hole depth to start output values
  • bot (float) – Maximum hole depth for output values
  • inc (float) – Increment for output values
  • dip_conv (int) – DIP_CONVENTION constants
  • vv_x (GXVV) – X (Easting) - Output
  • vv_y (GXVV) – Y (Northin) - Output
  • vv_z (GXVV) – Z (Elevation) - Output
  • vv_d (GXVV) – Depths - Output

New in version 6.2.

License: Geosoft Extended End-User License

Note: Calculate (X, Y, Z) locations down the hole from azimuth, dip, depth values, assuming each segment is straight, and the hole bends at each successive azimuth, dip, depth value. The collar is assumed to be at zero depth, and depth is the measure distance down the hole (even if it’s horizontal). A negative dip convention means vertical down is -90 degrees.

replot_holes(job, plot_type)

Replot holes on an existing drill map.

Parameters:

New in version 7.1.

License: Geosoft Extended End-User License

Note: The parameter file must correspond to the plot Type. The hDH->hMAP value must be set first, using set_map. Overwrites existing hole and hole data groups. Replots the legend if the legend is enabled. This should only be used on a slightly modified version of the INI file used to create the existing map, or things may not work out (e.g. bad locations etc).

save_data_parameters_ini(db, dir)

Save data parameters to INI files..

Parameters:
  • db (GXDB) – Source database
  • dir (str) – Directory to store INI files

New in version 6.0.

License: Geosoft Extended End-User License

Note: Wholeplot data graphing parameters for each channel are stored in the channel GXREG. This function lets a user transfer pre-defined settings to individual INI files (eg. cu.ini). As of v6.3, the GXDH object is NOT required for this function, and is, in fact, ignored.

save_job(job, type)

Save a GXDH plotting job

Parameters:

New in version 5.0.

License: Geosoft Extended End-User License

save_select(file)

Saves current selections to a file.

Parameters:file (str) – File Name

New in version 5.0.

License: Geosoft Extended End-User License

section_window_size_mm(xmm, ymm)

Deterine the size, in mm, of the section window

Parameters:

New in version 6.0.

License: Geosoft Extended End-User License

Note: Given the current selection of windows (e.g. legend, plan), paper size and orientation, return the size in mm of the window used for plotting the section.

select_all_holes()

Select all the holes in a Drill hole project.

New in version 5.0.

License: Geosoft Extended End-User License

select_holes(gvv, sel)

Select holes by hole indices.

Parameters:
  • gvv (GXVV) – INT GXVV with hole indices.
  • sel (int) – 0 - deselect, 1 - select

New in version 6.3.

License: Geosoft Extended End-User License

Note: Indices less than 0 are skipped. This lets you use this function after a call to GXLST.find_items, which returns -1 for indices not located.

select_name(mask, sel, mode)

Select holes using a name mask.

Parameters:
  • mask (str) – Mask
  • sel (int) – 0 - deselect, 1 - select
  • mode (int) – 0 - overwrite, 1 - append

New in version 5.0.

License: Geosoft Extended End-User License

Note: Overwrite mode - all selections tested and selected or not selected Append mode - only holes matching the mask are selected or not selected.

select_ply(pply)

Select all holes in GXPLY (Polygon) object.

Parameters:pply (GXPLY) – Polygon object

New in version 5.0.

License: Geosoft Extended End-User License

Note: This function operates the same as the select_ply2 method with parameters (1, 0, 0)

select_ply2(pply, select, inside, new)

Select holes in GXPLY (Polygon) object with options.

Parameters:
  • pply (GXPLY) – Polygon object
  • select (int) – Select (0) or Deselect (1)
  • inside (int) – Region (0: inside, 1: outside)
  • new (int) – Mode (0: Append, 1: New)

New in version 6.1.

License: Geosoft Extended End-User License

Note: The various selection options give the following results:

New/Select/inside: Unselect all holes, then
select all holes inside the polygon.
New/Select/outside: Unselect all holes, then
select all holes outside the polygon.
New/Deselect/inside: Select all holes, then
deselect all holes inside the polygon.
New/Deselect/outside: Select all holes, then
deselect all holes outside the polygon.
Append/Select/inside: Select all holes inside the polygon.
Leave selections outside as is.
Append/Select/outside: Select all holes outside the polygon.
Leave selections inside as is.
Append/Deselect/inside: Deselect all holes inside the polygon
Leave selections outside as is.
Append/Deselect/outside: Deselect all holes outside the polygon.
Leave selections inside as is.
set_crooked_section_ipj(ipj)

Pass the Crooked projection required for plotting to a crooked section.

Parameters:ipj (GXIPJ) – Crooked Section GXIPJ

New in version 7.2.

License: Geosoft Extended End-User License

Note: This might be extracted from an existing crooked section view, or created from a database line.

set_current_view_name(cur_view)

Set the current map view name.

Parameters:cur_view (str) – View name

New in version 7.2.

License: Geosoft Extended End-User License

Note: Can be used to specify the name of the view to plot into.

set_info(hole, name, data)

Set Collar Information.

Parameters:
  • hole (int) – Hole index
  • name (str) – Name of information
  • data (str) – Information

New in version 5.0.

License: Geosoft Extended End-User License

Note: If the DH_ELEV channel is requested it will also search for the DH_RL channel, which is the new name for the collar elevation.

set_ipj(ipj)

Set the project GXIPJ.

Parameters:ipj (GXIPJ) – GXIPJ Handle

New in version 5.1.8.

License: Geosoft Extended End-User License

Note: The projection for the project is the projection stored in the DH_EAST channel in the collar table. This function sets the projection of the (DH_EAST, DH_NORTH) channel pairs in each of the project databases to the input GXIPJ. The input GXIPJ cannot be a geographic coordinate system or this call will fail with an error message.

set_map(map)

Store the current GXMAP to the GXDH object.

Parameters:map (GXMAP) – GXIPJ Handle

New in version 7.1.

License: Geosoft Extended End-User License

Note: Use this before calling the ReplotHoles functions, so that, instead of creating a new map, the plotting functions use the existing one.

set_new_ipj(db)

Set a new project database projection to collar table projection.

Parameters:db (str) – Project database name

New in version 5.1.8.

License: Geosoft Extended End-User License

Note: Gets the GXIPJ of the collar table current x channel and copies it into the named database (as long as it is in the project!)

set_selected_holes_vv(vv, append)

Set hole selection using hole indices.

Parameters:
  • vv (GXVV) – Input hole indices (must be type INT)
  • append (int) – 0 - overwrite, 1 - append

New in version 8.0.

License: Geosoft Extended End-User License

classmethod set_template_blob(db, template, imp_type)

Store the import template to the database.

Parameters:

New in version 6.0.

License: Geosoft Extended End-User License

Note: The template can later be retrieved in order to refresh the database with a call to the DHIMPORT.GX.

The import types correspond to the DHIMPORT.IMPTYPE variable: 0: ASCII, 1: Database/XLS, 2: ODBC

significant_intersections_db(mast_db, comp_db, hol_sel, assay_ch, cut_off_grade, clip_grade, min_composite_thickness, min_composite_grade, max_internal_dilution_length, min_internal_dilution_grade, grade_for_missing_assays)

Make a report of Significant Intersections

Parameters:
  • mast_db (GXDB) – Input assay GXDB object
  • comp_db (GXDB) – Output composite GXDB object
  • hol_sel (int) – DH_COMPSTDB_HOLSEL constants
  • assay_ch (str) – The primary assay channel.
  • cut_off_grade (float) – Minimum Cut off grade for Primary Assay
  • clip_grade (float) – Maximum Cut off grade for Primary Assay
  • min_composite_thickness (float) – Minimum Composite Length
  • min_composite_grade (float) – Minimum Composite thickness
  • max_internal_dilution_length (float) – Maximum Internal Dilution
  • min_internal_dilution_grade (float) – Minimum diluted grade
  • grade_for_missing_assays (float) – Grade for Missing Assays

New in version 7.2.

License: Geosoft Extended End-User License

slice_selection_tool_gui(aoix1, aoiy1, aoix2, aoiy2, aoix3, aoiy3, aoix4, aoiy4, x1, y1, x2, y2)

Select a slice with the holes in context. An optional 4 point area of interest (AOI) can be added to be represented in the UI too.

Parameters:
  • aoix1 (float) – 1st Corner of AOI - X
  • aoiy1 (float) – 1st Corner of AOI - Y
  • aoix2 (float) – 2nd Corner of AOI - X
  • aoiy2 (float) – 2nd Corner of AOI - Y
  • aoix3 (float) – 3rd Corner of AOI - X
  • aoiy3 (float) – 3rd Corner of AOI - Y
  • aoix4 (float) – 4th Corner of AOI - X
  • aoiy4 (float) – 4th Corner of AOI - Y
  • x1 (float_ref) – Returned slice 1st point - X
  • y1 (float_ref) – Returned slice 1st point - Y
  • x2 (float_ref) – Returned slice 2nd point - X
  • y2 (float_ref) – Returned slice 2nd point - Y
Returns:

0 - Ok -1 - User Cancelled

Return type:

int

New in version 7.2.

License: Geosoft Extended End-User License

string_chan_lst(lst)

Fills a GXLST with available string channel code values.

Parameters:lst (GXLST) – GXLST to fill with channel code values.

New in version 7.2.

License: Geosoft Extended End-User License

Note: Channel codes are in the format “[Assay] Au”, where the name in the square brackets is descriptive part of the project database containing the given channel name. The above code might refer to the “Au” channel in the “Tutorial_Assay.gdb” database.

string_from_to_data_lst(assay, lst)

Fills a GXLST with available string-type channel code values from From-To databases.

Parameters:
  • assay (str) – Assay dataset (“” for all)
  • lst (GXLST) – GXLST to fill with channel code values.

New in version 7.2.

License: Geosoft Extended End-User License

Note: Channel codes are in the format “[Geology] Lithology”, where the name in the square brackets is descriptive part of the project database containing the given channel name. The above code might refer to the “Lithology” channel in the “Tutorial_Geology.gdb” database.

surface_intersections(output_db, input_geosurface_or_grid, hole_selection)

Determine intersections of drillholes with a surface.

Parameters:
  • output_db (GXDB) – Output GXDB Handle
  • input_geosurface_or_grid (str) – Input surface file
  • hole_selection (int) – Selected holes (1), All holes (0)

New in version 8.3.

License: Geosoft Extended End-User License

test_import_las(assay, file, interval, wa, warn)

Tests import of LAS Data for problems.

Parameters:
  • assay (str) – Assay table name
  • file (str) – LAS file name
  • interval (float) – Averaging/desampling interval
  • wa (GXWA) – Log file handle
  • warn (int_ref) – 1 returned if problems found

New in version 6.0.1.

License: Geosoft Extended End-User License

Note: See import_las. Determines if the import of the LAS data will result in data being overwritten, interpolated or resampled. Warnings are written to a log file, as in sImportLAS_DH. Warnings are not registered in cases where data is merely extended at the start or the end with dummies to match a different interval down the hole.

un_select_all_holes()

Unselect all the holes in a Drill hole project.

New in version 5.0.

License: Geosoft Extended End-User License

un_selected_hole_lst(lst)

Populate an GXLST with the list of the unselected holes

Parameters:lst (GXLST) – GXLST handle

New in version 6.3.

License: Geosoft Extended End-User License

update_collar_table()

Update all collar table information.

New in version 5.0.

License: Geosoft Extended End-User License

update_hole_extent(hole)

Update extents for one hole.

Parameters:hole (int) – Hole index

New in version 5.0.

License: Geosoft Extended End-User License

update_survey_from_collar(hole)

Update the Survey table from the collar info.

Parameters:hole (int) – Hole index
Returns:0 - No change; there is no survey table, the table was empty, or values were same as collar 1 - Survey table updated; values changed and there is just one row. 2 - Survey table unchanged; there was more than one row in the table, and values were different
Return type:int

New in version 7.1.

License: Geosoft Extended End-User License

Note: Call when the collar values are edited to update the survey table values. If the survey contains more than one row, then no changes are applied, and no warning or error is registered.

wholeplot(job, plot_type)

Run a Wholeplot plot job.

Parameters:

New in version 5.1.2.

License: Geosoft Extended End-User License

Note: The parameter file must correspond to the plot Type. The INI file contains settings for all of the non-database data related parameters (e.g. Map template, scale, boundaries, section definitions, hole trace parameters etc...)

DH_DEFAULT_FILENAMES constants

Default filenames

DH_DEFAULT_ROCKCODE_FILE

Dh default rockcode file

gxapi.DH_DEFAULT_ROCKCODE_FILE = 'agso.csv'
DH_DEFAULT_STRUCTURECODE_FILE

Dh default structurecode file

gxapi.DH_DEFAULT_STRUCTURECODE_FILE = 'structcodes.csv'

STR_DH_HOLES constants

This declares the size of the string used in various GXDH GXs to store all the currently selected holes, as input to the two-panel selection tool. This should be big enough for 65,000 16-character hole names!

STR_DH_HOLES

Str dh holes

gxapi.STR_DH_HOLES = 1048576

DH_COMP_CHOICE constants

Composition

DH_COMP_DONE

User is done

gxapi.DH_COMP_DONE = 0
DH_COMP_CANCEL

User canceled

gxapi.DH_COMP_CANCEL = -1
DH_COMP_SELECT

User chose to select an interval interactively

gxapi.DH_COMP_SELECT = 1
DH_COMP_REFRESH

User chose to refresh

gxapi.DH_COMP_REFRESH = 2

DH_COMPSTDB_HOLSEL constants

Composite Hole Selection

DH_COMPSTDB_HOLSEL_ALL

All

gxapi.DH_COMPSTDB_HOLSEL_ALL = 0
DH_COMPSTDB_HOLSEL_SELECTED

Selected

gxapi.DH_COMPSTDB_HOLSEL_SELECTED = 1

DH_COMPSTDB_INTSEL constants

Composite Interval

DH_COMPSTDB_INTSEL_FIXED

Fixed

gxapi.DH_COMPSTDB_INTSEL_FIXED = 0
DH_COMPSTDB_INTSEL_LITHOLOGY

Lithology

gxapi.DH_COMPSTDB_INTSEL_LITHOLOGY = 1
DH_COMPSTDB_INTSEL_BESTFITLITH

Bestfitlith

gxapi.DH_COMPSTDB_INTSEL_BESTFITLITH = 2
DH_COMPSTDB_INTSEL_INTFILE

Intfile

gxapi.DH_COMPSTDB_INTSEL_INTFILE = 3

DH_DATA constants

What to import

DH_DATA_DIPAZIMUTH

Dipazimuth

gxapi.DH_DATA_DIPAZIMUTH = 0
DH_DATA_EASTNORTH

Eastnorth

gxapi.DH_DATA_EASTNORTH = 1
DH_DATA_FROMTO

Fromto

gxapi.DH_DATA_FROMTO = 2
DH_DATA_POINT

Point

gxapi.DH_DATA_POINT = 3
DH_DATA_COLLAR

Collar

gxapi.DH_DATA_COLLAR = 4
DH_DATA_UNKNOWN

The type is not known

gxapi.DH_DATA_UNKNOWN = 100

DH_DEFINE_PLAN constants

Plans

DH_DEFINE_PLAN

Dh define plan

gxapi.DH_DEFINE_PLAN = 1

DH_DEFINE_SECT constants

Types of Sections

DH_DEFINE_SECT_NS

Ns

gxapi.DH_DEFINE_SECT_NS = 1
DH_DEFINE_SECT_EW

Ew

gxapi.DH_DEFINE_SECT_EW = 2
DH_DEFINE_SECT_ANGLED

Angled

gxapi.DH_DEFINE_SECT_ANGLED = 3

DH_EXP constants

Type of Export

DH_EXP_CSV

Csv

gxapi.DH_EXP_CSV = 0
DH_EXP_ASCII

Ascii

gxapi.DH_EXP_ASCII = 1
DH_EXP_ACCESS

Access

gxapi.DH_EXP_ACCESS = 2
DH_EXP_SHP

Collars as points

gxapi.DH_EXP_SHP = 3
DH_EXP_SURPAC

To Surpace Geological database (special format ACCESS)

gxapi.DH_EXP_SURPAC = 4
DH_EXP_SHP_TRACES

Hole traces as polylines

gxapi.DH_EXP_SHP_TRACES = 5

DH_HOLES constants

Holes to select

DH_HOLES_ALL

All

gxapi.DH_HOLES_ALL = 0
DH_HOLES_SELECTED

Selected

gxapi.DH_HOLES_SELECTED = 1

DH_MASK constants

Masks

DH_MASK_APPEND

Append

gxapi.DH_MASK_APPEND = 0
DH_MASK_NEW

New

gxapi.DH_MASK_NEW = 1

DH_PLOT constants

Type of Plot

DH_PLOT_PLAN

Plan

gxapi.DH_PLOT_PLAN = 0
DH_PLOT_SECTION

Section

gxapi.DH_PLOT_SECTION = 1
DH_PLOT_STRIPLOG

Striplog

gxapi.DH_PLOT_STRIPLOG = 2
DH_PLOT_HOLE_TRACES

Hole traces

gxapi.DH_PLOT_HOLE_TRACES = 3
DH_PLOT_3D

3d

gxapi.DH_PLOT_3D = 4
DH_PLOT_SECTION_STACK

Section stack

gxapi.DH_PLOT_SECTION_STACK = 5
DH_PLOT_SECTION_FENCE

Section fence

gxapi.DH_PLOT_SECTION_FENCE = 6
DH_PLOT_SECTION_CROOKED

Section crooked

gxapi.DH_PLOT_SECTION_CROOKED = 7

DH_SECT_PAGE constants

Sections

DH_SECT_PAGE_SECTION

Section

gxapi.DH_SECT_PAGE_SECTION = 1

DH_SURFACE constants

Surface selection for creation of geological top or bottom surfaces.

DH_SURFACE_FIRST_LAYER_FROM

First layer from

gxapi.DH_SURFACE_FIRST_LAYER_FROM = 0
DH_SURFACE_FIRST_LAYER_TO

First layer to

gxapi.DH_SURFACE_FIRST_LAYER_TO = 1
DH_SURFACE_SECOND_LAYER_FROM

Second layer from

gxapi.DH_SURFACE_SECOND_LAYER_FROM = 2
DH_SURFACE_SECOND_LAYER_TO

Second layer to

gxapi.DH_SURFACE_SECOND_LAYER_TO = 3
DH_SURFACE_LAST_LAYER_FROM

Last layer from

gxapi.DH_SURFACE_LAST_LAYER_FROM = 4
DH_SURFACE_LAST_LAYER_TO

Last layer to

gxapi.DH_SURFACE_LAST_LAYER_TO = 5

DIP_CONVENTION constants

Dip convention

DIP_CONVENTION_NEGATIVE

Negative

gxapi.DIP_CONVENTION_NEGATIVE = -1
DIP_CONVENTION_POSITIVE

Positive

gxapi.DIP_CONVENTION_POSITIVE = 1