GXDB class¶
-
class
geosoft.gxapi.
GXDB
¶ The DB class is used to create, open and work with databases and database symbols. Database symbols are objects inside databases, such as lines, channels and blobs
Note:
The follwing defines are not used by any methods but are used by GX's: DB_ACTIVITY_BLOB constant
-
add_associated_load
((int)arg1, (int)arg2) → None:¶ Add this channel to the auto-load feature of the group.
Parameters: - arg1 (int) – Line
- arg2 (int) – Channel
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
If the channel is not yet associated, it is first associated. If the channel is already in the associated-load list, this does nothing. As of v6.0, the load-status of channels is no longer stored in the database, but in the project, so this function is equivalent to calling
geosoft.gxapi.GXDB.associate()
.
-
add_comment
((str)arg1, (str)arg2, (int)arg3) → None:¶ Add a comment with a string to the activity log of the database.
Parameters: - arg1 (str) – Comment
- arg2 (str) – String
- arg3 (int) – Indent comment one tab? (TRUE or FALSE)
Returns: Nothing
Return type: None
New in version 5.0.8.
Note:
The comment is written in the form: Comment: String2 and is followed by a carriage return. The activity log is created automatically if it does not exist.
-
add_double_comment
((str)arg1, (float)arg2, (bool)arg3) → None:¶ Add a comment with a float value to the activity log of the database.
Parameters: - arg1 (str) – Comment
- arg2 (float) – Value
- arg3 (bool) – Indent comment one tab? bool
Returns: Nothing
Return type: None
New in version 5.0.8.
Note:
The comment is written in the form: Comment: Value and if followed by a carriage return. The activity log is created automatically if it does not exist. See Notes in
geosoft.gxapi.GXDB.add_comment()
.
-
add_int_comment
((str)arg1, (int)arg2, (bool)arg3) → None:¶ Add a comment with an integer to the activity log of the database.
Parameters: - arg1 (str) – Comment
- arg2 (int) – value
- arg3 (bool) – Indent comment one tab? bool
Returns: Nothing
Return type: None
New in version 5.0.8.
Note:
The comment is written in the form: Comment: Value and is followed by a carriage return. The activity log is created automatically if it does not exist. See Notes in
geosoft.gxapi.GXDB.add_comment()
.
-
add_time_comment
((str)arg1, (bool)arg2) → None:¶ Add a comment with the date and time to the activity log of the database.
Parameters: - arg1 (str) – Comment
- arg2 (bool) – Indent comment one tab? bool
Returns: Nothing
Return type: None
New in version 5.0.8.
Note:
The comment is written in the form: Comment: 2001/12/31 23:59:59 and is followed by a carriage return. The activity log is created automatically if it does not exist. See Notes in
geosoft.gxapi.GXDB.add_comment()
.
-
array_lst
((GXLST)arg1) → None:¶ Load a LST object with array (VA) channel symbols.
Parameters: arg1 ( geosoft.gxapi.GXLST
) – List to PopulateReturns: Nothing Return type: None New in version 5.0.0.
-
array_size_lst
((int)arg1, (GXLST)arg2) → None:¶ Load a LST object with array (VA) channel symbols with a particular number of columns.
Parameters: - arg1 (int) – Number of columns in array ( > 1 )
- arg2 (
geosoft.gxapi.GXLST
) – List to Populate
Returns: Nothing
Return type: None
New in version 8.2.0.
-
associate
((int)arg1, (int)arg2) → None:¶ Associate a channel with a group.
Parameters: - arg1 (int) – group line
- arg2 (int) – Channel
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
If it is already associated, or if the group has no defined group class, does nothing. As of v6.3, if a group line has no class defined, then ALL channels are assumed to be associated with it. This means that you need to associate a new channel with a group only in those cases where the group class is defined. If this function is used on a group with a group class, then the channel is added to class's association list, and the channel will be recognized as being associated with all groups of that class.
-
associate_all
((int)arg1) → None:¶ Associate all channels with a group.
Parameters: arg1 (int) – group line Returns: Nothing Return type: None New in version 5.0.0.
Note:
As of v6.3, if a group line has no class defined, then ALL channels are already assumed to be associated with it, and this function does nothing.
-
associate_class
((int)arg1, (str)arg2) → None:¶ Associate a channel with all groups of a specific class.
Parameters: - arg1 (int) – Channel
- arg2 (str) – Class name of groups to associate the channel with. (Must be defined).
Returns: Nothing
Return type: None
New in version 5.1.1.
Note:
As of v6.3, if a group line has no class defined, then ALL channels are automatically assumed to be associated with it.
-
blobs_max
() → int:¶ Gets Maximum Number of Blobs in the Database
Returns: Maximum Number of Blobs in the Database Return type: int New in version 5.1.1.
-
static
can_open
((str)arg1, (str)arg2, (str)arg3) → bool:¶ This method checks whether it is possible to open a database.
Parameters: - arg1 (str) – name of the Database File to Open
- arg2 (str) – Name of the user (“SUPER” normally)
- arg3 (str) – Password of the user (“” normally)
Returns: bool
Return type: bool
New in version 6.1.0.
Note:
This method is useful to determine if another session already locked a database. By using this method before an
geosoft.gxapi.GXDB.open()
a GX may handle errors like this more gracefully.
-
static
can_open_read_only
((str)arg1, (str)arg2, (str)arg3) → bool:¶ This method checks whether it is possible to open a database in read-only mode.
Parameters: - arg1 (str) – name of the Database File to Open
- arg2 (str) – Name of the user (“SUPER” normally)
- arg3 (str) – Password of the user (“” normally)
Returns: bool
Return type: bool
New in version 6.4.2.
Note:
This method is useful to determine if another session already locked a database. By using this method before an
geosoft.gxapi.GXDB.open_read_only()
a GX may handle errors like this more gracefully.
-
chan_lst
((GXLST)arg1) → None:¶ Load a LST with database channels.
Parameters: arg1 ( geosoft.gxapi.GXLST
) – List to PopulateReturns: Nothing Return type: None New in version 6.3.0.
Note:
Populates a LST with channel symbols. The name is put into the "Name" part of the LST (0), and the handle, an integer value written as a string, is placed in the value part of the LST (1). Array channels are included, as well as virtual channels (array channel single columns loaded in the database like "Chan[1]". The LST is cleared first, and the items are sorted by name.
-
chans_max
() → int:¶ Gets Maximum Number of Channels in the Database
Returns: Maximum Number of Channels in the Database Return type: int New in version 5.1.1.
-
check
() → int:¶ Does an integrity check of the data in the database to ensure it is valid.
Returns: 0 - Ok 1 - Invalid Blocks in the Database Return type: int New in version 6.0.1.
-
class_chan_list
((GXVV)arg1, (str)arg2) → int:¶ Place a list of channels for a given class in a VV.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV to populate, must be type INT. - arg2 (str) – Class name to match (“” for all)
Returns: Number of symbols.
Return type: int
New in version 5.0.5.
Note:
This method generates a list of symbols in the database and places their handles into a VV. The list is not sorted. Only channels with the given class name are included, e.g. use "ASSAY" for assay channels used in CHIMERA.
- arg1 (
-
class_chan_lst
((GXLST)arg1, (str)arg2) → None:¶ Load a LST with channels in a particular class.
Parameters: - arg1 (
geosoft.gxapi.GXLST
) – LST object to populate - arg2 (str) – CLASS name for the channel (“” for all)
Returns: Nothing
Return type: None
New in version 5.0.3.
Note:
The Name of the symbol is placed in the item name and the item value is set to the symbol handle. Only channels with the given class name are included, e.g. use "ASSAY" for assay channels in CHIMERA. The LST is cleared first, and the items are sorted by name.
- arg1 (
-
class_group_lst
((GXLST)arg1, (str)arg2) → None:¶ Load a LST with group lines in a particular class.
Parameters: - arg1 (
geosoft.gxapi.GXLST
) – LST object to populate - arg2 (str) – CLASS name for the group (“” for all)
Returns: Nothing
Return type: None
New in version 5.0.8.
Note:
The Name of the symbol is placed in the item name and the item value is set to the symbol handle. Only group lines with the given class name are included, e.g. use "TARGETS" for UX-Detect Target groups. The LST is cleared first, and the items are sorted by name.
- arg1 (
-
commit
() → None:¶ This method forces all changes to the database to be saved.
Returns: Nothing Return type: None New in version 5.0.0.
-
compact
() → None:¶ Removes any extra space from the database. This will reduce the database to its smallest size.
Returns: Nothing Return type: None New in version 5.1.1.
-
coord_pair
((str)arg1, (str_ref)arg2) → int:¶ Get the matching coordinate pair of a channel.
Parameters: - arg1 (str) – channel name
- arg2 (
geosoft.gxapi.str_ref
) – string in which to place paired channel name
Returns: Return type: int
New in version 5.0.0.
Note:
If the channel does not have a matching coordinate pair, or of the channel does not exist, the returned string will be empty.
-
copy_data
((int)arg1, (int)arg2, (int)arg3) → None:¶ This method copies the data from one channel to another on on the specified line. The data is converted if such conversion in neccessary.
Parameters: - arg1 (int) – Line
- arg2 (int) – Channel to Copy Data From
- arg3 (int) – Channel to Copy Data To
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
All the data in the destination channel is destroyed along with the fiducial start and increment.
-
count_sel_lines
() → int:¶ This method counts the number of selected lines in the database.
Returns: x - Number of selected lines in the database Return type: int New in version 5.0.0.
-
static
create
((str)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (str)arg7, (str)arg8) → None:¶ This method makes a brand new database of the specified size. The database is opened in ReadWrite Mode.
Parameters: - arg1 (str) – name of the Database File to Create
- arg2 (int) – Max Lines in the Database (200)
- arg3 (int) – Max Channels in the Database (50)
- arg4 (int) – Max Blobs in the Database (Channels+Lines+20)
- arg5 (int) – Max Users in the Database (10)
- arg6 (int) – Number of Erase Caches (100)
- arg7 (str) – Name of the Super User “SUPER”
- arg8 (str) – Password of the Super User “”
Returns: Nothing
Return type: None
New in version 5.0.0.
-
static
create_comp
((str)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (str)arg7, (str)arg8, (int)arg9, (int)arg10) → None:¶ This method makes a brand new database of the specified size. The database is opened in ReadWrite Mode. Also allows you to set paging size and the Compression Level.
Parameters: - arg1 (str) – name of the Database File to Create
- arg2 (int) – Max Lines in the Database (200)
- arg3 (int) – Max Channels in the Database (50)
- arg4 (int) – Max Blobs in the Database (Channels+Lines+20)
- arg5 (int) – Max Users in the Database (10)
- arg6 (int) – Number of Erase Caches (100)
- arg7 (str) – Name of the Super User “SUPER”
- arg8 (str) – Password of the Super User “”
- arg9 (int) – Page Size Must be (64,128,256,512,1024,2048,4096) normally 1024
- arg10 (int) – DB_COMP constants
Returns: Nothing
Return type: None
New in version 5.0.0.
-
create_dup
((str)arg1) → None:¶ This method makes a brand new database identical to the input Database in-size. The database is opened in ReadWrite Mode.
Parameters: arg1 (str) – name of the Database File to Create Returns: Nothing Return type: None New in version 5.0.0.
-
create_dup_comp
((str)arg1, (int)arg2) → None:¶ This method makes a brand new database identical to the input Database in-size except it changes the compression. The database is opened in ReadWrite Mode.
Parameters: - arg1 (str) – name of the Database File to Create
- arg2 (int) – DB_COMP constants
Returns: Nothing
Return type: None
New in version 5.0.0.
-
static
create_ex
((str)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6, (str)arg7, (str)arg8, (int)arg9) → None:¶ This method makes a brand new database of the specified size. The database is opened in ReadWrite Mode. Also allows you to set paging size.
Parameters: - arg1 (str) – name of the Database File to Create
- arg2 (int) – Max Lines in the Database (200)
- arg3 (int) – Max Channels in the Database (50)
- arg4 (int) – Max Blobs in the Database (Channels+Lines+20)
- arg5 (int) – Max Users in the Database (10)
- arg6 (int) – Number of Erase Caches (100)
- arg7 (str) – Name of the Super User “SUPER”
- arg8 (str) – Password of the Super User “”
- arg9 (int) – Page Size Must be (64,128,256,512,1024,2048,4096) normally 1024
Returns: Nothing
Return type: None
New in version 5.0.0.
-
create_symb
((str)arg1, (int)arg2, (int)arg3, (int)arg4) → int:¶ Create a new Symbol.
Parameters: - arg1 (str) – Symbol Name
- arg2 (int) – DB_SYMB_TYPE constants
- arg3 (int) – DB_OWN constants
- arg4 (int) – DB_CATEGORY_USER constants, DB_CATEGORY_LINE constants, DB_CATEGORY_CHAN constants, DB_CATEGORY_BLOB constants
Returns: DB_SYMB Object
Return type: int
New in version 5.0.0.
Note:
If symbol already exits, and it is the same type simply returns a handle to the existing symbol. This method simple calls
geosoft.gxapi.GXDB.create_symb_ex()
with the extra info set to 1. STRING-type channels: To create a string-type channel, enter a negative number for the channel category below. For instance, "-32" will create a string channel with 32 characters per item. BLOBS: Blobs (Binary Large Objects) can be used for storing miscellaneous data which does not fit well into any of the other various storage objects, such as a REG. Generally, one or more objects is serialized to a BF object, which is then written to the blob using the sWriteBlobBF_DB() function. Retrieval is done in the reverse order, using sWriteBlobBF_DB() first, then extracting the objects from the BF object. To avoid namespace problems, Geosoft reserves the following name prefixes: OE. (Core functions) GS. (Applications) CS. (Custom Solutions applications) Programmers should avoid using the above prefixes as the starting letters of their blob names to avoid any possible conflicts.
-
create_symb_ex
((str)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5) → int:¶ Create a new Symbol.
Parameters: - arg1 (str) – Symbol Name
- arg2 (int) – DB_SYMB_TYPE constants
- arg3 (int) – DB_OWN constants
- arg4 (int) – DB_CATEGORY_USER constants, DB_CATEGORY_LINE constants, DB_CATEGORY_CHAN constants, DB_CATEGORY_BLOB constants
- arg5 (int) – Extra info, which depends on DB_SYMB_TYPE constants DB_SYMB_CHAN - element width for a VA channel ignores for all other DB_SYMB_TYPE constants types
Returns: DB_SYMB handle.
Return type: int
New in version 5.0.0.
Note:
If symbol already exits it is returned. STRING-type channels: To create a string-type channel, enter a negative number for the channel category below. For instance, "-32" will create a string channel with 32 characters per item. Symbol name for DB_CATEGORY_LINE_FLIGHT must conform to the following line naming syntax: [type][number.version:flight] Type can be: L - normal line B - base line T - tie line R - trend line S - test line P - special line Examples: L100, T100.1:16 Note the "Flight" is any whole number that may be useful to differentiate processing tasks. The ability to create a VA channel is not available in the free interface and requires a Montaj license.
-
csv_chan_lst
((GXLST)arg1, (str)arg2) → None:¶ Load a LST with channels in a comma-separated list.
Parameters: - arg1 (
geosoft.gxapi.GXLST
) – LST object to populate - arg2 (str) – comma-separated list of channels
Returns: Nothing
Return type: None
New in version 6.2.0.
Note:
The Name of the symbol is placed in the item name and the item value is set to the symbol handle. Only channels in the list which are present in the database are included. The LST is cleared first.
- arg1 (
-
del_line0
() → None:¶ Delete Empty Line 0.
Returns: Nothing Return type: None New in version 7.0.0.
Note:
A new database is created with a single, empty line L0, but many processes create databases then create their own lines, so the empty line L0 may remain after the process finishes. This function will delete a line L0 a) If it exists and is empty b) It is not the only line in the database.
See also
geosoft.gxapi.GXEDB.del_line0()
- deletes an empty line 0 from the currently edited database.
-
delete_symb
((int)arg1) → None:¶ This method destroys a symbol in the database and all the data associated with it. The symbol's lock is automatically removed.
Parameters: arg1 (int) – Symbol to Delete (must be READWRITE locked) Returns: Nothing Return type: None New in version 5.0.0.
-
discard
() → None:¶ This method discards all changes made to the database since the last commit or opening.
Returns: Nothing Return type: None New in version 5.0.0.
-
dup_line_symb
((int)arg1, (str)arg2) → int:¶ Duplicate a line symbol from a group or line symbol. The new name must not already exist in the database.
Parameters: - arg1 (int) – Symbol Handle to duplicate
- arg2 (str) – Name of the New Symbol
Returns: New Symbol Handle
Return type: int
New in version 5.0.0.
-
dup_symb
((int)arg1, (str)arg2) → int:¶ New Symbol by duplicating an existing symbol, LOCKED
Parameters: - arg1 (int) – Symbol Handle to duplicate
- arg2 (str) – Name of the New Symbol
Returns: New Symbol Handle
Return type: int
New in version 5.0.0.
Note:
The symbol will be locked READWRITE. The new name must not already exist in the database.
-
dup_symb_across
((GXDB)arg1, (int)arg2) → int:¶ Create a new Symbol by duplicating an existing symbol. exactly the same type but in output database. The symbol must not already exist in the output database.
Parameters: - arg1 (
geosoft.gxapi.GXDB
) – Database output - arg2 (int) – Symbol Handle to duplicate
Returns: New Symbol Handle
Return type: int
New in version 5.0.0.
- arg1 (
-
dup_symb_no_lock
((int)arg1, (str)arg2) → int:¶ New Symbol by duplicating an existing symbol, NO LOCK.
Parameters: - arg1 (int) – Symbol Handle to duplicate
- arg2 (str) – Name of the New Symbol
Returns: New Symbol Handle
Return type: int
New in version 5.0.0.
Note:
The symbol will be NOT be locked. The new name must not already exist in the database.
See also
-
easy_maker_symb
((int)arg1, (str)arg2, (str)arg3) → None:¶ Adds a Maker to the database symbol based on current GX
Parameters: - arg1 (int) – Symbol to create maker for
- arg2 (str) – Maker name, used in menu prompt
- arg3 (str) – INI groups (terminate each with a ”;”)
Returns: Nothing
Return type: None
New in version 5.0.0.
-
exist_chan
((str)arg1) → int:¶ See if the specified channel exists in the database.
Parameters: arg1 (str) – Name of Channel Returns: 0 - Symbol does not exist in the database 1 - Symbol Exists Return type: int New in version 5.1.3.
Note:
See notes for
geosoft.gxapi.GXDB.exist_symb()
. Introduced in v5.1.3.geosoft.gxapi.GXDB.exist_chan()
searches using the exact channel name.
-
exist_symb
((str)arg1, (int)arg2) → int:¶ This method checks to see if the specified symbol exists in the database.
Parameters: - arg1 (str) – Name of Symbol
- arg2 (int) – DB_SYMB_TYPE constants
Returns: 0 - Symbol does not exist in the database 1 - Symbol Exists
Return type: int
New in version 5.0.0.
Note:
For backward compatibility with GXs not employing the GetXYZChan_DB function, the following behaviour has been introduced as of v5.1.3: (also true for "Y").
geosoft.gxapi.GXDB.exist_symb()
(hDB, "X", DB_SYMB_CHAN) is now equivalent to: GetXYZChan_DB(hDB, DB_CHAN_X, sXCh);geosoft.gxapi.GXDB.exist_symb()
(hDB, sXCh, DB_SYMB_CHAN); In other words, the current X or Y is searched for, not necessarily the literal "X" or "Y". This ensures that newer databases, which might have "Easting" and "Northing" (or other similar names) instead of "X" and "Y" will still work with older GXs expecting "X" and "Y". The newgeosoft.gxapi.GXDB.exist_chan()
searches using the exact channel name.
-
find_chan
((str)arg1) → int:¶ Get handle to the specified channel.
Parameters: arg1 (str) – Name of channel Returns: Channel Handle, NULLSYMB constant if not defined Return type: int New in version 5.1.3.
Note:
To work with a specific column from a VA channel, specify the VA element number in square brackets as part of the VA channel name (e.g. "EM[3]" will treat the fourth column of the VA channel as a VV). See notes for
geosoft.gxapi.GXDB.find_symb()
. Introduced in v5.1.3. The newgeosoft.gxapi.GXDB.find_chan()
searches using the exact channel name.
-
find_symb
((str)arg1, (int)arg2) → int:¶ Get handle to the specified symbol.
Parameters: - arg1 (str) – Name of symbol
- arg2 (int) – DB_SYMB_TYPE constants
Returns: Symbol Handle, NULLSYMB constant if not defined
Return type: int
New in version 5.0.0.
Note:
To work with a specific column from a VA channel, specify the VA element number in square brackets as part of the VA channel name (e.g. "EM[3]" will treat the fourth column of the VA channel as a VV). For backward compatibility with GXs not employing the
geosoft.gxapi.GXDB.get_xyz_chan_symb()
function, the following behaviour has been introduced as of v5.1.3: (also true for "Y").geosoft.gxapi.GXDB.find_symb()
(hDB, "X", DB_SYMB_CHAN) is now equivalent to:geosoft.gxapi.GXDB.get_xyz_chan_symb()
(hDB, DB_CHAN_X); In other words, the current X or Y is searched for, not necessarily the literal "X" or "Y". This ensures that newer databases, which might have "Easting" and "Northing" (or other similar names) instead of "X" and "Y" will still work with older GXs expecting "X" and "Y". The newgeosoft.gxapi.GXDB.find_chan()
searches using the exact channel name.
-
first_sel_line
() → int:¶ This method will return a handle to the first selected line in the database.
Returns: Line Handle (use iIsLineValid method to see if valid) Return type: int New in version 5.0.0.
-
format_chan
((int)arg1, (float)arg2, (str_ref)arg3) → None:¶ Format a real value based on a channel format.
Parameters: - arg1 (int) – channel handle
- arg2 (float) – value to format
- arg3 (
geosoft.gxapi.str_ref
) – string
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
If the passed string is too short, the result will be "**".
-
static
gen_valid_chan_symb
((str)arg1, (str_ref)arg2) → None:¶ Generate a valid channel name from a name candidate
Parameters: - arg1 (str) – Input string
- arg2 (
geosoft.gxapi.str_ref
) – Outout string
Returns: Nothing
Return type: None
New in version 5.0.0.
-
static
gen_valid_line_symb
((str)arg1, (str_ref)arg2) → None:¶ Generate a valid line symb name string from given string.
Parameters: - arg1 (str) – Input string
- arg2 (
geosoft.gxapi.str_ref
) – Outout string
Returns: Nothing
Return type: None
New in version 6.4.0.
Note:
The returned name is either the same size as the input or shorter. Escapes, leading and trailing spaces are removed, then all illegal characters are replaced with an underscore.
-
get_chan_array_size
((int)arg1) → int:¶ This method Gets a channel's array size for a given channel handle.
Parameters: arg1 (int) – Channel handle Returns: Channel type Return type: int New in version 6.0.1.
-
get_chan_class
((int)arg1, (str_ref)arg2) → None:¶ This method gets a channel's label
Parameters: - arg1 (int) – Channel handle
- arg2 (
geosoft.gxapi.str_ref
) – returned class into
Returns: Nothing
Return type: None
New in version 5.1.8.
Note:
The channel label is stored in the "CLASS" parameter of the channel reg. If no class is defined, then an empty string is returned. The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE
-
get_chan_decimal
((int)arg1) → int:¶ This method gets a channel's number of digits displayed to the right of the decimal point.
Parameters: arg1 (int) – Channel handle Returns: Number of digits displayed to right of decimal Return type: int New in version 6.0.1.
Note:
The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE
-
get_chan_double
((int)arg1, (int)arg2, (int)arg3) → float:¶ Get individual elements in a channel.
Parameters: - arg1 (int) – line
- arg2 (int) – channel
- arg3 (int) – index
Returns: Value, or dummy if out of range. For settings, terminates if error.
Return type: float
New in version 5.0.0.
Note:
These methods are slow and should only be used when performance is not an issue.
-
get_chan_format
((int)arg1) → int:¶ This method Gets a channel's display format for a given channel handle.
Parameters: arg1 (int) – Channel handle Returns: Channel display format Return type: int New in version 6.0.1.
Note:
The returned format is one of the DB_CHAN_FORMAT constants. The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE
-
get_chan_int
((int)arg1, (int)arg2, (int)arg3) → int:¶ Get individual elements in a channel.
Parameters: - arg1 (int) – line
- arg2 (int) – channel
- arg3 (int) – index
Returns: Value, or dummy if out of range. For settings, terminates if error.
Return type: int
New in version 5.0.0.
Note:
These methods are slow and should only be used when performance is not an issue.
-
get_chan_label
((int)arg1, (str_ref)arg2) → None:¶ This method gets a channel's label
Parameters: - arg1 (int) – Channel handle
- arg2 (
geosoft.gxapi.str_ref
) – returned label into
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The channel label is stored in the "LABEL" parameter of the channel reg. If the setting is empty, the channel name is returned. The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE
-
get_chan_name
((int)arg1, (str_ref)arg2) → None:¶ This method Gets a channel's name for a given channel handle.
Parameters: - arg1 (int) – Channel handle
- arg2 (
geosoft.gxapi.str_ref
) – string to place name into
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE
-
get_chan_order_lst
((GXLST)arg1) → None:¶ This method gets the channel display order for a database. The list will be stored in an LST object. In order to modify this displayed channels list, call
geosoft.gxapi.GXDB.set_chan_order_lst()
after.Parameters: arg1 ( geosoft.gxapi.GXLST
) – LST object to populateReturns: Nothing Return type: None New in version 5.0.8.
-
get_chan_protect
((int)arg1) → int:¶ This method gets a channel's read-only protection status.
Parameters: arg1 (int) – Channel handle Returns: DB_CHAN_PROTECTION constants Return type: int New in version 6.0.1.
Note:
The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE
-
get_chan_str
((int)arg1, (int)arg2, (int)arg3, (str_ref)arg4) → None:¶ Get individual elements in a channel.
Parameters: - arg1 (int) – line
- arg2 (int) – channel
- arg3 (int) – index
- arg4 (
geosoft.gxapi.str_ref
) – string
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
These methods are slow and should only be used when performance is not an issue.
-
get_chan_type
((int)arg1) → int:¶ This method Gets a channel's type for a given channel handle.
Parameters: arg1 (int) – Channel handle Returns: Channel type Return type: int New in version 6.0.1.
Note:
The type returned is one of the DB_CATEGORY_CHAN constants. Use the GS_SIMPLE_TYPE() macro to convert to INT,REAL or string types. The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE
-
get_chan_unit
((int)arg1, (str_ref)arg2) → None:¶ This method Gets a channel's unit
Parameters: - arg1 (int) – Channel handle
- arg2 (
geosoft.gxapi.str_ref
) – string to place unit into
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The unit label is stored in the "UNITS" parameter of the channel reg. The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE
-
get_chan_va
((int)arg1, (int)arg2, (GXVA)arg3) → None:¶ Place the contents of a channel in a VA.
Parameters: - arg1 (int) – Line
- arg2 (int) – Channel
- arg3 (
geosoft.gxapi.GXVA
) – VA in which to place the data
Returns: Nothing
Return type: None
New in version 5.0.0.
See also
geosoft.gxapi.GXVA
class.
-
get_chan_vv
((int)arg1, (int)arg2, (GXVV)arg3) → None:¶ Place the contents of a channel in a VV.
Parameters: - arg1 (int) – Line
- arg2 (int) – Channel
- arg3 (
geosoft.gxapi.GXVV
) – VV in which to place the data
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
If a VA channel is specified, then element [0] of this VA channel is used to populated the VV.
See also
geosoft.gxapi.GXVV
class.
-
get_chan_vv_expanded
((int)arg1, (int)arg2, (GXVV)arg3) → None:¶ Read a channel into a VV. If the channel is a VA channel it is treaded as a VV channel with multiple values per fid and the FID expation is set to the array size.
Parameters: - arg1 (int) – Line
- arg2 (int) – Channel
- arg3 (
geosoft.gxapi.GXVV
) – VV in which to place the data
Returns: Nothing
Return type: None
New in version 6.4.0.
Note:
This method is to be used in conjunction with the
geosoft.gxapi.GXVV.re_fid_vv()
method that will honor the FID Expansion setting.See also
geosoft.gxapi.GXVV
class.
-
get_chan_width
((int)arg1) → int:¶ This method gets a channel's display width for a given channel handle.
Parameters: arg1 (int) – Channel handle Returns: Channel display width Return type: int New in version 6.0.1.
Note:
The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE
-
get_channel_length
((int)arg1, (int)arg2) → int:¶ Returns the # of elements in a channel.
Parameters: - arg1 (int) – Line (read or write locked)
- arg2 (int) – Channel (read or write locked)
Returns: # of elements
Return type: int
New in version 8.1.0.
Note:
Returns the actual number of data items (rows) in a channel. For VA channels no correction is necessary for the number of columns (which was true of the obsoleted function
geosoft.gxapi.GXDB.get_length()
).
-
get_col_va
((int)arg1) → int:¶ Returns the # of columns in a VA channel.
Parameters: arg1 (int) – Channel (read locked) Returns: # of columns 0 if error Return type: int New in version 5.0.0.
Note:
If the channel is VV, this function returns 1.
-
get_fid_incr
((int)arg1, (int)arg2) → float:¶ This method returns the fiducial increment value of a specified Channel.
Parameters: - arg1 (int) – Line (read or write locked)
- arg2 (int) – Channel (read locked)
Returns: Fiducial Start.
Return type: float
New in version 5.0.0.
-
get_fid_start
((int)arg1, (int)arg2) → float:¶ This method returns the fiducial start value of a specified Channel.
Parameters: - arg1 (int) – Line (read or write locked)
- arg2 (int) – Channel (read locked)
Returns: Fiducial Start.
Return type: float
New in version 5.0.0.
-
get_group_class
((int)arg1, (str_ref)arg2) → None:¶ Set the Class name for a group line.
Parameters: - arg1 (int) – Group line - DB_LOCK_READWRITE or DB_LOCK_READONLY
- arg2 (
geosoft.gxapi.str_ref
) – returned class name - max size = DB_GROUP_CLASS_SIZE - 1
Returns: Nothing
Return type: None
New in version 5.0.8.
Note:
This method fails if the line is not a group line. Group classes are used to identify group lines used for special purposes, e.g.: "COLLAR" for the Wholeplot collar table, or "TARGETS" for the UX-Detect Targets list.
See also
geosoft.gxapi.GXDB.line_category()
- to see if a line is a group line.
-
get_info
((int)arg1) → int:¶ Get information about the database.
Parameters: arg1 (int) – DB_INFO constants Returns: x - Return Value Return type: int New in version 7.0.0.
-
get_ipj
((int)arg1, (GXIPJ)arg2) → None:¶ Get georeference information in an IPJ.
Parameters: - arg1 (int) – Symbol
- arg2 (
geosoft.gxapi.GXIPJ
) – IPJ to fill in
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
If the channel does not have an IPJ, the IPJ that is returned will have an unknown projection.
-
get_itr
((int)arg1, (GXITR)arg2) → None:¶ Get ITR for a channel.
Parameters: - arg1 (int) – channel
- arg2 (
geosoft.gxapi.GXITR
) – ITR to fill in
Return type: None
New in version 5.0.0.
Note:
If a channel does not have an ITR,
geosoft.gxapi.GXDB.get_itr()
will not change the passed ITR. Channel must be locked for READONLY or READWRITE.
-
get_line_map_fid
((int)arg1, (float_ref)arg2, (float_ref)arg3) → None:¶ This method gets a line map clip fiducial.
Parameters: - arg1 (int) – Line handle to look at
- arg2 (
geosoft.gxapi.float_ref
) – Start Fid - arg3 (
geosoft.gxapi.float_ref
) – End Fid
Returns: Nothing
Return type: None
New in version 5.1.1.
Note:
The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE
-
get_line_selection
((int)arg1) → int:¶ Get the selection status for a line.
Parameters: arg1 (int) – Line handle Returns: One of DB_LINE_SELECT constants Return type: int New in version 9.0.0.
-
get_meta
((GXMETA)arg1) → None:¶ Get the metadata of a database.
Parameters: arg1 ( geosoft.gxapi.GXMETA
) – Meta object to fill with database’s metaReturns: Nothing Return type: None New in version 5.1.5.
-
get_name
((int)arg1, (str_ref)arg2) → None:¶ Gets a name from the database.
Parameters: - arg1 (int) – DB_NAME constants
- arg2 (
geosoft.gxapi.str_ref
) – name returned
Returns: Nothing
Return type: None
New in version 5.0.0.
-
get_reg_symb
((int)arg1, (GXREG)arg2) → None:¶ Get a REG object from a symbol
Parameters: - arg1 (int) – Symbol, NULLSYMB constant for the database REG
- arg2 (
geosoft.gxapi.GXREG
) – REG to copy data into
Returns: Nothing
Return type: None
New in version 5.0.0.
-
get_reg_symb_setting
((int)arg1, (str)arg2, (str_ref)arg3) → None:¶ Get a REG string setting from a symbol reg
Parameters: - arg1 (int) – Symbol, NULLSYMB constant for the database REG
- arg2 (str) – REG entry name
- arg3 (
geosoft.gxapi.str_ref
) – returned setting
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The symbol REG is used to store a variety of attribute about the symbol. Following a conventionally used entries: UNITS - channel units CLASS - symbol class name (i.e. "Assay") _PJ_ipj - projection blob name _PJ_x - projection coordinate pair _PJ_y _PJ_name - projection GXF-style info _PJ_ellipsoid _PJ_projection _PJ_units _PJ_datum_transform This is a convenient but low-performance way to get/set REG settings. If performance is an issue, and more than one setting is to be Get and or Set, use the REG directly.
-
get_reg_symb_setting_double
((int)arg1, (str)arg2) → float:¶ Get a real-valued REG setting from a symbol reg
Parameters: - arg1 (int) – Symbol, NULLSYMB constant for the database REG
- arg2 (str) – REG entry name
Returns: The setting, or rDUMMY if not found or not convertable.
Return type: float
New in version 6.2.0.
Note:
Same as
geosoft.gxapi.GXDB.get_reg_symb_setting()
, but converts the setting automatically to a real value. This is a convenient but low-performance way to get/set REG settings. If performance is an issue, and more than one setting is to be Get and or Set, use the REG directly.
-
get_reg_symb_setting_int
((int)arg1, (str)arg2) → int:¶ Get an integer-valued REG setting from a symbol reg
Parameters: - arg1 (int) – Symbol, NULLSYMB constant for the database REG
- arg2 (str) – REG entry name
Returns: The setting, or iDUMMY if not found or not convertable.
Return type: int
New in version 6.2.0.
Note:
Same as
geosoft.gxapi.GXDB.get_reg_symb_setting()
, but converts the setting automatically to an integer value. This is a convenient but low-performance way to get/set REG settings. If performance is an issue, and more than one setting is to be Get and or Set, use the REG directly.
-
get_select
() → int:¶ Gets the Line Selections.
Returns: Selections Object. Return type: int New in version 5.0.0.
-
get_symb_lock
((int)arg1) → int:¶ Determines if a symbol is locked
Parameters: arg1 (int) – Symbol to Lock Returns: DB_LOCK constants Return type: int New in version 6.3.0.
-
get_symb_name
((int)arg1, (str_ref)arg2) → None:¶ This method gets a symbol's name
Parameters: - arg1 (int) – Symbol handle
- arg2 (
geosoft.gxapi.str_ref
) – string to place name into
Returns: Nothing
Return type: None
New in version 6.1.0.
Note:
See GetChanName_DB for more information The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE
-
get_va_base_coordinate_info
((int)arg1, (int_ref)arg2, (float_ref)arg3, (GXVV)arg4, (str_ref)arg5) → None:¶ Set the array channel base coordinate type, offset and values.
Parameters: - arg1 (int) – channel (Locked DB_LOCK_READONLY)
- arg2 (
geosoft.gxapi.int_ref
) – DB_ARRAY_BASETYPE constants - arg3 (
geosoft.gxapi.float_ref
) – Optional offset or base frequency - arg4 (
geosoft.gxapi.GXVV
) – Values (one per array channel column) (REAL) - arg5 (
geosoft.gxapi.str_ref
) – Units
Returns: Nothing
Return type: None
New in version 8.2.
Note:
See
geosoft.gxapi.GXDB.set_va_base_coordinate_info()
.
-
get_va_chan_vv
((int)arg1, (int)arg2, (GXVV)arg3, (int)arg4, (int)arg5) → None:¶ Place the contents of a specific part of a channel in a VV.
Parameters: - arg1 (int) – Line
- arg2 (int) – Channel
- arg3 (
geosoft.gxapi.GXVV
) – VV in which to place the data - arg4 (int) – Offset
- arg5 (int) – Number to Write
Returns: Nothing
Return type: None
New in version 5.1.1.
Note:
If a VA channel is specified, then element [0] of this VA channel is used to populated the VV.
See also
geosoft.gxapi.GXVV
class.
-
get_va_prof_color_file
((int)arg1, (str_ref)arg2) → None:¶ Get colours for a VA channel when displayed in the profile window.
Parameters: - arg1 (int) – channel (Locked DB_LOCK_READWRITE)
- arg2 (
geosoft.gxapi.str_ref
) – zone file name, “” to clear.
Returns: Nothing
Return type: None
New in version 5.1.5.
Note:
See
geosoft.gxapi.GXDB.set_va_prof_color_file()
.
-
get_va_prof_sect_option
((int)arg1, (str_ref)arg2) → None:¶ Get the display options of VA channels
Parameters: - arg1 (int) – channel (Locked DB_LOCK_READWRITE)
- arg2 (
geosoft.gxapi.str_ref
) – Option “Profile”, “Section” or “Section and Profile”
Returns: Nothing
Return type: None
New in version 5.1.6.
-
get_va_scaling
((int)arg1, (float_ref)arg2, (float_ref)arg3) → None:¶ Get base and range for VA channel cell display.
Parameters: - arg1 (int) – channel (Locked DB_LOCK_READWRITE)
- arg2 (
geosoft.gxapi.float_ref
) – Base value (rDummy for none) - arg3 (
geosoft.gxapi.float_ref
) – Range value (rDummy for none)
Returns: Nothing
Return type: None
New in version 5.1.5.
Note:
See
geosoft.gxapi.GXDB.set_va_scaling()
.
-
get_va_sect_color_file
((int)arg1, (str_ref)arg2) → None:¶ Get colours for a VA channel when displayed section in the profile window.
Parameters: - arg1 (int) – channel (Locked DB_LOCK_READWRITE)
- arg2 (
geosoft.gxapi.str_ref
) – zone file name
Returns: Nothing
Return type: None
New in version 5.1.6.
Note:
Fails in the channel is not an array channel
-
get_va_windows
((int)arg1, (int_ref)arg2, (int_ref)arg3) → None:¶ Get the range of windows displayed for a VA channel.
Parameters: - arg1 (int) – channel (Locked DB_LOCK_READWRITE)
- arg2 (
geosoft.gxapi.int_ref
) – First window (0 to N-2, iDummy for default) - arg3 (
geosoft.gxapi.int_ref
) – Last window (1 to N-1, iDummy for default)
Returns: Nothing
Return type: None
New in version 5.1.5.
Note:
See
geosoft.gxapi.GXDB.set_va_windows()
.
-
get_xyz_chan
((int)arg1, (str_ref)arg2) → None:¶ Gets current X, Y or Z channel name
Parameters: - arg1 (int) – DB_CHAN_SYMBOL constants
- arg2 (
geosoft.gxapi.str_ref
) – returned name
Returns: Nothing
Return type: None
New in version 5.1.3.
Note:
searches for the "current" X, Y or Z channel. If none is defined, then returns "X", "Y" or "Z".
-
get_xyz_chan_symb
((int)arg1) → int:¶ Searches for current X, Y or Z channel symbol
Parameters: arg1 (int) – DB_CHAN_SYMBOL constants Returns: x - Symbol Handle NULLSYMB constant - Symbol not found searches for the “current” X, Y or Z channel. If none is defined, then looks for “X”, “Y” or “Z” channel If the channel is defined, but not present, returns NULLSYMB constant.
Return type: int New in version 5.1.3.
-
static
grow
((str)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5, (int)arg6) → None:¶ Enlarges the database.
Parameters: - arg1 (str) – name of the Database File to Create
- arg2 (int) – Max Lines in the Database (200)
- arg3 (int) – Max Channels in the Database (50)
- arg4 (int) – Max Blobs in the Database (Channels+Lines+20)
- arg5 (int) – Max Users in the Database (10)
- arg6 (int) – Number of Erase Caches (100)
Returns: Nothing
Return type: None
New in version 5.1.1.
-
have_itr
((int)arg1) → int:¶ Returns TRUE if channel has an ITR.
Parameters: arg1 (int) – channel Return type: int New in version 5.0.0.
Note:
If a channel has an ITR, the ITR colours are used to display channel values in the spreadsheet. If a channel does not have an ITR,
geosoft.gxapi.GXDB.get_itr()
will not change the passed ITR.
-
is_associated
((int)arg1, (int)arg2) → int:¶ Check to see if a channel is associated with group.
Parameters: - arg1 (int) – Line
- arg2 (int) – Channel
Returns: 0 if not a group line, or if the channel is not associated.
As of v6.3, if a group line has no class defined, then ALL channels are automatically assumed to be associated with it.
Return type: int
New in version 5.1.3.
-
static
is_chan_name
((str)arg1) → int:¶ Is this a valid channel name?
Parameters: arg1 (str) – Name to test Returns: 1 if it is a valid channel name 0 if it is not a valid channel name Return type: int New in version 7.2.0.
Note:
Channel names must only contain alpha-numeric characters or the underscore character "_", and the first letter must be a letter or an underscore.
-
is_chan_valid
((int)arg1) → int:¶ This method checks to see if the channel handle is a valid channel.
Parameters: arg1 (int) – Channel handle to check Returns: 0 - Not a valid channel 1 - Valid Return type: int New in version 5.1.1.
-
is_empty
() → int:¶ See if a database contains only empty lines.
Returns: 1 if the database contains only empty lines. Return type: int New in version 6.1.0.
Note:
This function does not check for other information or blobs, it merely looks at all lines in the database to see if they are empty. If all are empty, it returns 1.
-
is_line_empty
((int)arg1) → int:¶ See if a specific line in the database is empty.
Parameters: arg1 (int) – Line symbol Returns: 1 if the database contains only empty lines. Return type: int New in version 6.1.0.
-
static
is_line_name
((str)arg1) → int:¶ Is this a valid line name.
Parameters: arg1 (str) – Name to test Returns: 1 if it is a valid line name 0 if it is not a valid line name Return type: int New in version 5.0.0.
-
is_line_valid
((int)arg1) → int:¶ This method checks to see if the line handle returned by the Line methods is a valid line.
Parameters: arg1 (int) – Line handle to check Returns: 0 - Not a valid line 1 - Valid Return type: int New in version 5.0.0.
-
is_null
() → bool¶ Check if the instance of
geosoft.gxapi.GXDB is null (undefined)
Returns: True if this is a null instance of geosoft.gxapi.GXDB
, False otherwise.Return type: bool`
-
is_wholeplot
() → int:¶ Is this a Wholeplot database?
Returns: 1 if it is a Wholeplot database 0 if it is not. Return type: int New in version 5.0.0.
Note:
Currently checks to see if the DH_COLLAR line exists.
-
line_bearing
((int)arg1) → float:¶ This method returns the bearing of a line.
Parameters: arg1 (int) – Line handle to look at Returns: Bearing value, rDUMMY if not set. Return type: float New in version 5.1.1.
Note:
The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE This function simply returns a value set using the
geosoft.gxapi.GXDB.set_line_bearing()
function. It returns rDUMMY for line categories other than DB_CATEGORY_LINE_FLIGHT. To calculate the line azimuth based on the first and last non-dummy locations, use thegeosoft.gxapi.GXDU.direction()
function.
-
line_category
((int)arg1) → int:¶ This method returns the category (group, line) of a line.
Parameters: arg1 (int) – Line handle to look at Returns: DB_CATEGORY_LINE constants or iDUMMY. Return type: int New in version 5.0.0.
Note:
The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE
-
line_date
((int)arg1) → float:¶ This method returns the date of a line.
Parameters: arg1 (int) – Line handle to look at Returns: Date value. Return type: float New in version 5.0.0.
Note:
The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE
-
line_flight
((int)arg1) → int:¶ This method returns the flight number of a line.
Parameters: arg1 (int) – Line handle to look at Returns: Line Flight Number. Return type: int New in version 5.0.0.
Note:
The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE
-
line_label
((int)arg1, (str_ref)arg2, (int)arg3) → None:¶ Create a line label
Parameters: - arg1 (int) – line symbol
- arg2 (
geosoft.gxapi.str_ref
) – string in which to place label - arg3 (int) – DB_LINE_LABEL_FORMAT constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Label formats. example full format is "L1023.4 13" type "L" number "1023" version "4" flight "13" formats can be added to get combined format Use LINK format to create a database link label.
-
line_lst
((GXLST)arg1) → None:¶ Load a LST with database lines.
Parameters: arg1 ( geosoft.gxapi.GXLST
) – List to PopulateReturns: Nothing Return type: None New in version 6.3.0.
Note:
Populates a LST with channel symbols. The name is put into the "Name" part of the LST (0), and the handle, an integer value written as a string, is placed in the value part of the LST (1). The LST is cleared first, and the items are sorted in logical line order.
-
line_number
((int)arg1) → int:¶ This method returns the number of a line.
Parameters: arg1 (int) – Line handle to look at Returns: Line Number. Return type: int New in version 5.0.0.
Note:
The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE
-
line_number2
((int)arg1, (str_ref)arg2) → None:¶ Returns the string form of the line number (can be alphanumeric)
Parameters: - arg1 (int) – Line handle to look at
- arg2 (
geosoft.gxapi.str_ref
) – Line number
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE
-
line_type
((int)arg1) → int:¶ This method returns the type of a line.
Parameters: arg1 (int) – Line handle to look at Returns: DB_LINE_TYPE constants Return type: int New in version 5.0.0.
Note:
The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE
-
line_version
((int)arg1) → int:¶ This method returns the version number of a line.
Parameters: arg1 (int) – Line handle to look at Returns: Line Number. Return type: int New in version 5.0.0.
Note:
The channel must be locked DB_LOCK_READONLY or DB_LOCK_READWRITE
-
lines_max
() → int:¶ Gets Maximum number of lines in the database
Returns: Maximum number of lines in the database Return type: int New in version 5.1.1.
-
load_select
((str)arg1) → None:¶ Load selections to from a file.
Parameters: arg1 (str) – File Name Returns: Nothing Return type: None New in version 5.0.0.
-
lock_symb
((int)arg1, (int)arg2, (int)arg3) → None:¶ Locks a symbol for READONLY or READWRITE.
Parameters: - arg1 (int) – Symbol to Lock
- arg2 (int) – DB_LOCK constants
- arg3 (int) – DB_WAIT constants
Returns: Nothing
Return type: None
New in version 5.0.0.
-
maker_symb
((int)arg1, (str)arg2, (str)arg3, (str)arg4) → None:¶ Adds a Maker to the database symbol
Parameters: - arg1 (int) – Symbol to create maker for
- arg2 (str) – Name of program
- arg3 (str) – Maker name, used in menu prompt
- arg4 (str) – INI groups (terminate each with a ”;”)
Returns: Nothing
Return type: None
New in version 5.0.0.
-
mask_chan_lst
((GXLST)arg1) → None:¶ Load a LST with mask channels.
Parameters: arg1 ( geosoft.gxapi.GXLST
) – LST object to populateReturns: Nothing Return type: None New in version 5.1.5.
Note:
Loads a LST with all channels with CLASS "MASK", as well as all channels containing the string "MASK", as long as the CLASS for these channels is not set to something other than "" or "MASK". This function is a duplicate of the
geosoft.gxapi.GXCHIMERA.mask_chan_lst()
function, and can be used if CHIMERA is not installed. The LST is cleared first, and the items are sorted by name. "None" is added at the end, with a handle value of "-1".
-
next_sel_line
((int)arg1) → int:¶ This method will advance to the next selected line based on the currently selected line handle.
Parameters: arg1 (int) – Previous Line Returns: Line Handle (use iIsLineValid method to see if valid). Return type: int New in version 5.0.0.
-
normal_chan_lst
((GXLST)arg1) → None:¶ Load a LST with non-array database channels.
Parameters: arg1 ( geosoft.gxapi.GXLST
) – List to PopulateReturns: Nothing Return type: None New in version 8.2.0.
Note:
Like
geosoft.gxapi.GXDB.chan_lst()
, but does not include array channels or virtual channels.
-
static
null
() → GXDB¶ A null (undefined) instance of
geosoft.gxapi.GXDB
Returns: A null geosoft.gxapi.GXDB
Return type: geosoft.gxapi.GXDB
-
static
open
((str)arg1, (str)arg2, (str)arg3) → GXDB:¶ This method opens a database.
Parameters: - arg1 (str) – name of the Database File to Open
- arg2 (str) – Name of the user (“SUPER” normally)
- arg3 (str) – Password of the user (“” normally)
Returns: DB Object
Return type: New in version 5.0.0.
-
static
open_read_only
((str)arg1, (str)arg2, (str)arg3) → GXDB:¶ This method opens a database.
Parameters: - arg1 (str) – name of the Database File to Open
- arg2 (str) – Name of the user (“SUPER” normally)
- arg3 (str) – Password of the user (“” normally)
Returns: DB Object
Return type: New in version 6.4.2.
Note:
This method is useful to open multiple reader instances on the same database. This call will fail if a DB has already been opened with
geosoft.gxapi.GXDB.open()
or locked in the application withgeosoft.gxapi.GXEDB.lock()
.
-
put_chan_va
((int)arg1, (int)arg2, (GXVA)arg3) → None:¶ Place the contents of a VA in a channel.
Parameters: - arg1 (int) – Line
- arg2 (int) – Channel
- arg3 (
geosoft.gxapi.GXVA
) – VA from which to get the data
Returns: Nothing
Return type: None
New in version 5.0.0.
See also
geosoft.gxapi.GXVA
class.
-
put_chan_vv
((int)arg1, (int)arg2, (GXVV)arg3) → None:¶ Place the contents of a VV in a channel.
Parameters: - arg1 (int) – Line
- arg2 (int) – Channel
- arg3 (
geosoft.gxapi.GXVV
) – VV from which to get the data
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
If a VA channel is specified, then element [0] of this VA channel will be populated with the VV. There is a limit of 2000 elements for non-licensed users.
See also
geosoft.gxapi.GXVV
class.
-
put_va_chan_vv
((int)arg1, (int)arg2, (GXVV)arg3, (int)arg4, (int)arg5) → None:¶ Place the contents of a VV at a specific part of a channel.
Parameters: - arg1 (int) – Line
- arg2 (int) – Channel
- arg3 (
geosoft.gxapi.GXVV
) – VV from which to get the data - arg4 (int) – Offset
- arg5 (int) – Number to Write
Returns: Nothing
Return type: None
New in version 5.1.1.
Note:
If a VA channel is specified, then element [0] of this VA channel will be populated with the VV.
See also
geosoft.gxapi.GXVV
class.
-
read_blob_bf
((int)arg1, (GXBF)arg2) → None:¶ Read a blob from a database into a file.
Parameters: - arg1 (int) – Blob (DB_SYMB_BLOB) to read into BF from database
- arg2 (
geosoft.gxapi.GXBF
) – File to read blob from
Returns: Nothing
Return type: None
New in version 5.0.0.
-
static
repair
((str)arg1) → None:¶ Cleans the database by removing invalid blocks
Parameters: arg1 (str) – name of the Database File to Create Returns: Nothing Return type: None New in version 5.1.1.
-
save_select
((str)arg1) → None:¶ Saves current selections to a file.
Parameters: arg1 (str) – File Name Returns: Nothing Return type: None New in version 5.0.0.
-
select
((str)arg1, (int)arg2) → None:¶ Select/deselect lines based on selection string
Parameters: - arg1 (str) – Selection
- arg2 (int) – DB_LINE_SELECT constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Selections/deselections are cumulative. If lines had already been selected, then any further selection/deselection will affect that set of selections. E.g. "L99:800" is the string to select all normal lines from 99 to 800. If
geosoft.gxapi.GXDB.select()
is called again to select "L1000", then lines 99 to 800 and 1000 would all be selected. Use a "T" prefix for Tie lines. Use an "F" prefix to specify lines of a specific flight. E.g. "F10" would select all lines of flight 10. Use an empty string ("") to select/deselect ALL lines.
-
selected_line_lst
((GXLST)arg1) → None:¶ Load a LST with the selected lines.
Parameters: arg1 ( geosoft.gxapi.GXLST
) – List to PopulateReturns: Nothing Return type: None New in version 5.1.2.
Note:
This method populates a LST object with all of the symbols of the selected lines in the database. The name is put into the "Name" part of the LST (0), and the handle, an integer value written as a string, is placed in the value part of the LST (1). Symbols are automatically sorted in logical line order.
-
set_all_chan_protect
((int)arg1) → None:¶ This method sets all the channels' read-only protection status.
Parameters: arg1 (int) – DB_CHAN_PROTECTION constants Returns: Nothing Return type: None New in version 7.0.0.
Note:
Value to set must be either DB_CHAN_PROTECTED or DB_CHAN_UNPROTECTED This method does its own channel locking/unlocking. Channels already lock DB_LOCK_READONLY are ignored.
-
set_chan_class
((int)arg1, (str)arg2) → None:¶ Set a channel class
Parameters: - arg1 (int) – Channel handle
- arg2 (str) – class
Returns: Nothing
Return type: None
New in version 5.1.8.
Note:
The channel class is stored in the "CLASS" parameter of the channel reg. The channel must be locked DB_LOCK_READWRITE
-
set_chan_decimal
((int)arg1, (int)arg2) → None:¶ This method sets a channel's number of digits displayed to the right of the decimal point.
Parameters: - arg1 (int) – Channel handle
- arg2 (int) – Number of digits to display right of the decimal
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The number of display digits must be from 0 to 50. The channel must be locked DB_LOCK_READWRITE
-
set_chan_double
((int)arg1, (int)arg2, (int)arg3, (float)arg4) → None:¶ Set individual elements in a channel.
Parameters: - arg1 (int) – line
- arg2 (int) – channel
- arg3 (int) – index
- arg4 (float) – value
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
These methods are slow and should only be used when performance is not an issue.
-
set_chan_format
((int)arg1, (int)arg2) → None:¶ This method sets a channel's display format.
Parameters: - arg1 (int) – Channel handle
- arg2 (int) – DB_CHAN_FORMAT constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The channel must be locked DB_LOCK_READWRITE
-
set_chan_int
((int)arg1, (int)arg2, (int)arg3, (int)arg4) → None:¶ Set individual elements in a channel.
Parameters: - arg1 (int) – line
- arg2 (int) – channel
- arg3 (int) – index
- arg4 (int) – value
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
These methods are slow and should only be used when performance is not an issue.
-
set_chan_label
((int)arg1, (str)arg2) → None:¶ Set a channel label
Parameters: - arg1 (int) – Channel handle
- arg2 (str) – label
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The channel label is stored in the "LABEL" parameter of the channel reg. The channel must be locked DB_LOCK_READWRITE
-
set_chan_name
((int)arg1, (str)arg2) → None:¶ This method sets a channel's name.
Parameters: - arg1 (int) – Channel handle
- arg2 (str) – string to set channel name to
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The channel must be locked DB_LOCK_READWRITE
-
set_chan_order_lst
((GXLST)arg1) → None:¶ This method sets the channel display order for a database. The list to modify will be stored in an LST object. Call
geosoft.gxapi.GXDB.get_chan_order_lst()
to populate the LST.Parameters: arg1 ( geosoft.gxapi.GXLST
) – LST object to modifyReturns: Nothing Return type: None New in version 5.0.8.
-
set_chan_protect
((int)arg1, (int)arg2) → None:¶ This method sets a channel's read-only protection status.
Parameters: - arg1 (int) – Channel handle
- arg2 (int) – DB_CHAN_PROTECTION constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Value to set must be either DB_CHAN_PROTECTED or DB_CHAN_UNPROTECTED The channel must be locked DB_LOCK_READWRITE
-
set_chan_str
((int)arg1, (int)arg2, (int)arg3, (str)arg4) → None:¶ Set individual elements in a channel.
Parameters: - arg1 (int) – line
- arg2 (int) – channel
- arg3 (int) – index
- arg4 (str) – string
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
These methods are slow and should only be used when performance is not an issue.
-
set_chan_unit
((int)arg1, (str)arg2) → None:¶ This method sets a channel's unit for a given channel handle.
Parameters: - arg1 (int) – Channel handle
- arg2 (str) – string to put channel unit
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The channel must be locked DB_LOCK_READWRITE
-
set_chan_width
((int)arg1, (int)arg2) → None:¶ This method sets a channel's display width
Parameters: - arg1 (int) – Channel handle
- arg2 (int) – Display width
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The number of display digits must be from 0 to 50. The channel must be locked DB_LOCK_READWRITE
-
set_fid
((int)arg1, (int)arg2, (float)arg3, (float)arg4) → None:¶ This method allows the user to set the fiducial start and increment of a channel. The Increment should never be 0.
Parameters: - arg1 (int) – Line (read or write locked)
- arg2 (int) – Channel to set fiducial (write locked)
- arg3 (float) – Start Fiducial Value
- arg4 (float) – Increment Fiducial Value
Returns: Nothing
Return type: None
New in version 5.0.0.
-
set_group_class
((int)arg1, (str)arg2) → None:¶ Set the Class name for a group line.
Parameters: - arg1 (int) – Group line - DB_LOCK_READWRITE
- arg2 (str) – DB_GROUP_CLASS_SIZE constant
Returns: Nothing
Return type: None
New in version 5.0.8.
Note:
This method fails if the line is not a group line. Group classes are used to identify group lines used for special purposes. All group lines with the same class share the same list of associated channels. As of v6.3, if a group line has no class defined, then ALL channels are assumed to be associated with it. This means that a group class should only be defined when you wish to associate a subset of the available channels to group line.
See also
geosoft.gxapi.GXDB.line_category()
- to see if a line is a group line.geosoft.gxapi.GXDB.associate()
- Associate a channel with a group.
-
set_ipj
((int)arg1, (int)arg2, (GXIPJ)arg3) → None:¶ Set a REG object into a symbol
Parameters: - arg1 (int) – X channel
- arg2 (int) – Y channel
- arg3 (
geosoft.gxapi.GXIPJ
) – IPJ
Returns: Nothing
Return type: None
New in version 5.0.0.
-
set_itr
((int)arg1, (GXITR)arg2) → None:¶ Set ITR for a channel.
Parameters: - arg1 (int) – channel
- arg2 (
geosoft.gxapi.GXITR
) – ITR to fill in
Return type: None
New in version 5.0.0.
Note:
Use
geosoft.gxapi.GXITR.null()
to clear the channel ITR. Channel must be locked for READONLY or READWRITE.
-
set_line_bearing
((int)arg1, (float)arg2) → None:¶ Sets a line's bearing.
Parameters: - arg1 (int) – Line handle
- arg2 (float) – Value to set bearing to
Returns: Nothing
Return type: None
New in version 5.1.1.
Note:
The channel must be locked DB_LOCK_READWRITE This function simply sets a value in the line's metadata that is retrieved using the
geosoft.gxapi.GXDB.line_bearing()
function. It terminates for line categories other than DB_CATEGORY_LINE_FLIGHT.
-
set_line_date
((int)arg1, (float)arg2) → None:¶ This method sets a line's date.
Parameters: - arg1 (int) – Line handle
- arg2 (float) – Value to set date to
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The channel must be locked DB_LOCK_READWRITE
-
set_line_flight
((int)arg1, (int)arg2) → None:¶ This method sets a line's flight.
Parameters: - arg1 (int) – Line handle
- arg2 (int) – Value to set line flight to
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The channel must be locked DB_LOCK_READWRITE
-
set_line_map_fid
((int)arg1, (float)arg2, (float)arg3) → None:¶ This method changes a line map clip fiducial.
Parameters: - arg1 (int) – Line handle to look at
- arg2 (float) – Start Fid
- arg3 (float) – End Fid
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
for full range, set Start Fid to rMIN and End Fid to rMAX. for no data, set Start and End Fids to rDUMMY.
-
static
set_line_name
((int)arg1, (int)arg2, (int)arg3, (str_ref)arg4) → None:¶ This method sets up a line name given the line's number, type, and version.
Parameters: - arg1 (int) – Line number
- arg2 (int) – Line type
- arg3 (int) – Line version
- arg4 (
geosoft.gxapi.str_ref
) – String to set line name to
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
This MUST be called to generate a line name when calls are made to
geosoft.gxapi.GXDB.exist_symb()
,geosoft.gxapi.GXDB.create_symb()
orgeosoft.gxapi.GXDB.delete_symb()
for an operation on a line. See also SetLineName2_DB.
-
static
set_line_name2
((str)arg1, (int)arg2, (int)arg3, (str_ref)arg4) → None:¶ Like SetLineName_DB, but can use alphanumeric for line number
Parameters: - arg1 (str) – Line number (alphanumeric)
- arg2 (int) – Line type
- arg3 (int) – Line version
- arg4 (
geosoft.gxapi.str_ref
) – String to set line name to
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
This MUST be called to generate a line name when calls are made to
geosoft.gxapi.GXDB.exist_symb()
,geosoft.gxapi.GXDB.create_symb()
orgeosoft.gxapi.GXDB.delete_symb()
for an operation on a line. The line number can be any combination of letters and numbers, i.e. XU324, 98765, A, 23NGV etc.
-
set_line_num
((int)arg1, (int)arg2) → None:¶ This method sets a line's number.
Parameters: - arg1 (int) – Line handle
- arg2 (int) – Value to set line number to
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The channel must be locked DB_LOCK_READWRITE
-
set_line_selection
((int)arg1, (int)arg2) → None:¶ Set the selection status for a line.
Parameters: - arg1 (int) – Handle of line to select/deselect
- arg2 (int) – DB_LINE_SELECT constants
Return type: None
New in version 9.0.0.
-
set_line_type
((int)arg1, (int)arg2) → None:¶ This method sets a line's type.
Parameters: - arg1 (int) – Line handle
- arg2 (int) – DB_LINE_TYPE constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The channel must be locked DB_LOCK_READWRITE
-
set_line_ver
((int)arg1, (int)arg2) → None:¶ This method sets a line's version.
Parameters: - arg1 (int) – Line handle
- arg2 (int) – Value to set line version to
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The channel must be locked DB_LOCK_READWRITE
-
set_meta
((GXMETA)arg1) → None:¶ Set the metadata of a database.
Parameters: arg1 ( geosoft.gxapi.GXMETA
) – Meta object to add to database’s metaReturns: Nothing Return type: None New in version 5.1.5.
-
set_reg_symb
((int)arg1, (GXREG)arg2) → None:¶ Set a REG object into a symbol
Parameters: - arg1 (int) – Symbol, NULLSYMB constant for the database REG
- arg2 (
geosoft.gxapi.GXREG
) – REG to set into Blob
Returns: Nothing
Return type: None
New in version 5.0.0.
-
set_reg_symb_setting
((int)arg1, (str)arg2, (str)arg3) → None:¶ Set a REG string setting in a symbol reg
Parameters: - arg1 (int) – Symbol, NULLSYMB constant for the database REG
- arg2 (str) – REG entry name
- arg3 (str) – setting
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
The symbol REG is used to store a variety of attribute about the symbol. Following a conventionally used entries: UNITS - channel units CLASS - symbol class name (i.e. "Assay") _PJ_ipj - projection blob name _PJ_x - projection coordinate pair _PJ_y _PJ_name - projection GXF-style info _PJ_ellipsoid _PJ_projection _PJ_units _PJ_datum_transform This is a convenient but low-performance way to get/set REG settings. If performance is an issue, and more than one setting is to be Get and or Set, use the REG directly.
-
set_select
((int)arg1) → None:¶ Sets the Line Selections.
Parameters: arg1 (int) – Selections Returns: Nothing Return type: None New in version 5.0.0.
Note:
This method also destroys the DB_SELECT object.
-
set_va_base_coordinate_info
((int)arg1, (int)arg2, (float)arg3, (GXVV)arg4, (str)arg5, (bool)arg6) → None:¶ Set the array channel base coordinate type, offset and values.
Parameters: - arg1 (int) – channel (Locked DB_LOCK_READWRITE)
- arg2 (int) – DB_ARRAY_BASETYPE constants
- arg3 (float) – Optional offset or base frequency
- arg4 (
geosoft.gxapi.GXVV
) – Values (one per array channel column) (REAL) - arg5 (str) – Units
- arg6 (bool) – Allow changes to existing values?bool
Returns: Nothing
Return type: None
New in version 8.2.
Note:
See
geosoft.gxapi.GXDB.get_va_base_coordinate_info()
.
-
set_va_prof_color_file
((int)arg1, (str)arg2) → None:¶ Set colours for a VA channel when displayed in the profile window.
Parameters: - arg1 (int) – channel (Locked DB_LOCK_READWRITE)
- arg2 (str) – zone file name, “” to clear.
Returns: Nothing
Return type: None
New in version 5.1.5.
Note:
Fails in the channel is not an array channel, if the file does not exist, or if it is not a valid colour zone file. The individual columns in the array channel are displayed using the input zone file colours. A linear ITR from 0 to 1 is created on the colour zones to map to individual channel indices (expressed as a fraction as shown below). For instance, for a file with 8 colours the ranges are as follows: Colour Range Colour 1 0 > value >= 0.125 Colour 2 0.125 > value >= 0.25 Colour 3 0.25 > value >= 0.375 Colour 4 0.375 > value >= 0.5 Colour 5 0.5 > value >= 0.625 Colour 6 0.625 > value >= 0.75 Colour 7 0.75 > value >= 0.875 Colour 8 0.875 > value >= 1.0 When an array channel is displayed, the index of each element (column) is mapped into the corresponding range above using the following formula: value = (column index) / (# of columns - 1) For an array with 8 columns, you get the following values: Column Value Colour 0 0 1 1 0.14 2 2 0.28 3 3 0.43 4 4 0.57 5 5 0.71 6 6 0.86 7 7 1.0 8 The colour file search path is: Local directory, then oasismontajtbl.
-
set_va_prof_sect_option
((int)arg1, (str)arg2) → None:¶ Set the display options of VA channels
Parameters: - arg1 (int) – channel (Locked DB_LOCK_READWRITE)
- arg2 (str) – Option “Profile”, “Section” or “Section and Profile”
Returns: Nothing
Return type: None
New in version 5.1.6.
-
set_va_scaling
((int)arg1, (float)arg2, (float)arg3) → None:¶ Set base and range for VA channel cell display.
Parameters: - arg1 (int) – channel (Locked DB_LOCK_READWRITE)
- arg2 (float) – Base value (rDummy for none)
- arg3 (float) – Range value (rDummy for none)
Returns: Nothing
Return type: None
New in version 5.1.5.
Note:
By default, VA profiles autoscale to fit in the database cell. This lets the user set a single base and range for all cells. If either input is a dummy, both are set as dummies, and autoscaling is used.
-
set_va_sect_color_file
((int)arg1, (str)arg2) → None:¶ Set colours for a VA channel when displayed section in the profile window.
Parameters: - arg1 (int) – channel (Locked DB_LOCK_READWRITE)
- arg2 (str) – zone file name
Returns: Nothing
Return type: None
New in version 5.1.6.
Note:
Fails in the channel is not an array channel, if the file does not exist, or if it is not a valid colour zone file.
-
set_va_windows
((int)arg1, (int)arg2, (int)arg3) → None:¶ Set the range of windows to display for a VA channel.
Parameters: - arg1 (int) – channel (Locked DB_LOCK_READWRITE)
- arg2 (int) – First window (0 to N-1, iDummy for default)
- arg3 (int) – Last window (0 to N-1, iDummy for default)
Returns: Nothing
Return type: None
New in version 5.1.5.
Note:
Use to display a subset of the VA channel windows in the GDB. Windows index from 0.
-
set_xyz_chan
((int)arg1, (str)arg2) → None:¶ Sets current X, Y or Z channel name
Parameters: - arg1 (int) – DB_CHAN_SYMBOL constants
- arg2 (str) – channel name
Returns: Nothing
Return type: None
New in version 5.1.3.
Note:
If the value specified is "", the internally stored value is cleared, and GetXYZChan_DB will return "X", "Y" or "Z" This can be used, for instance, to make "Easting" and "Northing" the current X and Y channels, and have GXs using the
geosoft.gxapi.GXDB.get_xyz_chan_symb()
function to load "X" and "Y" work as desired.
-
string_chan_lst
((GXLST)arg1) → None:¶ Load a LST with string-type channels.
Parameters: arg1 ( geosoft.gxapi.GXLST
) – LST object to populateReturns: Nothing Return type: None New in version 6.2.0.
Note:
The Name of the symbol is placed in the item name and the item value is set to the symbol handle. Only channels with the string-type data (sChanType_DB < 0) are included. The LST is cleared first, and the items are sorted by name.
-
symb_list
((GXVV)arg1, (int)arg2) → int:¶ Place a list of symbols in a VV.
Parameters: - arg1 (
geosoft.gxapi.GXVV
) – VV to populate, must be type INT. - arg2 (int) – DB_SYMB_TYPE constants
Returns: Number of symbols.
Return type: int
New in version 5.0.0.
- arg1 (
-
symb_lst
((GXLST)arg1, (int)arg2) → None:¶ Populate a LST with database symbols.
Parameters: - arg1 (
geosoft.gxapi.GXLST
) – List to Populate - arg2 (int) – DB_SYMB_TYPE constants
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
Populates a LST with channel, line, blob or user symbols. The name is put into the "Name" part of the LST (0), and the handle, an integer value written as a string, is placed in the value part of the LST (1). Line symbols are automatically sorted in logical line order. NOTE: The LST is NOT cleared before being filled. If you want to clear the LST and get sorted values, use the
geosoft.gxapi.GXDB.chan_lst()
andgeosoft.gxapi.GXDB.line_lst()
functions.- arg1 (
-
sync
() → None:¶ Syncronize the Metadata from this database to the XML
Returns: Nothing Return type: None New in version 7.0.0.
-
un_lock_all_symb
() → None:¶ UnLocks all symbols.
Returns: Nothing Return type: None New in version 5.1.1.
-
un_lock_symb
((int)arg1) → None:¶ UnLocks a symbol.
Parameters: arg1 (int) – Symbol to Lock Returns: Nothing Return type: None New in version 5.0.0.
-
users_max
() → int:¶ Gets Maximum number of Users
Returns: Maximum number of Users Return type: int New in version 5.1.1.
-
valid_symb
((int)arg1, (int)arg2) → int:¶ This method checks to see if the specified symbol is a valid symbol in the database.
Parameters: - arg1 (int) – Symbol to check
- arg2 (int) – DB_SYMB_TYPE constants
Returns: 0 - Invalid symbol 1 - Symbol is valid
Return type: int
New in version 9.1.0.
-
window_va_ch
((int)arg1, (int)arg2, (int)arg3, (int)arg4, (int)arg5) → None:¶ Copy a window of data in a channel into a new channel
Parameters: - arg1 (int) – Line symbol
- arg2 (int) – Original channel
- arg3 (int) – Output channel
- arg4 (int) – Start column number to copy, 0 is first column
- arg5 (int) – End column number to copy
Returns: Nothing
Return type: None
New in version 5.0.0.
Note:
This function normally used for VA channels. A copy of the original channel will be made if start and end column numbers to copy are dummies. All the columns including start and end columns will be copied
-
window_va_ch2
((int)arg1, (int)arg2, (int)arg3, (GXVV)arg4) → None:¶ Copy a windowed version of data in a channel into a new channel
Parameters: - arg1 (int) – Line symbol
- arg2 (int) – Original channel
- arg3 (int) – Output channel
- arg4 (
geosoft.gxapi.GXVV
) – VV containing 0/1 values for each channel.
Returns: Nothing
Return type: None
New in version 5.0.1.
Note:
Similar to
geosoft.gxapi.GXDB.window_va_ch()
, but the input and output channels must contain the same number of columns. The input VV tells which columns to copy over; 0 values indicate that the output column is to be dummied, and non-zero values indicate the column is to be copied. The VV length must be the same as the number of columns.
-
write_blob_bf
((int)arg1, (GXBF)arg2) → None:¶ Write a blob from a file into a database.
Parameters: - arg1 (int) – Blob (DB_SYMB_BLOB) to write into database from file
- arg2 (
geosoft.gxapi.GXBF
) – File to write blob into
Returns: Nothing
Return type: None
New in version 5.0.0.
-
DB_CATEGORY_CHAN constants¶
Channel Categories
For STRING type channels, use negative integers
to specify channel width. For example, use -10
to define a string channel with up to 10 characters.
Use the GS_SIMPLE_TYPE() macro to convert to INT,REAL or string.
-
gxapi.
DB_CATEGORY_CHAN_BYTE
= 0¶
-
gxapi.
DB_CATEGORY_CHAN_USHORT
= 1¶
-
gxapi.
DB_CATEGORY_CHAN_SHORT
= 2¶
-
gxapi.
DB_CATEGORY_CHAN_LONG
= 3¶
-
gxapi.
DB_CATEGORY_CHAN_FLOAT
= 4¶
-
gxapi.
DB_CATEGORY_CHAN_DOUBLE
= 5¶
-
gxapi.
DB_CATEGORY_CHAN_UBYTE
= 6¶
-
gxapi.
DB_CATEGORY_CHAN_ULONG
= 7¶
-
gxapi.
DB_CATEGORY_CHAN_LONG64
= 8¶
-
gxapi.
DB_CATEGORY_CHAN_ULONG64
= 9¶
DB_CATEGORY_LINE constants¶
Line Categories
-
gxapi.
DB_CATEGORY_LINE_FLIGHT
= 100¶
-
gxapi.
DB_CATEGORY_LINE_GROUP
= 200¶
-
gxapi.
DB_CATEGORY_LINE_NORMAL
= 100¶
Same as DB_CATEGORY_LINE_FLIGHT
DB_CHAN_FORMAT constants¶
Channel formats
-
gxapi.
DB_CHAN_FORMAT_NORMAL
= 0¶
-
gxapi.
DB_CHAN_FORMAT_EXP
= 1¶
-
gxapi.
DB_CHAN_FORMAT_TIME
= 2¶
-
gxapi.
DB_CHAN_FORMAT_DATE
= 3¶
-
gxapi.
DB_CHAN_FORMAT_GEOGR
= 4¶
-
gxapi.
DB_CHAN_FORMAT_SIGDIG
= 5¶
-
gxapi.
DB_CHAN_FORMAT_HEX
= 6¶
DB_CHAN_PROTECTION constants¶
Channel Read-only Protection Status
-
gxapi.
DB_CHAN_UNPROTECTED
= 0¶
-
gxapi.
DB_CHAN_PROTECTED
= 1¶
DB_CHAN_SYMBOL constants¶
Channel symbol for special channels
-
gxapi.
DB_CHAN_X
= 0¶
-
gxapi.
DB_CHAN_Y
= 1¶
-
gxapi.
DB_CHAN_Z
= 2¶
DB_COMP constants¶
Supported compression levels
-
gxapi.
DB_COMP_NONE
= 0¶
-
gxapi.
DB_COMP_SPEED
= 1¶
-
gxapi.
DB_COMP_SIZE
= 2¶
DB_COORDPAIR constants¶
-
gxapi.
DB_COORDPAIR_NONE
= 0¶
-
gxapi.
DB_COORDPAIR_X
= 1¶
-
gxapi.
DB_COORDPAIR_Y
= 2¶
DB_INFO constants¶
Integer Database Information
-
gxapi.
DB_INFO_BLOBS_MAX
= 0¶
Maximum Number of Blobs in the Database
-
gxapi.
DB_INFO_LINES_MAX
= 1¶
Maximum number of lines in the database
-
gxapi.
DB_INFO_CHANS_MAX
= 2¶
Maximum Number of Channels in the Database
-
gxapi.
DB_INFO_USERS_MAX
= 3¶
Maximum number of Users
-
gxapi.
DB_INFO_BLOBS_USED
= 4¶
Number of Blobs currently used
-
gxapi.
DB_INFO_LINES_USED
= 5¶
Number of Lines currently used
-
gxapi.
DB_INFO_CHANS_USED
= 6¶
Number of Channels currently used
-
gxapi.
DB_INFO_USERS_USED
= 7¶
Number of Users in the database
-
gxapi.
DB_INFO_PAGE_SIZE
= 8¶
Size of the smallest database block in bytes
-
gxapi.
DB_INFO_DATA_SIZE
= 9¶
Number of Blocks in Entire Database
-
gxapi.
DB_INFO_LOST_SIZE
= 10¶
Number of Lost Blocks in the Database
-
gxapi.
DB_INFO_FREE_SIZE
= 11¶
Number of Free Blocks in the Database
-
gxapi.
DB_INFO_COMP_LEVEL
= 16¶
Compression Level in use
-
gxapi.
DB_INFO_BLOB_SIZE
= 19¶
Number of pages given to blobs
-
gxapi.
DB_INFO_FILE_SIZE
= 17¶
Entire Size of File (in kbytes)
-
gxapi.
DB_INFO_INDEX_SIZE
= 18¶
Size of Index (in kbytes)
-
gxapi.
DB_INFO_MAX_BLOCK_SIZE
= 20¶
Naximum number of bytes in a block
-
gxapi.
DB_INFO_CHANGESLOST
= 21¶
Will changes to this database be lost when this database is closed?
DB_LINE_LABEL_FORMAT constants¶
Line Label Formats
-
gxapi.
DB_LINE_LABEL_FORMAT_LINE
= 1¶
-
gxapi.
DB_LINE_LABEL_FORMAT_VERSION
= 2¶
-
gxapi.
DB_LINE_LABEL_FORMAT_TYPE
= 4¶
-
gxapi.
DB_LINE_LABEL_FORMAT_FLIGHT
= 8¶
-
gxapi.
DB_LINE_LABEL_FORMAT_FULL
= 15¶
-
gxapi.
DB_LINE_LABEL_FORMAT_DATE
= 16¶
-
gxapi.
DB_LINE_LABEL_FORMAT_LINK
= 7¶
DB_LINE_SELECT constants¶
Select modes
-
gxapi.
DB_LINE_SELECT_INCLUDE
= 0¶
-
gxapi.
DB_LINE_SELECT_EXCLUDE
= 1¶
DB_LINE_TYPE constants¶
Line types
-
gxapi.
DB_LINE_TYPE_NORMAL
= 0¶
-
gxapi.
DB_LINE_TYPE_BASE
= 1¶
-
gxapi.
DB_LINE_TYPE_TIE
= 2¶
-
gxapi.
DB_LINE_TYPE_TEST
= 3¶
-
gxapi.
DB_LINE_TYPE_TREND
= 4¶
-
gxapi.
DB_LINE_TYPE_SPECIAL
= 5¶
-
gxapi.
DB_LINE_TYPE_RANDOM
= 6¶
DB_LOCK constants¶
Lock Modes
-
gxapi.
DB_LOCK_NONE
= -1¶
Used only by GetSymbLock_DB
-
gxapi.
DB_LOCK_READONLY
= 0¶
-
gxapi.
DB_LOCK_READWRITE
= 1¶
DB_SYMB_TYPE constants¶
Symbol types
-
gxapi.
DB_SYMB_BLOB
= 0¶
-
gxapi.
DB_SYMB_LINE
= 1¶
-
gxapi.
DB_SYMB_CHAN
= 2¶
-
gxapi.
DB_SYMB_USER
= 3¶
DB_ARRAY_BASETYPE constants¶
-
gxapi.
DB_ARRAY_BASETYPE_NONE
= 0¶
-
gxapi.
DB_ARRAY_BASETYPE_TIME_WINDOWS
= 1¶
-
gxapi.
DB_ARRAY_BASETYPE_TIMES
= 2¶
-
gxapi.
DB_ARRAY_BASETYPE_FREQUENCIES
= 3¶
-
gxapi.
DB_ARRAY_BASETYPE_ELEVATIONS
= 4¶
-
gxapi.
DB_ARRAY_BASETYPE_DEPTHS
= 5¶
-
gxapi.
DB_ARRAY_BASETYPE_VELOCITIES
= 6¶
-
gxapi.
DB_ARRAY_BASETYPE_DISCRETE_TIME_WINDOWS
= 7¶