GXSHD class

class GXSHD(handle=0)[source]

GXSHD class.

This class supports fast interactive shadowing in a map or grid document.

The SHD object is created using the StartShading_EMAP method.

__init__(handle=0)[source]

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

end_shading(apply_changes)[source]

This ends interactive shading and must be called if any interactive changes should be applied. Passing false to apply changes is equivalent to simply disposing handle.

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.

See also

StartShading_EMAP

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 GXSHD

Returns

A null GXSHD

Return type

GXSHD

refresh(grid_path, inclination, declination, scale, contrast, brightness, wet_look)[source]

Refresh the SHD with new shading parameters.

Parameters
  • grid_path (str) – Grid path returned

  • inclination (float) – inclination (degrees)

  • declination (float) – declination (degrees)

  • scale (float) – vertical scale relative to base scale

  • contrast (float_ref) – contrast 0-1 (recommended >0.1, can change with wet_look changes)

  • brightness (float_ref) – brightness 0-1 (can change with wet_look changes)

  • wet_look (bool) – Apply wet-look effect (shading layer uses lighter distribution)?

New in version 2021.2.

License: Geosoft Open License

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

track_interactive(constraint, inclination, declination)[source]

Track a line on map and get shading parameters based on its length and direction.

Parameters
Returns

0 if tracking completed successfully. 1 if user cancelled or tracking failed.

Return type

int

New in version 2021.2.

License: Geosoft Open License

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

SHD_FIX constants

Interactive tracking constraints.

SHD_FIX_NONE

None

gxapi.SHD_FIX_NONE = 0
SHD_FIX_INCLINATION

Inclination

gxapi.SHD_FIX_INCLINATION = 1
SHD_FIX_DECLINATION

Declination

gxapi.SHD_FIX_DECLINATION = 2