aboveR

aboveR hex sticker

R-CMD-check CRAN status Lifecycle: experimental codecov

LiDAR Terrain Analysis and Change Detection from Above

Terrain change detection, cut and fill volume estimation, terrain profiling, reclamation monitoring, and erosion analysis from LiDAR point clouds and DEMs. Built on ‘lidR’ for point cloud I/O and ‘terra’ for raster operations. Includes utilities for ‘KyFromAbove’ LiDAR data access.

Installation

# Install from CRAN (when available)
install.packages("aboveR")

# Or install the development version from GitHub
# install.packages("pak")
pak::pak("chrislyonsKY/aboveR")

Quick Start

library(aboveR)

# Load bundled sample DEMs
before <- sample_data("dem_before")
after  <- sample_data("dem_after")

# Detect terrain changes between two epochs
change <- terrain_change(before, after)
terra::plot(change[["change"]], main = "Elevation Change (m)")

Examples

Cut/Fill Volume Estimation

reference <- sample_data("dem_reference")
boundary  <- sample_data("boundary")

vol <- estimate_volume(after, reference, boundary)
cat(sprintf("Cut: %.0f m³ | Fill: %.0f m³ | Net: %.0f m³\n",
            vol$cut_volume, vol$fill_volume, vol$net_volume))

Change Summary by Zone

zones <- sample_data("zones")

summary <- change_by_zone(change, zones, id_field = "zone_id")
print(summary[, c("zone_id", "mean_change", "cut_volume", "fill_volume")])

Terrain Profiling

line <- sample_data("profile_line")

prof <- terrain_profile(before, line)
plot(prof$distance, prof$elevation, type = "l",
     xlab = "Distance (m)", ylab = "Elevation (m)",
     main = "Terrain Profile")

Surface Roughness

roughness <- surface_roughness(after, window = 5)
terra::plot(roughness, main = "Surface Roughness (Std Dev)")

KyFromAbove Access

# Access Kentucky statewide LiDAR (requires network)
library(sf)
aoi <- st_point(c(-84.5, 38.0)) |>
  st_sfc(crs = 4326) |>
  st_buffer(1000)

tiles <- kfa_find_tiles(aoi, phase = 2)
dem   <- kfa_read_dem(tiles$tile_id[1], phase = 2)

License

MIT

Author

Chris LyonsGitHub | LinkedIn