GXSURFACE class

class GXSURFACE(handle=0)[source]

GXSURFACE class.

The GXSURFACE class allows you to create, read and alter Geosurface files (*.geosoft_surface). A Geosurface file can contain one or more surface items (see GXSURFACEITEM class). In turn each item can contains one or more triangular polyhedral meshes.

__init__(handle=0)[source]

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

add_surface_item(surfaceitem)[source]

Add a new surface item to the GXSURFACE

Parameters

surfaceitem (GXSURFACEITEM) – GXSURFACEITEM to add

New in version 8.4.

License: Geosoft Open License

classmethod append_vulcan_triangulation(triangulation_file, ipj, surface_file)[source]

Create new surface from a Maptek Vulcan triangulation file and add to an existing geosurface.

Parameters
  • triangulation_file (str) – 00t file

  • surface_file (str) – Geosurface file

New in version 8.4.

License: Geosoft End-User License

classmethod crc(surface_file, output, crc)[source]

Compute an XML CRC of a Geosurface file.

Parameters
  • surface_file (str) – Geosurface file

  • output (str) – Output file

  • crc (int_ref) – CRC (unused, always set to 0)

Returns

CRC Value (always 0)

Return type

int

New in version 8.0.

License: Geosoft Open License

classmethod create(surface_file, ipj)[source]

Create a new Geosurface file

Parameters
  • surface_file (str) – Geosurface file name

  • ipj (GXIPJ) – GXIPJ containing coordinate system of the Geosurface

Returns

GXSURFACE Object

Return type

GXSURFACE

New in version 8.4.

License: Geosoft Open License

classmethod create_from_dxf(ipj, surface_file, dxf_file)[source]

Create Geosurface file from DXF file.

Parameters
  • surface_file (str) – Geosurface file

  • dxf_file (str) – DXF file

New in version 8.2.

License: Geosoft Open License

classmethod create_from_vulcan_triangulation(triangulation_file, ipj, surface_file)[source]

Create Geosurface file from a Maptek Vulcan triangulation file.

Parameters
  • triangulation_file (str) – 00t file

  • surface_file (str) – Geosurface file

New in version 8.4.

License: Geosoft End-User License

classmethod dump_geometry_to_text_file(surface_filename, text_filename)[source]

Dump surface geometry to a text file.

Parameters
  • surface_filename (str) – Geosurface file

  • text_filename (str) – Text file

New in version 9.4.

License: Geosoft Open License

classmethod get_closed_surface_names(surface_file, lst)[source]

Get the names of closed surface items in a Geosurface file (may return an empty list)

Parameters
  • surface_file (str) – Geosurface file

  • lst (GXLST) – GXLST to fill (may return an empty GXLST if none of the surfaces are closed)

New in version 8.0.

License: Geosoft Open License

get_extents(min_x, min_y, min_z, max_x, max_y, max_z)[source]

Get the spatial range of all surface items.

Parameters
  • min_x (float_ref) – Minimum valid data in X.

  • min_y (float_ref) – Minimum valid data in Y.

  • min_z (float_ref) – Minimum valid data in Z.

  • max_x (float_ref) – Maximum valid data in X.

  • max_y (float_ref) – Maximum valid data in Y.

  • max_z (float_ref) – Maximum valid data in Z.

New in version 8.5.

License: Geosoft Open License

get_ipj(ipj)[source]

Get the coordinate system of the GXSURFACE.

Parameters

ipj (GXIPJ) – GXIPJ in which to place the Geosurface coordinate system

New in version 8.4.

License: Geosoft Open License

get_surface_item(guid)[source]

Get the an existing surface item from the GXSURFACE

Parameters

guid (str) – Item GUID

Returns

GXSURFACEITEM Object

Return type

GXSURFACEITEM

New in version 8.4.

License: Geosoft Open License

get_surface_items(lst)[source]

Get the surfaces items in a Geosurface file

Parameters

lst (GXLST) – GXLST to fill

New in version 8.4.

License: Geosoft Open License

classmethod get_surface_names(surface_file, lst)[source]

Get the surface item names in a Geosurface file

Parameters
  • surface_file (str) – Geosurface file

  • lst (GXLST) – GXLST to fill

New in version 8.0.

License: Geosoft Open License

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 GXSURFACE

Returns

A null GXSURFACE

Return type

GXSURFACE

classmethod open(surface_file, mode)[source]

Open a Geosurface file

Parameters
Returns

GXSURFACE Object

Return type

GXSURFACE

New in version 8.4.

License: Geosoft Open License

set_ipj(ipj)[source]

Change the coordinate system of the GXSURFACE.

Parameters

ipj (GXIPJ) – GXIPJ containing the new coordinate system of the Geosurface

New in version 8.4.

License: Geosoft Open License

classmethod sync(name)[source]

Syncronize the Metadata for this Geosurface

Parameters

name (str) – Geosurface file

New in version 8.0.

License: Geosoft Open License

SURFACE_OPEN constants

Open Modes

SURFACE_OPEN_READ

Read

gxapi.SURFACE_OPEN_READ = 0
SURFACE_OPEN_READWRITE

Readwrite

gxapi.SURFACE_OPEN_READWRITE = 1