geosoft.gxpy.agg submodule¶
Geosoft aggregate images
Classes: |
|
---|
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.
See also
Note
Regression tests provide usage examples: aggregate tests
-
exception
AggregateException
¶ Bases:
Exception
Exceptions from
geosoft.gxpy.agg
.New in version 9.2.
-
class
Aggregate_image
¶ Bases:
object
The AGG class supports the creation of aggregate images from one or more grid data sets. Aggergates can be placed into a 2D or 3D view for display.
Parameters: grid_file – if specified, the
add_layer()
method is called with remaining parameters to create a single-image aggregate.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_map –
gxpy.group.Color_map
instance, or the name of a file, which may betbl
,zon
,itr
, oragg
. - 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.
-
figure_map
(file_name=None, title=None, legend_label=None, features=['SCALE', 'LEGEND', 'NEATLINE'], **kwargs)¶ Create a figure map file from an aggregate.
Parameters: - file_name – the name of the map, if None a default map is created.
- overwrite – True to overwrite existing image file
- title – Title added to the image
- legend_label – If plotting a legend make this the legned title. The default is the title in the first aggregate layer colour map.
- features –
list of features to place on the map, default is (‘SCALE’, ‘LEGEND’, ‘NEATLINE’)
‘SCALE’ show a scale bar ‘LEGEND’ show an aggregate colour legend ‘NEATLINE’ draw a neat-line around the image ‘ANNOT_XY’ annotate map coordinates ‘ANNOT_LL’ annotate map Latitude, Longitude ‘CONTOUR’ contour the first layer in the aggregate - kwargs – passed to
geosoft.gxpy.map.Map.new
New in version 9.3.
-
gxagg
¶ The
geosoft.gxapi.GXAGG
instance handle.
-
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
New in version 9.2.
-
layer_count
¶ Number of layers in the aggregate.
-
layer_file_names
¶ Return list of layer files in the aggregate.
New in version 9.2.
-
layer_unit_of_measure
(layer=0)¶ Return the unit of measurement for the specified layer
Parameters: layer – layer number or layer name New in version 9.3.
-
name
¶ Name of the Aggregate_image.
-
classmethod
new
(grid_file=None, **kwargs)¶ Create a new aggregate from a grid.
Parameters: grid_file – grid file name add_layer()
is called to add the grid as a layer.New in version 9.2.
-
classmethod
open
(gxagg)¶ Create an
Aggregate_image
from ageosoft.gxapi.GXAGG
instance.Parameters: gxagg – geosoft.gxapi.GXAGG
instanceNew in version 9.2.
-
-
ZONE_DEFAULT
= 0¶
-
ZONE_EQUALAREA
= 3¶
-
ZONE_LAST
= 6¶
-
ZONE_LINEAR
= 1¶
-
ZONE_LOGLINEAR
= 5¶
-
ZONE_NORMAL
= 2¶
-
ZONE_SHADE
= 4¶