rGEDI: An R Package for NASA’s Global Ecosystem Dynamics Investigation (GEDI) Data Visualization and Processing

Carlos Alberto Silva, Caio Hamamura, Ruben Valbuena, Steve Hancock, Adrian Cardil, Eben N. Broadbent, Danilo R. A. de Almeida, Celso H. L. Silva Junior and Carine Klauberg

The rGEDI package provides functions for i) downloading, ii) visualizing, iii) clipping, iv) gridding, iv) simulating and v) exporting GEDI data.

Getting Started

Installation

Find GEDI data within your study area (GEDI finder tool)

Downloading GEDI data

Reading GEDI data

Get GEDI Pulse Full-Waveform Geolocation (GEDI Level1B)

shot_number latitude_bin0 latitude_lastbin longitude_bin0 longitude_lastbin elevation_bin0
1 0.00 -13.76 -13.76 -44.17 -44.17 784.83
2 0.00 -13.76 -13.76 -44.17 -44.17 799.05
3 0.00 -13.76 -13.76 -44.17 -44.17 814.46
4 0.00 -13.76 -13.76 -44.17 -44.17 820.14
5 0.00 -13.76 -13.76 -44.17 -44.17 821.70
6 0.00 -13.76 -13.76 -44.17 -44.17 823.25

Get GEDI Pulse Full-waveform (GEDI Level1B)

Get GEDI Elevation and Height Metrics (GEDI Level2A)

beam shot_number elev_highestreturn elev_lowestmode rh100
1 BEAM0000 0.00 740.75 736.33 4.41
2 BEAM0000 0.00 756.09 746.76 9.32
3 BEAM0000 0.00 770.34 763.15 7.19
4 BEAM0000 0.00 775.98 770.67 5.31
5 BEAM0000 0.00 777.84 773.08 4.75
6 BEAM0000 0.00 778.72 773.70 5.01

Plot waveform with RH metrics

Get GEDI Vegetation Biophysical Variables (GEDI Level2B)

beam shot_number pai fhd_normal omega pgap_theta cover
1 BEAM0000 0.00 0.01 0.64 1.00 1.00 0.00
2 BEAM0000 0.00 0.09 2.26 1.00 0.96 0.04
3 BEAM0000 0.00 0.30 1.89 1.00 0.86 0.14
4 BEAM0000 0.00 0.08 1.66 1.00 0.96 0.04
5 BEAM0000 0.00 0.02 1.58 1.00 0.99 0.01
6 BEAM0000 0.00 0.02 1.25 1.00 0.99 0.01

Get Plant Area Index (PAI) and Plant Area Volume Density (PAVD) Profiles (GEDI Level2B)

beam shot_number pai_z0_5m pai_z5_10m
1 BEAM0000 0.00 0.01 -0.00
2 BEAM0000 0.00 0.09 0.06
3 BEAM0000 0.00 0.30 0.05
4 BEAM0000 0.00 0.08 0.00
5 BEAM0000 0.00 0.02 -0.00
6 BEAM0000 0.00 0.02 -0.00
beam shot_number pavd_z0_5m pavd_z5_10m
1 BEAM0000 0.00 0.00 0.00
2 BEAM0000 0.00 0.01 0.01
3 BEAM0000 0.00 0.05 0.03
4 BEAM0000 0.00 0.02 0.01
5 BEAM0000 0.00 0.00 0.00
6 BEAM0000 0.00 0.00 0.00

Plot Plant Area Index (PAI) and Plant Area Volume Density (PAVD) Profiles

Clip GEDI data (h5 files; gedi.level1b, gedi.level2a and gedi.level2b objects)

id
0 1
1 2
2 3
3 4
4 5
5 6

Clip GEDI data (data.table objects)

## Clipping GEDI data within boundary box
level1bGeo_clip_bb <-clipLevel1BGeo(level1bGeo, xmin, xmax, ymin, ymax)
level2AM_clip_bb <- clipLevel2AM(level2AM, xmin, xmax, ymin, ymax)
level2BVPM_clip_bb <- clipLevel2BVPM(level2BVPM, xmin, xmax, ymin, ymax)
level1BPAIProfile_clip_bb <- clipLevel2BPAIProfile(level2BPAIProfile, xmin, xmax, ymin, ymax)
level2BPAVDProfile_clip_bb <- clipLevel2BPAVDProfile(level2BPAVDProfile, xmin, xmax, ymin, ymax)

## Clipping GEDI data by geometry
level1bGeo_clip_gb <- clipLevel1BGeoGeometry(level1bGeo,polygon_spdf, split_by=split_by)
level2AM_clip_gb <- clipLevel2AMGeometry(level2AM,polygon_spdf, split_by=split_by)
level2BVPM_clip_gb <- clipLevel2BVPMGeometry(level2BVPM,polygon_spdf, split_by=split_by)
level1BPAIProfile_clip_gb <- clipLevel2BPAIProfileGeometry(level2BPAIProfile,polygon_spdf, split_by=split_by)
level2BPAVDProfile_clip_gb <- clipLevel2BPAVDProfileGeometry(level2BPAVDProfile,polygon_spdf, split_by=split_by)


## View GEDI clipped data by bbox
m1<-leaflet() %>%
 addCircleMarkers(level2AM$lon_lowestmode,
                  level2AM$lat_lowestmode,
                  radius = 1,
                  opacity = 1,
                  color = "red")  %>%
 addCircleMarkers(level2AM_clip_bb$lon_lowestmode,
                  level2AM_clip_bb$lat_lowestmode,
                  radius = 1,
                  opacity = 1,
                  color = "green")  %>%
 addScaleBar(options = list(imperial = FALSE)) %>%
 addProviderTiles(providers$Esri.WorldImagery)  %>%
 addLegend(colors = c("red","green"), labels= c("All samples","Clip bbox"),title ="GEDI Level2A")

## View GEDI clipped data by geometry
# color palette
pal <- colorFactor(
 palette = c('blue', 'green', 'purple', 'orange',"white","black","gray","yellow"),
 domain = level2AM_clip_gb$poly_id
)

m2<-leaflet() %>%
 addCircleMarkers(level2AM$lon_lowestmode,
                  level2AM$lat_lowestmode,
                  radius = 1,
                  opacity = 1,
                  color = "red")  %>%
 addCircleMarkers(level2AM_clip_gb$lon_lowestmode,
                  level2AM_clip_gb$lat_lowestmode,
                  radius = 1,
                  opacity = 1,
                  color = pal(level2AM_clip_gb$poly_id))  %>%
 addScaleBar(options = list(imperial = FALSE)) %>%
 addPolygons(data=polygon_spdf,weight=1,col = 'white',
             opacity = 1, fillOpacity = 0) %>%
 addProviderTiles(providers$Esri.WorldImagery) %>%
 addLegend(pal = pal, values = level2AM_clip_gb$poly_id,title ="Poly IDs" )

m3 = sync(m1, m2)

m3

Compute descriptive statistics of GEDI Level2A and Level2B data

poly_id max
1 2 12.81
2 1 12.62
3 5 9.96
4 6 8.98
5 4 10.33
6 8 8.72
poly_id min max mean sd
1 2 4.08 12.81 5.51 1.45
2 1 3.78 12.62 5.51 1.75
3 5 4.12 9.96 5.10 1.20
4 6 4.64 8.98 5.60 1.02
5 4 4.38 10.33 7.91 1.76
6 8 4.45 8.72 6.14 1.10
max
1 1.22
poly_id min max mean sd
1 2 0.00 0.35 0.05 0.06
2 1 0.00 0.38 0.05 0.06
3 5 0.00 0.43 0.04 0.06
4 6 0.00 0.24 0.03 0.06
5 4 0.00 0.35 0.11 0.09
6 8 0.01 0.15 0.05 0.04

Compute Grids with descriptive statistics of GEDI-derived Elevation and Height Metrics (Level2A)

Compute Grids with descriptive statistics of GEDI-derived Canopy Cover and Vertical Profile Metrics (Level2B)

Simulating GEDI full-waveform data from Airborne Laser Scanning (ALS) 3-D point cloud and extracting canopy derived metrics

# specify the path to ALS data
lasfile_amazon <- file.path(outdir, "Amazon.las")
lasfile_savanna <- file.path(outdir, "Savanna.las")

# Reading and plot ALS file
library(lidR)
library(plot3D)
las_amazon<-readLAS(lasfile_amazon)
las_savanna<-readLAS(lasfile_savanna)

# Extracting plot center geolocations
xcenter_amazon = mean(las_amazon@bbox[1,])
ycenter_amazon = mean(las_amazon@bbox[2,])
xcenter_savanna = mean(las_savanna@bbox[1,])
ycenter_savanna = mean(las_savanna@bbox[2,])

# Simulating GEDI full-waveform
wf_amazon<-gediWFSimulator(
  input  = lasfile_amazon,
  output = file.path(outdir,"gediWF_amazon_simulation.h5"),
  coords = c(xcenter_amazon, ycenter_amazon))
wf_savanna<-gediWFSimulator(
  input  = lasfile_savanna,
  output = file.path(outdir,"/gediWF_savanna_simulation.h5"),
  coords = c(xcenter_savanna, ycenter_savanna))

# Plot ALS and GEDI simulated full-waveform
oldpar<-par()
par(mfrow=c(2,2), mar=c(4,4,0,0), oma=c(0,0,1,1),cex.axis = 1.2)
scatter3D(las_amazon@data$X,las_amazon@data$Y,las_amazon@data$Z,pch = 16,colkey = FALSE, main="",
         cex = 0.5,bty = "u",col.panel ="gray90",phi = 30,alpha=1,theta=45,
         col.grid = "gray50", xlab="UTM Easting (m)", ylab="UTM Northing (m)", zlab="Elevation (m)")

plot(wf_amazon, relative=TRUE, polygon=TRUE, type="l", lwd=2, col="forestgreen",
    xlab="", ylab="Elevation (m)", ylim=c(90,140))
grid()
scatter3D(las_savanna@data$X,las_savanna@data$Y,las_savanna@data$Z,pch = 16,colkey = FALSE, main="",
         cex = 0.5,bty = "u",col.panel ="gray90",phi = 30,alpha=1,theta=45,
         col.grid = "gray50", xlab="UTM Easting (m)", ylab="UTM Northing (m)", zlab="Elevation (m)")

plot(wf_savanna, relative=TRUE, polygon=TRUE, type="l", lwd=2, col="green",
    xlab="Waveform Amplitude (%)", ylab="Elevation (m)", ylim=c(815,835))
grid()

Extracting GEDI full-waveform derived metrics without adding noise to the full-waveform

wave ID true ground true top ground slope ALS cover gHeight maxGround inflGround
Amazon 0 -1000000.00 133.27 -1000000.00 -1.00 94.32 99.97 95.18
Savanna 0 -1000000.00 831.49 -1000000.00 -1.00 822.18 822.19 822.24

Extracting GEDI full-waveform derived metrics after adding noise to the waveform

wave ID true ground true top ground slope ALS cover gHeight maxGround inflGround
Amazon 0 -1000000.00 133.27 -1000000.00 -1.00 98.49 99.97 95.59
Savanna 0 -1000000.00 831.49 -1000000.00 -1.00 822.20 822.19 822.25

Always close gedi objects, so HDF5 files won’t be blocked!

References

Dubayah, R., Blair, J.B., Goetz, S., Fatoyinbo, L., Hansen, M., Healey, S., Hofton, M., Hurtt, G., Kellner, J., Luthcke, S., & Armston, J. (2020) The Global Ecosystem Dynamics Investigation: High-resolution laser ranging of the Earth’s forests and topography. Science of Remote Sensing, p.100002. https://doi.org/10.1016/j.srs.2020.100002

Hancock, S., Armston, J., Hofton, M., Sun, X., Tang, H., Duncanson, L.I., Kellner, J.R. and Dubayah, R., 2019. The GEDI simulator: A large-footprint waveform lidar simulator for calibration and validation of spaceborne missions. Earth and Space Science. https://doi.org/10.1029/2018EA000506

Silva, C. A.; Saatchi, S.; Alonso, M. G. ; Labriere, N. ; Klauberg, C. ; Ferraz, A. ; Meyer, V. ; Jeffery, K. J. ; Abernethy, K. ; White, L. ; Zhao, K. ; Lewis, S. L. ; Hudak, A. T. (2018) Comparison of Small- and Large-Footprint Lidar Characterization of Tropical Forest Aboveground Structure and Biomass: A Case Study from Central Gabon. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, p. 1-15. https://ieeexplore.ieee.org/document/8331845

GEDI webpage. Accessed on February 15 2020 https://gedi.umd.edu/

GEDI01_Bv001. Accessed on February 15 2020 https://lpdaac.usgs.gov/products/gedi01_bv001/

GEDI02_Av001. Accessed on February 15 2020 https://lpdaac.usgs.gov/products/gedi02_av001/

GEDI02_Bv001. Accessed on February 15 2020 https://lpdaac.usgs.gov/products/gedi02_bv001/

GEDI Finder. Accessed on February 15 2020 https://lpdaacsvc.cr.usgs.gov/services/gedifinder

Acknowledgements

University of Maryland and NASA Goddard Space Flight Center for developing GEDI mission.

We gratefully acknowledge funding from NASA’s Carbon Monitoring Systems, grant NNH15ZDA001N-CMS. Project entitled “Future Mission Fusion for High Biomass Forest Carbon Accounting” led by Dr. Laura Duncanson (, University of Maryland) and Dr. Lola Fatoyinbo (, NASA’s Goddard Space Flight Center).

Brazilian National Council for Scientific and Technological Development (CNPq) for funding the project entitled “Mapping fuel load and simulation of fire behaviour and spread in the Cerrado biome using modeling and remote sensing technologies” and leaded by Prof. Dr. Carine Klauberg () and Dr. Carlos Alberto Silva ().

Reporting Issues

Please report any issue reagardling the rGEDI package herein https://groups.yahoo.com/neo/groups/rGEDI

Citing rGEDI

Silva,C.A; Hamamura,C.; Valbuena, R.; Hancock,S.; Cardil,A.; Broadbent, E. N.; Almeida,D.R.A.; Silva Junior, C.H.L; Klauberg, C. rGEDI: NASA’s Global Ecosystem Dynamics Investigation (GEDI) Data Visualization and Processing. version 0.1.2, accessed on April. 1 2020, available at: https://CRAN.R-project.org/package=rGEDI

Disclaimer

rGEDI package has not been developted by the GEDI team. It comes with no guarantee, expressed or implied, and the authors hold no responsibility for its use or reliability of its outputs.