pygmi.vector.iodefs#

Import and export vector data.

Classes#

ColumnSelect

A combobox to select vector columns.

ImportVector

GUI to import vector data.

ImportXYZ

GUI to import XYZ data.

ImportVoxel

GUI to import voxel data.

ExportXYZ

GUI to export XYZ data.

ExportVector

GUI to export vector data.

ExportVoxel

GUI to export voxel data.

Functions#

import_ubc(ifile)

Import a 3D UBC mesh and model.

export_ubc(ofile, data)

Export a section to a 3D UBC mesh and model.

get_GXYZ(ifile[, showlog, piter])

Get Geosoft XYZ.

get_intrepid(ifile[, showlog, piter])

Get Intrepid Database.

Module Contents#

class pygmi.vector.iodefs.ColumnSelect(parent=None)#

Bases: pygmi.misc.BasicModule

A combobox to select vector columns.

Parameters:

parent (pygmi.main.MainWidget, optional) – Reference to the parent routine. The default is None.

settings(nodialog=False)#

Entry point into item.

Parameters:

nodialog (bool, optional) – Run settings without a dialog. The default is False.

Returns:

True if successful, False otherwise.

Return type:

bool

saveproj()#

Save project data from class.

Return type:

None.

class pygmi.vector.iodefs.ImportVector(parent=None)#

Bases: pygmi.misc.BasicModule

GUI to import vector data.

Parameters:

parent (ppygmi.main.MainWidget, optional) – Reference to the parent routine. The default is None.

setupui()#

Set up UI.

Return type:

None.

settings(nodialog=False)#

Entry point into item.

Parameters:

nodialog (bool, optional) – Run settings without a dialog. The default is False.

Returns:

True if successful, False otherwise.

Return type:

bool

change_bounds()#

Change the bounds combo.

get_sfile()#

Get the filename and crs and bounds.

set_bounds(bounds)#

Set the bounds.

Parameters:

bounds (list or numpy array) – Bounds defined as (xmin, ymin, xmax, ymax).

Return type:

None.

saveproj()#

Save project data from class.

Return type:

None.

class pygmi.vector.iodefs.ImportXYZ(parent=None)#

Bases: pygmi.misc.BasicModule

GUI to import XYZ data.

This class imports tabular data.

Parameters:

parent (pygmi.main.MainWidget, optional) – Reference to the parent routine. The default is None.

setupui()#

Set up UI.

Return type:

None.

settings(nodialog=False)#

Entry point into item.

Parameters:

nodialog (bool, optional) – Run settings without a dialog. The default is False.

Returns:

True if successful, False otherwise.

Return type:

bool

saveproj()#

Save project data from class.

Return type:

None.

get_GXYZ()#

Get Geosoft XYZ.

Returns:

df – Pandas dataframe.

Return type:

DataFrame

get_delimited(delimiter=',')#

Get a delimited file.

Parameters:

delimiter (str, optional) – Delimiter type. The default is ‘,’.

Returns:

gdf – Pandas dataframe.

Return type:

Dataframe

get_excel()#

Get an Excel spreadsheet.

Returns:

gdf – Pandas dataframe.

Return type:

Dataframe

class pygmi.vector.iodefs.ImportVoxel(parent=None)#

Bases: pygmi.misc.ContextModule

GUI to import voxel data.

Parameters:

parent (pygmi.main.MainWidget, optional) – Reference to the parent routine. The default is None.

settings(nodialog=False)#

Entry point into item.

Parameters:

nodialog (bool, optional) – Run settings without a dialog. The default is False.

Returns:

True if successful, False otherwise.

Return type:

bool

saveproj()#

Save project data from class.

Return type:

None.

class pygmi.vector.iodefs.ExportXYZ(parent=None)#

Bases: pygmi.misc.ContextModule

GUI to export XYZ data.

Parameters:

parent (pygmi.main.MainWidget, optional) – Reference to the parent routine. The default is None.

run()#

Entry point into the routine, used to run context menu item.

Returns:

True if successful, False otherwise.

Return type:

bool

class pygmi.vector.iodefs.ExportVector(parent=None)#

Bases: pygmi.misc.ContextModule

GUI to export vector data.

Parameters:

parent (pygmi.main.MainWidget, optional) – Reference to the parent routine. The default is None.

run()#

Entry point into the routine, used to run context menu item.

Returns:

True if successful, False otherwise.

Return type:

bool

class pygmi.vector.iodefs.ExportVoxel(parent=None)#

Bases: pygmi.misc.ContextModule

GUI to export voxel data.

Parameters:

parent (pygmi.main.MainWidget, optional) – Reference to the parent routine. The default is None.

run()#

Entry point into the routine, used to run context menu item.

Returns:

True if successful, False otherwise.

Return type:

bool

pygmi.vector.iodefs.import_ubc(ifile)#

Import a 3D UBC mesh and model.

Parameters:

ifile (str) – Input file name.

Returns:

vdat – Imported voxel model.

Return type:

pygmi.vector.datatypes.VoxModel

pygmi.vector.iodefs.export_ubc(ofile, data)#

Export a section to a 3D UBC mesh and model.

Parameters:

data (pygmi.vector.datatypes.VoxModel) – Dataset to export

Return type:

None.

pygmi.vector.iodefs.get_GXYZ(ifile, showlog=print, piter=iter)#

Get Geosoft XYZ.

Parameters:
  • ifile (str) – Input file name.

  • showlog (function, optional) – Routine to show text messages. The default is print.

  • piter (function, optional) – progress bar iterable, default is iter.

Returns:

df2 – Pandas dataframe.

Return type:

DataFrame

pygmi.vector.iodefs.get_intrepid(ifile, showlog=print, piter=iter)#

Get Intrepid Database.

Parameters:
  • ifile (str) – Input file name.

  • showlog (function, optional) – Routine to show text messages. The default is print.

  • piter (function, optional) – progress bar iterable, default is iter.

Returns:

df – Pandas Dataframe.

Return type:

DataFrame