gemgis.raster.read_msh#

gemgis.raster.read_msh(path: Union[str, pathlib.Path]) Dict[str, numpy.ndarray]#

Function to read Leapfrog .msh files - https://help.leapfrog3d.com/Geo/4.3/en-GB/Content/meshes/meshes.htm

Parameters

path (Union[str, Path]) – Path to msh file, e.g. path='mesh.msh'

Returns

data – Dict containing the mesh data

Return type

Dict[str, np.ndarray]

New in version 1.0.x.

Example

>>> # Loading Libraries and File
>>> import gemgis as gg
>>> data = gg.raster.read_msh('mesh.msh')
>>> data
{'Tri': array([[    0,     1,     2],
[    0,     3,     1],
[    4,     3,     0],
...,
[53677, 53672, 53680],
[53679, 53677, 53680],
[53673, 53672, 53677]]),
'Location': array([[ 1.44625109e+06,  5.24854344e+06, -1.12743862e+02],
[ 1.44624766e+06,  5.24854640e+06, -1.15102216e+02],
[ 1.44624808e+06,  5.24854657e+06, -1.15080548e+02],
...,
[ 1.44831008e+06,  5.24896679e+06, -1.24755449e+02],
[ 1.44830385e+06,  5.24896985e+06, -1.33694397e+02],
[ 1.44829874e+06,  5.24897215e+06, -1.42506587e+02]])}

See also

read_ts

Reading a GoCAD TSurface File

read_asc

Reading ESRI ASC files

read_zmap

Reading Petrel ZMAP Files