Read ESRI Grid File

Read an ESRI ASCII grid file

import os

import pooch

from PVGeo.grids import EsriGridReader

Download a sample ESRI grid file

url = ""
file_paths = pooch.retrieve(url=url, known_hash=None, processor=pooch.Unzip())
file_path = [f for f in file_paths if os.path.basename(f) == "esri_grid.dem"][0]
dem = EsriGridReader().apply(file_path)
HeaderData Arrays
N Cells4875263
N Points4879680
X Bounds3.666e+05, 3.732e+05
Y Bounds3.733e+06, 3.740e+06
Z Bounds0.000e+00, 0.000e+00
Dimensions2208, 2210, 1
Spacing3.000e+00, 3.000e+00, 3.000e+00
N Arrays1
NameFieldTypeN CompMinMax

Apply a filter to the DEM to have realistic topography

warped = dem.warp_by_scalar()
warped.plot(cmap="terrain", clim=[-100, 400])
read esri

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

Gallery generated by Sphinx-Gallery