gemgis.raster.read_ts#

gemgis.raster.read_ts(path: Union[str, pathlib.Path]) Tuple[list, list]#

Function to read GoCAD .ts files

Parameters

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

Returns

  • vertices (list) – Pandas DataFrames containing the vertex data

  • faces (list) – NumPy arrays containing the faces data

New in version 1.0.x.

Example

>>> # Loading Libraries and File
>>> import gemgis as gg
>>> vertices, faces = gg.raster.read_ts('mesh.ts')
>>> # Inspecting the vertices
>>> vertices
    id  X           Y           Z
0   0   297077.41   5677487.26  -838.50
1   1   297437.54   5676992.09  -816.61
>>> # Inspecting the faces
>>> faces
array([[    0,     1,     2],
[    3,     2,     4],
[    1,     5,     6],...,
[40335, 40338, 40336],
[40339, 40340, 40341],
[40341, 40342, 40339]])

See also

read_msh

Reading a Leapfrog Mesh File

read_asc

Reading ESRI ASC files

read_zmap

Reading Petrel ZMAP Files