| clip | R Documentation |
clip() provides one clipping interface for open GEDI HDF5 products,
extracted footprint tables, and GEDI Level 3 or Level 4B rasters. It follows
the workflow used by ICESat2VegR while retaining rGEDI's coordinate order.
clip(x, clip_obj, ...)
## S4 method for signature 'gedi.level1b,numeric'
clip(x, clip_obj, ...)
## S4 method for signature 'gedi.level1b,SpatExtent'
clip(x, clip_obj, ...)
## S4 method for signature 'gedi.level1b,ANY'
clip(x, clip_obj, ...)
## S4 method for signature 'gedi.level2a,numeric'
clip(x, clip_obj, ...)
## S4 method for signature 'gedi.level2a,SpatExtent'
clip(x, clip_obj, ...)
## S4 method for signature 'gedi.level2a,ANY'
clip(x, clip_obj, ...)
## S4 method for signature 'gedi.level2b,numeric'
clip(x, clip_obj, ...)
## S4 method for signature 'gedi.level2b,SpatExtent'
clip(x, clip_obj, ...)
## S4 method for signature 'gedi.level2b,ANY'
clip(x, clip_obj, ...)
## S4 method for signature 'gedi.level4a,numeric'
clip(x, clip_obj, ...)
## S4 method for signature 'gedi.level4a,SpatExtent'
clip(x, clip_obj, ...)
## S4 method for signature 'gedi.level4a,ANY'
clip(x, clip_obj, ...)
## S4 method for signature 'data.frame,numeric'
clip(x, clip_obj, ...)
## S4 method for signature 'data.frame,SpatExtent'
clip(x, clip_obj, ...)
## S4 method for signature 'data.frame,ANY'
clip(x, clip_obj, ...)
## S4 method for signature 'SpatRaster,ANY'
clip(x, clip_obj, ...)
x |
A |
clip_obj |
A numeric extent in the order
|
... |
Arguments used by the selected method. HDF5 methods accept
|
Extracted tables are recognized from standard GEDI coordinates:
longitude_bin0/latitude_bin0, lon_lowestmode/lat_lowestmode, or
longitude/latitude. When the corresponding longitude_lastbin and
latitude_lastbin fields exist, both waveform endpoints must fall inside a
numeric extent.
This function masks graphics::clip(). Use graphics::clip() explicitly
when changing a base graphics clipping region.
The return type follows x. Open Level 1B, 2A, 2B, and 4A HDF5
inputs return clipped open GEDI objects; footprint tables return a
data.table::data.table; and Level 3/4B rasters return a
terra::SpatRaster. Geometry clipping with split_by returns a
named list of HDF5-backed GEDI objects, one per polygon ID.
footprints <- data.frame(
shot_number = 1:3,
lon_lowestmode = c(-44.13, -44.12, -44.10),
lat_lowestmode = c(-13.74, -13.73, -13.70)
)
clip(footprints, c(-44.14, -44.11, -13.75, -13.72))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.