GXDAT class

class GXDAT(handle=0)[source]

GXDAT class.

The GXDAT object is used to access data from an variety of data sources using the same access functions. The GXDAT interface supports data access on a point-by-point, of line-by-line basis. For example, the GXBIGRID.run function uses 2 GXDAT objects - one GXDAT associated with the input data source, which is read line-by-line, and a second associated with the output grid file output grid file.

Use a specific GXDAT creation method for an associated information source in order to make a GXDAT as required by a specific processing function. The gridding methods all use DATs.

__init__(handle=0)[source]

Initialize self. See help(type(self)) for accurate signature.

classmethod create_db(db, x_ch, y_ch, z_ch)[source]

Create a handle to a database GXDAT object

Parameters
  • db (GXDB) – Handle to database which GXDAT is connected with

  • x_ch (str) – Name of X channel in database

  • y_ch (str) – Name of Y channel in database

  • z_ch (str) – Name of Z channel in database

Returns

GXDAT Object

Return type

GXDAT

New in version 5.0.

License: Geosoft Open License

classmethod create_xgd(name, mode)[source]

Create a handle to a grid file GXDAT object

Parameters
Returns

GXDAT Object

Return type

GXDAT

New in version 5.0.

License: Geosoft Open License

classmethod get_lst(lst, interface_name, flags, mode)[source]

Put available GXDAT filters and qualifiers in a GXLST

Parameters

New in version 5.1.8.

License: Geosoft Open License

Note: The filters displayed in the Grid/Image file browse dialog are put in the “Name” of the GXLST, while the file qualifiers are stored in the “Value”.

is_null()[source]

Check if this is a null (undefined) instance

Returns

True if this is a null (undefined) instance, False otherwise.

Return type

bool

classmethod null()[source]

A null (undefined) instance of GXDAT

Returns

A null GXDAT

Return type

GXDAT

range_xyz(min_x, min_y, min_z, max_x, max_y, max_z, num_non_dummy)[source]

Determine the range in X, Y and Z in the GXDAT source

Parameters

New in version 7.3.

License: Geosoft Open License

Note: Terminates if unable to open an RPT GXDAT interface.

DAT_FILE constants

Type of grid

DAT_FILE_GRID

Grid

gxapi.DAT_FILE_GRID = 1
DAT_FILE_IMAGE

Image

gxapi.DAT_FILE_IMAGE = 2

DAT_FILE_FORM constants

Type of form

DAT_FILE_FORM_OPEN

Open

gxapi.DAT_FILE_FORM_OPEN = 0
DAT_FILE_FORM_SAVE

Save

gxapi.DAT_FILE_FORM_SAVE = 1

DAT_XGD constants

GXDAT Open modes

DAT_XGD_READ

Read

gxapi.DAT_XGD_READ = 0
DAT_XGD_NEW

New

gxapi.DAT_XGD_NEW = 1
DAT_XGD_WRITE

Write

gxapi.DAT_XGD_WRITE = 2