Summarizes elevations within the buffer distance of each s2 cell; dates are not used to link to elevation data.
Usage
get_elevation_summary(x, fun = stats::median, buffer = 800, ...)Arguments
- x
a s2_cell_dates vector (see
?s2cd)- fun
function to summarize extracted values
- buffer
distance from s2 cell (in meters) to summarize data
- ...
passed to
stow::stow(). Thepackageandsubdirarguments are fixed by geomarker, andetagis always set toFALSEfor this versioned release asset.
Details
Elevation data come from a reproducible snapshot of the U.S. Geological Survey 3D Elevation Program (3DEP) Bare Earth DEM Dynamic service. The service snapshot, reflecting 3DEP data published through July 20, 2026, was exported directly as a single-band signed 16-bit GeoTIFF in EPSG:5070 at an 800 m grid and is distributed as a versioned geomarker release asset. See https://www.usgs.gov/3d-elevation-program/about-3dep-products-services and https://elevation.nationalmap.gov/arcgis/rest/services/3DEPElevation/ImageServer. Data courtesy of the U.S. Geological Survey.
Examples
local({
withr::local_envvar(
R_USER_DATA_DIR = fs::path_package("geomarker", "gmrkr--8841"),
R_GEOMARKER_NO_DOWNLOAD = "true"
)
print(get_elevation_summary(s2cd_example()))
print(get_elevation_summary(s2cd_example(), stats::sd, 1400))
})
#> Using managed local copy: /home/runner/work/_temp/Library/geomarker/gmrkr--8841/R/geomarker/stow/get_elevation_summary/40457d1c7c5dae64--usgs_3dep_conus_800m.tif
#> [1] 225.5 242.5
#> Using managed local copy: /home/runner/work/_temp/Library/geomarker/gmrkr--8841/R/geomarker/stow/get_elevation_summary/40457d1c7c5dae64--usgs_3dep_conus_800m.tif
#> [1] 15.67340 13.71293