GXDBWRITE class¶
-
class
geosoft.gxapi.
GXDBWRITE
¶ The DBWRITE class is used to open and write to databases. Large blocks of data are split into blocks and served up sequentially to prevent the over-use of virtual memory when VVs or VAs are being written to channels. Individual data blocks are limited by default to 1 MB (which is user-alterable). Data less than the block size are served up whole, one block per line.
-
add_block
((int)arg1) → None:¶ Add the current block of data.
Parameters: arg1 (int) – Line Returns: nothing Return type: None New in version 9.0.0.
Note:
First, set up the data for each channel by copying values into the individual channel VVs and VAs.
-
add_channel
((int)arg1) → int:¶ Add a data channel to the DBWRITE object.
Parameters: arg1 (int) – Channel handle (does not need to be locked, but can be.) Returns: Channel index. Use for getting the correct VV or VA object. Return type: int New in version 9.0.0.
-
commit
() → None:¶ Commit remaining data to the database.
Returns: nothing Return type: None New in version 9.0.0.
-
static
create
((GXDB)arg1) → GXDBWRITE:¶ Create a DBWRITE object Add channels using the
geosoft.gxapi.GXDBWRITE.add_channel()
() method.channel.Parameters: arg1 ( geosoft.gxapi.GXDB
) – Database inputReturns: DBWRITE object Return type: geosoft.gxapi.GXDBWRITE
New in version 9.0.0.
-
static
create_xy
((GXDB)arg1) → GXDBWRITE:¶ Create a DBWRITE object for a XY-located data. Add channels using the
geosoft.gxapi.GXDBWRITE.add_channel()
() method.Parameters: arg1 ( geosoft.gxapi.GXDB
) – Database inputReturns: DBWRITE object Return type: geosoft.gxapi.GXDBWRITE
New in version 9.0.0.
-
static
create_xyz
((GXDB)arg1) → GXDBWRITE:¶ Create a DBWRITE object for a XYZ-located data. Add channels using the
geosoft.gxapi.GXDBWRITE.add_channel()
() method.channelParameters: arg1 ( geosoft.gxapi.GXDB
) – Database inputReturns: DBWRITE object Return type: geosoft.gxapi.GXDBWRITE
New in version 9.0.0.
-
get_chan_array_size
((int)arg1) → int:¶ Get the number of columns of data in a channel.
Parameters: arg1 (int) – Index of channel to access. Returns: The number of columns (array size) for a channel Return type: int New in version 9.0.0.
Note:
Regular channels have one column of data. Array channels have more than one column of data. This function should be called to determine whether to use
geosoft.gxapi.GXDBWRITE.get_vv()
orgeosoft.gxapi.GXDBWRITE.get_va()
to access data for a channel.
-
get_db
() → GXDB:¶ Get the output DB handle from the DBWRITE object.
Returns: DB handle Return type: geosoft.gxapi.GXDB
New in version 9.0.0.
-
get_v_vx
() → GXVV:¶ Get the X channel VV handle.
Returns: VV handle Return type: geosoft.gxapi.GXVV
New in version 9.0.0.
Note:
Only available for the CreateXY or CreateXYZ methods. The VV is filled anew for each block served up.
-
get_v_vy
() → GXVV:¶ Get the Y channel VV handle.
Returns: VV handle Return type: geosoft.gxapi.GXVV
New in version 9.0.0.
Note:
Only available for the CreateXY or CreateXYZ methods. The VV is filled anew for each block served up.
-
get_v_vz
() → GXVV:¶ Get the Z channel VV handle.
Returns: VV handle Return type: geosoft.gxapi.GXVV
New in version 9.0.0.
Note:
Only available for the CreateXY or CreateXYZ methods. The VV is filled anew for each block served up. If the Z channel is an array channel, the returned VV is the "base" VV of the VA and contains all items sequentially.
-
get_va
((int)arg1) → GXVA:¶ Get the VA handle for an array channel.
Parameters: arg1 (int) – Index of channel to access. Returns: VA handle Return type: geosoft.gxapi.GXVA
New in version 9.0.0.
Note:
Call only for array (multi-column) channels. You can call the
geosoft.gxapi.GXDBWRITE.get_chan_array_size()
function to find the number fo columns in a given channel, or you can callgeosoft.gxapi.GXVA.col()
on the returned VA handle. The VA is filled anew for each block served up.
-
get_vv
((int)arg1) → GXVV:¶ Get the VV handle for a channel.
Parameters: arg1 (int) – Index of channel to access. Returns: VV handle Return type: geosoft.gxapi.GXVV
New in version 9.0.0.
Note:
Call only for single-column (regular) channels. You can call the
geosoft.gxapi.GXDBWRITE.get_chan_array_size()
function to find the number fo columns in a given channel. The VV is filled anew for each block served up.
-
is_null
() → bool¶ Check if the instance of
geosoft.gxapi.GXDBWRITE is null (undefined)
Returns: True if this is a null instance of geosoft.gxapi.GXDBWRITE
, False otherwise.Return type: bool`
-
static
null
() → GXDBWRITE¶ A null (undefined) instance of
geosoft.gxapi.GXDBWRITE
Returns: A null geosoft.gxapi.GXDBWRITE
Return type: geosoft.gxapi.GXDBWRITE
-
test_func
((GXRA)arg1) → None:¶ Temporary test function.
Parameters: arg1 ( geosoft.gxapi.GXRA
) – RA handle to text file to import.Returns: nothing Return type: None New in version 9.0.0.
Note:
Designed to import the "Massive.xyz" file, which has data in the format "X Y Z Data".
-