Read UBC Topography File

Read a UBC topography file

# sphinx_gallery_thumbnail_number = 1
import PVGeo
import pyvista
from pyvista import examples

Download sample data files and keep track of names:

url = 'https://github.com/OpenGeoVis/PVGeo/raw/master/tests/data/Craig-Chile/LdM_topo.topo'
topo_file, _ = examples.downloads._retrieve_file(url, 'LdM_topo.topo')
topo = PVGeo.ubc.TopoReader().apply(topo_file)
print(topo)

Out:

PolyData (0x7f23c38020a8)
  N Cells:      381924
  N Points:     381924
  X Bounds:     3.550e+05, 3.720e+05
  Y Bounds:     5.999e+06, 6.016e+06
  Z Bounds:     2.050e+03, 3.104e+03
  N Scalars:    1
topo.plot(cmap='terrain')
../../_images/sphx_glr_read-topo_001.png

Total running time of the script: ( 0 minutes 49.056 seconds)

Gallery generated by Sphinx-Gallery