GXDCOL class

class GXDCOL(handle=0)[source]

GXDCOL class.

Object to interface with 2D map and 3D view objects that supports colour tool editing.

__init__(handle=0)[source]

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

end(apply_changes)[source]

TODO

Parameters

apply_changes (bool) – Apply changes to map.

New in version 2021.2.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

get_brightness(layerSelection, layer)[source]

Get the brightness of a single layer, or all the layers

Parameters
  • layerSelection (int) – BRIGHT constants

  • layer (int) – layer index (required for BRIGHT_LAYER

Return type

float

New in version 2021.2.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

get_brightness_type()[source]

Is brightness set separately by layer and by object or just by object?

Returns

BRIGHTNESS_ALL - Set brightness for the object as a whole only BRIGHTNESS_ALL_AND_LAYERS - Set brightness either for the object as a whole or by layer

Return type

int

New in version 2021.2.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

Note: For some objects (like AGG) brightness can be set for each layer, or for the object as a whole, while in others (like CSYMB) it can be set only for the object as a whole.

get_layer_histogram(index, incr, min)[source]

Get a GXVV filled with histogram bin counts for each zone of the ITR

Parameters
  • index (int) – Index of layer

  • incr (float_ref) – width of bin increment

  • min (float_ref) – Min (value at start of 2nd bin)

Returns

GXVV object

Return type

GXVV

New in version 2021.2.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

get_layer_info(index, itr, layer_name)[source]

Get a layer’s information

Parameters
  • index (int) – Index of layer

  • itr (GXITR) – GXITR Handle

  • layer_name (str_ref) – Name returned

New in version 2021.2.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

get_layer_itr(index, itr)[source]

Get a layer’s ITR

Parameters
  • index (int) – Index of layer

  • itr (GXITR) – GXITR Handle

New in version 2021.2.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

get_layer_statistics(index)[source]

Get a GXST filled with layer statistics

Parameters

index (int) – Index of layer

Returns

GXST object

Return type

GXST

New in version 2021.2.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

get_transparency()[source]

Get the transparency. This is returned for the entire map group.

Return type

float

New in version 2021.2.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

get_type()[source]

Get a layer’s type

Returns

DCOL_TYPE constants

Return type

int

New in version 2021.2.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

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 GXDCOL

Returns

A null GXDCOL

Return type

GXDCOL

number_of_layers()[source]

Get the number of layers.

Returns

The number of layers (often just one).

Return type

int

New in version 2021.2.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

reset()[source]

Reset the AGG back to its initial state. Same as cancelling out of the colour tool and restarting; all layers are reset.

New in version 2021.2.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

save_layer_itr(index)[source]

Save the layer’s ITR to a file. A dialog prompts for the file name.

Parameters

index (int) – Index of layer

New in version 2021.2.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

set_brightness(brightness, layerSelection, layer)[source]

Set the brightness of a single layer, or all the layers

Parameters
  • brightness (float) – Brightness value (-1.0 (black) <= brightness <= 1.0 (white))

  • layerSelection (int) – BRIGHT constants

  • layer (int) – layer index (required for BRIGHT_LAYER

New in version 2021.2.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

set_itr_transform_from_layer(index, itr, transformType)[source]

Set the input ITR transform to the provided type, based on the statistics of the chosen layer.

Parameters
Returns

0 - Ok 1 - Cancel

Return type

int

New in version 2021.2.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

Note: If the input tranform type is ITR_ZONE_MODEL_NOZONE or ITR_ZONE_MODEL_NONE then the user-preference default will be used. NOTE: This alters the input ITR, not the selected layer’s own ITR. The layer is accessed purely to get the current statistics.

set_layer_itr(index, itr, redrawMap)[source]

Set a layer’s ITR

Parameters
  • index (int) – Index of layer

  • itr (GXITR) – GXITR Handle

  • redrawMap (int) – Force redraw of map (0: No, 1: Yes)?

New in version 2021.2.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

set_transparency(transparency)[source]

Set the transparency. This is set for the entire map group.

Parameters

transparency (float) – Transparency value (1.0 - Opaque, 0.0 - Transparent)

New in version 2021.2.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

update_zone_transform_type(index, transformType)[source]

Recalculate the layer’s ITR to the provided type, based on the statistics of the chosen layer.

Parameters
Returns

0 - Ok 1 - Cancel

Return type

int

New in version 2021.2.

License: Geosoft Open License

Limitations: May not be available while executing a command line program.

Note: If the input tranform type is ITR_ZONE_MODEL_NOZONE, ITR_ZONE_MODEL_NONE then nothing will happen and the function will return 1. The dialogs to enter parameters are shown for Linear, Log, Normal and Equal.

BRIGHT constants

Brightness type

BRIGHT_ALL

Set the brightness of all the layers

gxapi.BRIGHT_ALL = 0
BRIGHT_LAYER

Set the brightness of the current layer

gxapi.BRIGHT_LAYER = 1

BRIGHTNESS_TYPES constants

Detrending option

BRIGHTNESS_ALL

Can set the brightness only for object as a whole

gxapi.BRIGHTNESS_ALL = 0
BRIGHTNESS_ALL_AND_LAYERS

Can set the brightness for object as a whole and for individual layers

gxapi.BRIGHTNESS_ALL_AND_LAYERS = 1

DCOL_TYPE constants

Layer type

DCOL_TYPE_UNKNOWN

Unknown

gxapi.DCOL_TYPE_UNKNOWN = 0
DCOL_TYPE_GRID

Grid

gxapi.DCOL_TYPE_GRID = 1
DCOL_TYPE_SYMBOLS

Symbols

gxapi.DCOL_TYPE_SYMBOLS = 2
DCOL_TYPE_VOXEL

Voxel

gxapi.DCOL_TYPE_VOXEL = 3
DCOL_TYPE_VECTOR_VOXEL

Vector voxel

gxapi.DCOL_TYPE_VECTOR_VOXEL = 4