
Extract elevation with terra
Source:vignettes/example-extract-elevation.Rmd
example-extract-elevation.RmdThis example uses BlueTopo source tiles from the National Bathymetric Source catalog. The build verifies the downloaded assets and records their source metadata.
This example uses BlueTopo tiles covering New York Harbor. The
workflow demonstrates tile discovery, checksum-verified asset retrieval,
and file-backed raster access with terra. Raster Attribute
Table (RAT) sidecars are retained with the source GeoTIFF assets.
bluertopo() returns terra objects and, with
details = TRUE, exposes selected tiles, downloads, query
metadata, provenance, and coverage diagnostics. Normal native extraction
does not intentionally resample.
Extract elevation
result <- bluertopo(
real_aoi,
layers = "elevation",
resolution = "native",
coverage = "fill",
details = TRUE,
progress = FALSE,
quiet = TRUE
)Object summary
| element | Value |
|---|---|
| object type | SpatRaster |
| result$data class | SpatRaster |
| number of layers | 1 |
| layer names | elevation |
| CRS summary | EPSG:26918 |
| resolution | 4 x 4 |
| source count | 1 |
Coverage
| Published coverage (%) | Selected coverage (%) | AOI intersected (%) | Target coverage (%) | Target met | Coverage type |
|---|---|---|---|---|---|
| 100 | 100 | 100 | 100 | Yes | geometric tile-index coverage |
