knitr::opts_chunk$set(echo = TRUE)

Preprocessing

Download GEDI data

To geta all available GEDI data for a certain area, a URL with adjusted ymax, xmin, ymin, xmax can be created

Example University Forest

https://lpdaacsvc.cr.usgs.gov/services/gedifinder?product=GEDI02_B&version=001&bbox=50.848372,8.661830,50.831518,8.694962&output=html

Data can be downloaded manually

To do: Automate process to search and download available data automatically with input = coordinates nad R routine

Subset GEDI Data

Install GEDI subsetter from https://git.earthdata.nasa.gov/projects/LPDUR/repos/gedi-subsetter/browse

This is a linked phrase

Problems were solved by additionally installing geopandas in Anaconda Powershell in seperate environment

subsetting line in Anaconda: python GEDI_Subsetter.py --dir C:/Users/Alice/Uni/Projekte/GEDI/data --roi 50.848372,8.694962,50.831518,8.661830 --sds /geolocation/height_bin0

--sds other layers than the default

Todo: inlcude that step into R routine

Download temporally fitting Sentinel data

library(sf)
library(mapview)
library(GEDItools)

set paths

# setwd(dirname(rstudioapi::getSourceEditorContext()[[2]]))
sub <- "/"
inpath <- "C:/Users/Alice/Uni/Projekte/GEDI/data/output/"
outpath <- paste0("../data/", sub)

merge all available GEDI files for the university forest

uniwald <- GEDI_sub_merge(inpath = inpath)
# for variable plant area index "pai"
obs_df <- GEDI_df(lst = uniwald, var = "pai")
obs_df <- obs_df[(obs_df$va != -9999.000000),]
obs_sf = st_as_sf(obs_df, coords = c("lo", "la"), crs = 4326)
mapview(obs_sf, zcol = "va")@map


envima/GEDItools documentation built on July 25, 2020, 5:13 p.m.