Error to plot waveform and rh metrics with rGEDI
Posted: Sun Sep 29, 2024 3:43 pm America/New_York
Dear colleagues ,
I am trying to plot the waveform with RH metrics for a specific region. I downloaded the data manually (using a shapefile directly from the site). When I request the values for the RH column, the values are all zero. I tested different relative heights (80, 100, 50, and 75), and all returned the following error message:
Error in seq.default(min_z, max_z, length = 4) :
'from' must be a finite number
Additionally, there were warning messages: 1: In min(x) : no non-missing arguments for min; returning Inf 2: In max(x) : no non-missing arguments for max; returning -Inf 3: In min(x) : no non-missing arguments for min; returning Inf 4: In max(x) : no non-missing arguments for max; returning -Inf 5: In max(energy_*****_normalized) : no non-missing arguments for max; returning -Inf.
HERE IS THE FULL CODE :
library(rGEDI)
gedilevel2a<-readLevel2A("C:/DOUTORADO_ECOLOGIA/rGEDI/GEDI02_A_002-20240929_190258/GEDI02_A_2019158114458_O02743_01_T03164_02_003_01_V002.h5")
# Get GEDI Elevation and Height Metrics
level2a<-getLevel2AM(gedilevel2a)
head(level2AM[,c("beam","shot_number","elev_highestreturn","elev_lowestmode","rh80")])
shot_number = "51090000100000001"
png("fig8.png", width = 8, height = 6, units = 'in', res = 300)
plotWFMetrics(gedilevel1b, gedilevel2a, shot_number, rh=c(25, 50, 75, 90))
dev.off()
I am trying to plot the waveform with RH metrics for a specific region. I downloaded the data manually (using a shapefile directly from the site). When I request the values for the RH column, the values are all zero. I tested different relative heights (80, 100, 50, and 75), and all returned the following error message:
Error in seq.default(min_z, max_z, length = 4) :
'from' must be a finite number
Additionally, there were warning messages: 1: In min(x) : no non-missing arguments for min; returning Inf 2: In max(x) : no non-missing arguments for max; returning -Inf 3: In min(x) : no non-missing arguments for min; returning Inf 4: In max(x) : no non-missing arguments for max; returning -Inf 5: In max(energy_*****_normalized) : no non-missing arguments for max; returning -Inf.
HERE IS THE FULL CODE :
library(rGEDI)
gedilevel2a<-readLevel2A("C:/DOUTORADO_ECOLOGIA/rGEDI/GEDI02_A_002-20240929_190258/GEDI02_A_2019158114458_O02743_01_T03164_02_003_01_V002.h5")
# Get GEDI Elevation and Height Metrics
level2a<-getLevel2AM(gedilevel2a)
head(level2AM[,c("beam","shot_number","elev_highestreturn","elev_lowestmode","rh80")])
shot_number = "51090000100000001"
png("fig8.png", width = 8, height = 6, units = 'in', res = 300)
plotWFMetrics(gedilevel1b, gedilevel2a, shot_number, rh=c(25, 50, 75, 90))
dev.off()