gsolve.GravitySites.sample_elevation

gsolve.GravitySites.sample_elevation#

GravitySites.sample_elevation(dem, output_col=None, xcol='easting', ycol='northing', method='nearest')[source]#

Get elevations at site locations from an DEM/xarray grid.

Parameters:
demxarray.DataArray, xarray.Dataset, str or PathLike

The array of values to sample. If dem is not a

output_colstr or None, default None

If output_col is defined, write sampled values to obj.data[output_col]. If output_col is None, return a Series of sampled values.

xcolstr, optional

The column holding x coordinates, by default “easting”

ycolstr, optional

The column holding y coordinates, by default “northing”

methodstr, default “nearest”

The interpolation method used. See xarray.DataArray.interp for available options.

Returns:
elevationsSeries or None

None if output_col is defined, otherwise a Series of sampled elevations.