GXAGG class¶
- class GXAGG(handle=0)[source]¶
GXAGG class.
The
GXAGG
class is used to handle image display on maps. An aggregate contains one or more image layers (LAY) with each layer representing a grid or image file. TheGXAGG
will combine all the layers to form one image- change_brightness(brt)[source]¶
Change the brightness.
- Parameters:
brt (float) – -1.0 - black; 0.0 no change; 1.0 white
New in version 5.0.
License: Geosoft Open License
Note: 0.0 brightness does nothing. -1.0 to 0.0 makes colors darker, -1.0 is black 0.0 to 1.0 makes colors lighter, 1.0 is white
- classmethod create()[source]¶
Create an aggregate
New in version 5.0.
License: Geosoft Open License
- classmethod create_map(map, name)[source]¶
Create
GXAGG
from Map with Group name.- Parameters:
- Returns:
GXAGG
object- Return type:
New in version 5.0.5.
License: Geosoft Open License
Note: The Agg Group name must include the View name with a backslash separating the view name and group name; e.g. “DataAGG_test” (when used as a string, the double slash represents as single ).
- get_brightness()[source]¶
Get the brightness setting of the
GXAGG
- Return type:
float
New in version 5.0.
License: Geosoft Open License
Note: Brightness can range from -1.0 (black) to 1.0 (white). This brightness control is relative to the normal color when the
GXAGG
is created.GXAGG
brightness depends on the brightness of theGXITR
of each layer. Calling dGetBright_AGG will poll all layers, and if all have the same brightness, this is returned. If any of the layers have a different brightness, the current brightness of each layer is changed to be the reference brightness (0.0)and the brightness value of 0.0 is returned.See also
- get_layer_itr(layer, itr)[source]¶
Get the
GXITR
of a layer- Parameters:
layer (int) – Layer number
New in version 5.0.
License: Geosoft Open License
Note: Layers are numbered from 0, consecutively in the order they are placed in the aggregate.
An error will occur if the layer does not exist.
Caller must create/destroy
GXITR
.
- get_layer_st(layer)[source]¶
Get a
GXST
filled with layer statisticsNew in version 2021.2.
License: Geosoft Open License
Note: Layers are numbered from 0, consecutively in the order they are placed in the aggregate.
An error will occur if the layer does not exist.
Caller must create/destroy
GXITR
.
- 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
- layer_img(name, zone, color, cont)[source]¶
Add an image as a layer in an aggregate.
- Parameters:
name (str) – Grid name
zone (int) – AGG_LAYER_ZONE constants transform to use if color table has none defined.
color (str) – Color table name, “” for default This can be a .TBL .ZON .`GXITR <geosoft.gxapi.GXITR>` or .`GXAGG <geosoft.gxapi.GXAGG>` file .TBL is the default
cont (float) – Color contour interval or
rDUMMY
for default
New in version 5.0.
License: Geosoft Open License
See also
- layer_img_ex(name, zone, color, min, max, cont)[source]¶
Add an image as a layer in an aggregate.
- Parameters:
name (str) – Grid name
zone (int) – AGG_LAYER_ZONE constants transform to use if color table has none defined.
color (str) – Color table name, “” for default This can be a .TBL .ZON .`GXITR <geosoft.gxapi.GXITR>` or .`GXAGG <geosoft.gxapi.GXAGG>` file .TBL is the default
min (float) – Minimum value or
rDUMMY
for defaultmax (float) – Maximum value or
rDUMMY
for defaultcont (float) – Color contour interval or
rDUMMY
for default
New in version 8.2.
License: Geosoft Open License
See also
- layer_shade_img(name, color, inc, dec, scl)[source]¶
Add a shaded image as a layer in an aggregate.
- Parameters:
New in version 5.0.
License: Geosoft Open License
Note: A new grid file will be created to hold the shaded image data. This file will have the same name as the original grid but with “_s” added to the root name. It will always be located in the workspace directory regardless of the location of the original source image. If the file already exists, it will replaced.
- list_img(gvv)[source]¶
Lists file names of all the IMGs inside of the
GXAGG
.New in version 5.0.6.
License: Geosoft Open License
Note: The returned
GXVV
contains the file names.
- num_layers()[source]¶
Get the number of layers in an aggregate.
- Returns:
The number of layers in an aggregate.
- Return type:
int
New in version 5.0.
License: Geosoft Open License
- set_layer_itr(layer, itr)[source]¶
Set the
GXITR
of a layer- Parameters:
layer (int) – Layer number
New in version 5.0.
License: Geosoft Open License
Note: Layers are numbered from 0, consecutively in the order they are placed in the aggregate.
An error will occur if the layer does not exist.
Caller must create/destroy
GXITR
.
- set_model(model)[source]¶
Sets the Color Model
- Parameters:
model (int) – AGG_MODEL constants
New in version 5.0.
License: Geosoft Open License
- set_render_method(method)[source]¶
Sets the Rendering Method
- Parameters:
method (int) – AGG_RENDER constants
New in version 5.1.1.
License: Geosoft Open License
AGG_LAYER_ZONE constants¶
Aggregate Layer Zone defines
- AGG_LAYER_ZONE_DEFAULT¶
If a color table with no color transform is passed it will be used with the default zoning method of the data, which is usually
AGG_LAYER_ZONE_EQUALAREA
.- gxapi.AGG_LAYER_ZONE_DEFAULT = 0¶
- AGG_LAYER_ZONE_SHADE¶
If
AGG_LAYER_ZONE_SHADE
is specified, a shaded relief layer is created from the specified grid. A new grid file will also be created to hold the shaded relief image data. This file will have the same name as the original grid but with “_s” added to the root name. It will always be located in the workspace directory regardless of the location of the original source image. If the file already exists, it will used as it is. Shading is always at inclination = declination = 45 deg. with default scaling. If different shading is desired, use thelayer_shade_img
method.- gxapi.AGG_LAYER_ZONE_SHADE = 4¶
- AGG_LAYER_ZONE_LAST¶
The last
GXITR
used to display this data will be used if it exists. If it does not exist, the behaviour is the same asAGG_LAYER_ZONE_DEFAULT
.- gxapi.AGG_LAYER_ZONE_LAST = 6¶
AGG_MODEL constants¶
Aggregation color model defines
AGG_RENDER constants¶
Aggregation rendering modes