geosoft.gxpy.agg submodule

Geosoft aggregate images

Classes:
Aggregate_image image constructed from one or more grid/image layers

Geosoft aggregates are “aggregations” of one or more grid layers that together create a georeferenced image that can be placed in a map view or rendered on a plane in a 3D view.

Note

Regression tests provide usage examples: aggregate tests

exception geosoft.gxpy.agg.AggregateException

Bases: Exception

Exceptions from geosoft.gxpy.agg.

New in version 9.2.

class geosoft.gxpy.agg.Aggregate_image

Bases: object

Aggregate images are composed of one or more image/grids that can be displayed in a 2D or 3D display group.

Constructors:
open(): open an existing aggregate
new(): create a new aggregate

New in version 9.2.

add_layer(grid_file, color_map=None, zone=None, shade=False, minimum=None, maximum=None, contour=None)

Add an image layer to an aggregate

Parameters:
  • grid_file – The name of a grid file (image or data) to add.
  • color_mapgxpy.group.Color_map instance, or the name of a file, which may be .tbl, .zon, .itr, or .agg.
  • zone

    Colour distribution method:

    ZONE_DEFAULT        as set by user global default settings
    ZONE_LINEAR         linearly distributed
    ZONE_NORMAL         normal (Gaussian) distribution
    ZONE_EQUALAREA      each color will occupy an equal area on the image
    ZONE_LOGLINEAR      logarithmic linear distribution
    ZONE_LAST           last used coloring for this grid file
    ZONE_SHADE          Displays the shaded image version of the grid. The shaded image is
                        a grid file will with '_s' appended to the file name.  If it does not
                        exist, a shaded image with illumination inclination and declination
                        both set to 45 degrees is automatically created.
    
  • shade – True, to add a shading layer
  • minimum – Minimum data value. All grid values less than or equal to the minimum will be assigned the first color in the table. The default is calculated from the data.
  • maximum – Maximum data value. All grid values greater than or equal to the maximum will be assigned the last color in the table. The default is calculated from the data.
  • contour – Break colors on this interval, colors will be thinned if necessary.

New in version 9.2.

brightness

Aggregate brightness between -1 (black) and +1 (white).

close()

Close an Aggregate, releases resources.

layer_color_map(layer=0)

Return the geosoft.gxpy.group.Color_map of a layer.

Parameters:layer – layer number or layer name
Returns:geosoft.gxpy.group.Color_map
layer_count

Number of layers in the aggregate.

layer_file_names

Return list of layer files in the aggregate.

New in version 9.2.

name

Name of the Aggregate_image.

classmethod new(grid_file=None, **kwargs)

Create a new aggregate from a grid.

Parameters:grid_file – if specified, the add_layer() method is called with remaining parameters to create a single-image aggregate.

New in version 9.2.

classmethod open(gxagg)

Create an Aggregate_image from a geosoft.gxapi.GXAGG instance.

Parameters:gxagggeosoft.gxapi.GXAGG instance

New in version 9.2.