Read Surfer Grid File

Read an Surfer ASCII grid file

import pooch

from PVGeo.grids import SurferGridReader

Download a sample Surfer grid file

fname = "surfer-grid.grd"
url = "{}".format(fname)
file_path = pooch.retrieve(url=url, known_hash=None)

dem = SurferGridReader().apply(file_path)
HeaderData Arrays
N Cells40001
N Points40404
X Bounds0.000e+00, 1.105e+06
Y Bounds0.000e+00, 9.050e+05
Z Bounds0.000e+00, 0.000e+00
Dimensions222, 182, 1
Spacing5.000e+03, 5.000e+03, 1.000e+00
N Arrays1
NameFieldTypeN CompMinMax

Apply a filter to the DEM to have realistic topography

warped = dem.warp_by_scalar(scale_factor=300.0)
read surfer

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

Gallery generated by Sphinx-Gallery