Title: | DSM and LiDAR downloader |
---|---|
Description: | A collection of functions to search and donwload DSM (Digital Surface Model) and LiDAR (Light Detection and Ranging) data via APIs, including 'OpenTopography' <https://portal.opentopography.org/apidocs/> and 'TNMAccess' <https://apps.nationalmap.gov/tnmaccess/#/>. |
Authors: | Xiaohao Yang [aut, cre, cph], Nathan Fox [aut], Derek Van Berkel [aut], Mark Lindquist [aut] |
Maintainer: | Xiaohao Yang <[email protected]> |
License: | GPL-3 |
Version: | 1.0.0 |
Built: | 2024-11-26 05:10:40 UTC |
Source: | https://github.com/billbillbilly/dsmsearch |
Search for and download ALOS Global Digital Surface Model (AW3D30) via OpenTopography API 1.0.0 based on coordinates of a spatial point with a given distance or bounding box. The raster resolution is 30 meter.
get_dsm_30(x, y, r, epsg, bbox, key = "")
get_dsm_30(x, y, r, epsg, bbox, key = "")
x |
numeric, indicating Longtitude degree of the center point. |
y |
numeric, indicating latitude degree of the center point. |
r |
numeric, indicating search distance (meter or feet) for LiDAR data. |
epsg |
numeric, the EPSG code specifying the coordinate reference system. |
bbox |
vector, a bounding box defining the geographical area for downloading data. |
key |
character, API key of OpenTopography. |
To request an API key of OpenTopography, online registeration is needed.
raster
## Not run: data <- dsmSearch::get_dsm_30(bbox = c(-83.783557,42.241833,-83.696525,42.310420), key = "API key") data <- dsmSearch::get_dsm_30(x = -83.741289, y = 42.270146, r = 1000, epsg = 2253, key = "API key") ## End(Not run)
## Not run: data <- dsmSearch::get_dsm_30(bbox = c(-83.783557,42.241833,-83.696525,42.310420), key = "API key") data <- dsmSearch::get_dsm_30(x = -83.741289, y = 42.270146, r = 1000, epsg = 2253, key = "API key") ## End(Not run)
Search for and download LiDAR data based on coordinates of a spatial point with a given distance or a bounding box. The maximum distance is 1000m. Different dataset could be found and the function automatically downloads the latest dataset. To get more details of data on a larger scale, please use viewscape::lidar_search.
get_lidar(x, y, r, epsg, bbox, max_return = 500, folder)
get_lidar(x, y, r, epsg, bbox, max_return = 500, folder)
x |
numeric, indicating Longtitude degree of the center point. |
y |
numeric, indicating latitude degree of the center point. |
r |
numeric, indicating search distance for LiDAR data. The maximum distance is 1000m (3281ft). If r > 1000m, it will be reset to 1000m. |
epsg |
numeric, the EPSG code specifying the coordinate reference system. |
bbox |
vector, a bounding box defining the geographical area for downloading data. |
max_return |
numeric, indicating the maximum of returns. |
folder |
string (optional), indicating a path for downloading the LiDAR data |
lidR LAS object.
Jean-Romain Roussel and David Auty (2022). Airborne LiDAR Data Manipulation and Visualization for Forestry Applications. R package version 4.0.1. https://cran.r-project.org/package=lidR
## Not run: las <- dsmSearch::get_lidar(x = -83.741289, y = 42.270146, r = 1000, epsg = 2253) las <- dsmSearch::get_lidar(bbox = c(-83.742282,42.273389,-83.733442,42.278724), epsg = 2253) terra::plot(lidR::rasterize_canopy(las, 10, lidR::dsmtin())) ## End(Not run)
## Not run: las <- dsmSearch::get_lidar(x = -83.741289, y = 42.270146, r = 1000, epsg = 2253) las <- dsmSearch::get_lidar(bbox = c(-83.742282,42.273389,-83.733442,42.278724), epsg = 2253) terra::plot(lidR::rasterize_canopy(las, 10, lidR::dsmtin())) ## End(Not run)
The lidar_search function is designed to facilitate the retrieval and exploration of LiDAR (Light Detection and Ranging) data within a specified bounding box (bbox). This function enables users to search for LiDAR data, preview available graphics, and optionally download LiDAR data files for further analysis.
lidar_search(bbox, max_return = 500, preview = FALSE, folder = "")
lidar_search(bbox, max_return = 500, preview = FALSE, folder = "")
bbox |
vector, a bounding box defining the geographical area for the LiDAR data search. |
max_return |
numeric, indicating the maximum of returns. |
preview |
logical. If TRUE (default is FALSE), enable or disable previewing LiDAR graphics. |
folder |
string (optional), indicating an optional folder path where downloaded LiDAR data files will be saved. |
dataframe
The lidar_search function simplifies the process of searching for and working with LiDAR data via the TNMAccess API: https://tnmaccess.nationalmap.gov/api/v1/docs.
bbox <- c(-83.742282,42.273389,-83.733442,42.278724) search_result <- dsmSearch::lidar_search(bbox = bbox, max_return = 25, preview = FALSE)
bbox <- c(-83.742282,42.273389,-83.733442,42.278724) search_result <- dsmSearch::lidar_search(bbox = bbox, max_return = 25, preview = FALSE)