Skip to content

Commit 0cfe2fc

Browse files
committed
add readme
1 parent 7e2fad8 commit 0cfe2fc

File tree

5 files changed

+14
-11
lines changed

5 files changed

+14
-11
lines changed

DESCRIPTION

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Imports:
1616
crayon,
1717
dplyr,
1818
ggplot2,
19+
grDevices,
1920
leafpop,
2021
mapedit,
2122
mapview,

NAMESPACE

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export(plot_calibration)
1313
export(plot_shift_stats)
1414
export(select_tiles2download)
1515
export(shift_stats)
16+
importFrom(grDevices,rainbow)
1617
importFrom(stats,cor)
1718
importFrom(stats,sd)
1819
importFrom(stats,setNames)

R/GEDIcalibratoR-package.R

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"_PACKAGE"
33

44
## usethis namespace: start
5+
#' @importFrom grDevices rainbow
56
#' @importFrom stats cor
67
#' @importFrom stats sd
78
#' @importFrom stats setNames

README.Rmd

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
---
2+
output: github_document
3+
---
14

25
# GEDIcalibratoR
36

4-
<!-- badges: start -->
5-
<!-- badges: end -->
6-
77
The goal of GEDIcalibratoR is to facilitate location calibration for GEDI. It makes downloading tiles of ALS, DEM, and DEM data easy and evaluates possible spatial shifts using user-defined calibration grids. The best suitable shift can then be applied to the original data and may improve statistical models and following analyses. GEDIcalibratoR also provides functions to visualize calibration effects.
88

99
## Installation

vignettes/GEDIcalibratoR.Rmd

+8-8
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ knitr::opts_chunk$set(
1919

2020
The package should install without errors or warnings. Three NOTEs are known of:
2121

22-
1. from installed package size of 23.8Mb
22+
1. from installed package size of 114.7Mb
2323
2. from non-standard file 'README.Rmd' - here demo data is stored to speed up examples and the vignette.
2424
3. from detected possible problems related to non-visible bindings for global variables
2525

@@ -39,11 +39,11 @@ The `GEDIcalibratoR` package provides functionality to
3939

4040
## Limitations
4141

42-
Currently `GEDIcalibratoR` only provides reference data downloads from public ALS data archives of three German states, namely Northrhine-Westphalia, Thuringia, and Saxony. This approach follows the assumption, that GEDI's location error applies an entire orbit, as it originates from a constant spatial shift of the flight path.
42+
Currently `GEDIcalibratoR` only provides reference data downloads from public ALS data archives of three German states, namely Northrhine-Westphalia, Thuringia, and Saxony. This approach follows the assumption, that GEDI's location error applies to an entire orbit, as it originates from a constant spatial shift of the flight path. Algorithms used in this packages aim at moving observations closer to their true location using a grid of possible options. They may not find the exact true location with this approach.
4343

4444
## GEDI Data
4545

46-
GEDI data can be acquired from [NASA EarthData](https://search.earthdata.nasa.gov/search?q=C1908348134-LPDAAC_ECS) or through platforms such aas Google Earth Engine. To use it within `R` and `GEDIcalibratoR` it should be stored as and imported from a geo-referenced vector file (e.g. `.gpgk` or `.shp`) and have a projected coordinate reference system. In this demo, `gedi` is read using `sf`. It stores two GEDI orbits containing relative height measurements (`rh1-rh99`), the source file name (`file`), and an `ìd` column enumerating observations per file.
46+
GEDI data can be acquired from [NASA EarthData](https://search.earthdata.nasa.gov/search?q=C1908348134-LPDAAC_ECS) or through platforms such as Google Earth Engine. To use it within `R` and `GEDIcalibratoR` it should be stored as and imported from a geo-referenced vector file (e.g. `.gpgk` or `.shp`) and have a projected coordinate reference system. In this demo, `gedi` is read using `sf`. It stores two GEDI orbits containing relative height measurements (`rh1-rh99`), the source file name (`file`), and an `ìd` column enumerating observations per file.
4747

4848
```{r}
4949
library(GEDIcalibratoR)
@@ -58,7 +58,7 @@ table(gedi$file)
5858

5959
## Retrieving ALS reference tiles
6060

61-
We intersect GEDI points with ALS tile grids to identify suitable tiles for download. `intersect_tiles2download()` adds a column `n_obs` that contains the number of intersecting points per tile. This is helpful for prioritizing and to keep download volume small. In this example we will only use the three most intersected tiles for each German state instead of a total of 881 tiles. Download tiles may also be filtered by defining argument `region` or by filtering `tiles` by year of acquisition.
61+
We intersect GEDI points with ALS tile grids to identify suitable tiles for download. `intersect_tiles2download()` adds a column `n_obs` that contains the number of intersecting GEDI observations per tile. This is helpful for prioritizing and to keep download volume small. In this example we will only use the three most intersected tiles for each German state instead of a total of 881 tiles. Download tiles may also be filtered by defining argument `region` or by filtering `tiles` by year of acquisition.
6262

6363
```{r intersect}
6464
tiles = intersect_tiles2download(gedi_obs = gedi, quiet = T)
@@ -174,7 +174,7 @@ By combining two shift options in one pane the third scatter plot shows the effe
174174

175175
The output of `get_best_shift()` can be re-joined with the original GEDI measurement data and used in downstream analysis.
176176

177-
```{r, cache=TRUE}
177+
```{r mapview}
178178
#| fig.width=7,
179179
#| out.width = "100%"
180180
GEDI_calibrated = apply_shift(gedi, best_shift)
@@ -186,13 +186,13 @@ mapview(tiles, alpha.regions = 0, color="blue") +
186186
mapview(GEDI_calibrated, col.regions = color[1], alpha = 1)
187187
```
188188

189-
Zoom into this map to find the selected ALS tile footprints, the circular calibration grid, the calibrated GEDI locations and the original ones (hidden by default).
189+
Zoom into this map to find the selected ALS tile footprints, the circular calibration grids and the calibrated GEDI locations.
190190

191191
## Discussion
192192

193-
GEDI data, being acquired by a space-borne instrument, comes with a trade-off. On the one side it measures vegetation structure with a near-global coverage, delivering consistent data in areas without accessible ALS data. In turn it prone larger (height) measurement errors compared to ALS. This demo shows how GEDI data may be calibrated by reducing its location error.
193+
GEDI data, being acquired by a space-borne instrument, comes with a trade-off. On the one side it measures vegetation structure with a near-global coverage, delivering consistent data in areas without accessible ALS data. In turn it is prone to larger (height) measurement errors compared to ALS. This demo showed how GEDI data may be calibrated by reducing its location error.
194194

195-
The analysis found different optimal locations for the two example GEDI orbits. Their RMSE when compared to an ALS reference could be reduced by 0.58 (~19 %) and 0.47 (~9 %) meters, respectively. That is a significant improvement of the original data and will likely have a positive effect on further statistical models. It should be noted, however, that this result only considered few ALS reference tile and may vary when including more data. Further, this analysis used pre-filtered GEDI observations (day of year, time of day, quality flag) to receive the most promising and sensitive measurements. Including all available observations may impact the calibration effect.
195+
The analysis found different optimal locations for the two example GEDI orbits. Their RMSE when compared to an ALS reference could be reduced by 0.58 (~19 %) and 0.47 (~9 %) meters, respectively. That is a significant improvement of the original data and will likely have a positive effect on further statistical models. It should be noted, however, that this result only considered few ALS reference tiles and may vary when including more data. Further, this analysis used pre-filtered GEDI observations (day of year, time of day, quality flag) to receive the most promising and sensitive measurements. Including all available observations may impact the calibration effect.
196196
Future efforts should investigate the effect of this pre-processing method on GEDI-based estimates of above-ground carbon stock or forest structure.
197197

198198
## References

0 commit comments

Comments
 (0)