Commit 6873c17d authored by Johannes Knoch's avatar Johannes Knoch
Browse files

changes in the documentation due to new probability map threshold and legend;...

changes in the documentation due to new probability map threshold and legend; new screenshot (/images/inter_map_ex_new.png) with probabilty map changes
parent a290cbd4
......@@ -4,10 +4,13 @@ author: "Carsten Neumann, Alison Beamish, Romulo Goncalves"
date: "01/06/2021"
output:
md_document:
pandoc_args: ["-output", "README.md"]
pandoc_args: ["--output", "README.md"]
toc: true
toc_depth: 2
variant: gfm
pdf_document:
toc: true
toc_depth: 2
html_document:
theme: united
highlight: tango
......@@ -17,9 +20,6 @@ output:
collapsed: false
smooth_scroll: false
df_print: paged
pdf_document:
toc: true
toc_depth: 2
always_allow_html: yes
header-includes:
- \usepackage{caption}
......@@ -265,13 +265,13 @@ Habitat sampling output. R object that contains:
```
### 4.1.2 Interactive probability maps and downloading output
An interactive map is plotted in a web browser (e.g., Firefox for Linux) containing a selected habitat type. The probability threshold can be viewed by hovering the mouse over the map.
An interactive map is plotted in a web browser (e.g., Firefox for Linux) containing a selected habitat type. The number of models predicting this habitat type can be viewed by hovering the mouse over the map.
![](./images/inter_map_ex.png){width=65%}
![](./images/inter_map_ex_new.png){width=65%}
From this interactive map, the user has two choices:
1. Extract class type on the basis of a threshold if the probability map meets the user's evaluation
1. Extract class type on the basis of a threshold (minimum number of models assigning a pixel to that class type) if the probability map meets the user's evaluation
If the user chooses to extract the class, a user defined threshold is entered into the R console and the following files are saved:
......
This diff is collapsed.
No preview for this file type
......@@ -2,21 +2,21 @@
- [1 Introduction](#introduction)
- [1.1 Usage](#usage)
- [1.2 Sample datasets](#sample-datasets)
- [2 HaSa installation](#hasa-installation)
- [2.1 HaSa dependencies](#hasa-dependencies)
- [2.2 Install HaSa](#install-hasa)
- [2.3 Load HaSa](#load-hasa)
- [3 Load demo data](#load-demo-data)
- [3.1 Data directories](#data-directories)
- [3.2 Satellite timeseries stack](#satellite-timeseries-stack)
- [3.3 Selecting reference samples](#selecting-reference-samples)
- [4 Generating outputs](#generating-outputs)
- [4.1 Calculating class
- [1 Introduction](#introduction)
- [1.1 Usage](#usage)
- [1.2 Sample datasets](#sample-datasets)
- [2 HaSa installation](#hasa-installation)
- [2.1 HaSa dependencies](#hasa-dependencies)
- [2.2 Install HaSa](#install-hasa)
- [2.3 Load HaSa](#load-hasa)
- [3 Load demo data](#load-demo-data)
- [3.1 Data directories](#data-directories)
- [3.2 Satellite timeseries stack](#satellite-timeseries-stack)
- [3.3 Selecting reference samples](#selecting-reference-samples)
- [4 Generating outputs](#generating-outputs)
- [4.1 Calculating class
probability](#calculating-class-probability)
- [4.2 Generating classification map and summary
- [4.2 Generating classification map and summary
statistics](#generating-classification-map-and-summary-statistics)
# 1 Introduction
......@@ -37,7 +37,7 @@ documentation assume a familiarity with the R software. The document is
built successively and is intended to lead you step-by-step through the
HaSa procedure of generating probability and classification maps. HaSa
is still in development and any suggestions or improvements are welcomed
and encouraged in our [GitHub Community
and encouraged in our [GitLab Community
Version](https://git.gfz-potsdam.de/habitat-sampler/HabitatSampler.git).
If questions remain please don’t hesitate to contact the authors of the
package. For a detailed description of the Habitat Sampler and its
......@@ -46,10 +46,10 @@ applications, see [Neumann et al.,
## 1.1 Usage
The tool is implemented in R and uses Leaflet [(Cheng et
al., 2019)](https://rdrr.io/cran/leaflet/) to generate interactive maps
in a web browser. There are no assumptions about the input image data
and there are no constraints for the spectral-temporal-spatial domain in
The tool is implemented in R and uses Leaflet [(Cheng et al.,
2019)](https://rdrr.io/cran/leaflet/) to generate interactive maps in a
web browser. There are no assumptions about the input image data and
there are no constraints for the spectral-temporal-spatial domain in
which the image is sampled. The tool requires the input of a priori
expert user knowledge to generate reference data about expected surface
classes which are delineated in the imagery or extracted from an
......@@ -78,7 +78,7 @@ data including the band ID in the timeseries stack are provided below
(Table 1).
| | Band 2 | Band 3 | Band 4 | Band 5 | Band 6 | Band 7 | Band 8 | Band 11 | Band 12 |
| ---------- | :----- | :----- | :----- | :--------- | :--------- | :--------- | :----- | :------ | :------ |
|------------|:-------|:-------|:-------|:-----------|:-----------|:-----------|:-------|:--------|:--------|
| Date | Blue | Green | Red | Red Edge 1 | Red Edge 2 | Red Edge 3 | NIR | SWIR 1 | SWIR 2 |
| 2018-03-03 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 2018-05-07 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
......@@ -123,16 +123,16 @@ following commands:
``` r
install.packages("remotes")
install.packages("https://cran.r-project.org/src/contrib/Archive/BH/BH_1.69.0-1.tar.
gz",
gz",
repos = NULL, type = "source")
install.packages("https://cran.r-project.org/src/contrib/Archive/sf/sf_0.9-0.tar.
gz",
gz",
repos = NULL, type = "source")
install.packages("https://cran.r-project.org/src/contrib/Archive/sp/sp_1.4-4.tar.
gz",
gz",
repos = NULL, type = "source")
install.packages("https://cran.r-project.org/src/contrib/Archive/rgdal/rgdal_1.5-12.
tar.gz",
tar.gz",
repos = NULL, type = "source")
```
......@@ -146,8 +146,8 @@ install the `HaSa` R package, build its manual and its vignettes.
``` r
library(remotes)
remotes::install_git("https://git.gfz-potsdam.de/habitat-sampler/HabitatSampler.git",
ref = "master", subdir = "R-package", dependencies = NA, upgrade = FALSE,
remotes::install_git("https://git.gfz-potsdam.de/habitat-sampler/HabitatSampler.git",
ref = "master", subdir = "R-package", dependencies = NA, upgrade = FALSE,
build = TRUE, build_manual = TRUE, build_vignettes = TRUE)
```
......@@ -161,8 +161,8 @@ warning messages related with the latest changes in `gdal` and `PROJ6`.
``` r
options(rgdal_show_exportToProj4_warnings = "none")
libraries <- c("rgdal", "raster", "maptools", "spatialEco", "randomForest",
"e1071", "devtools", "velox", "rgeos", "leaflet", "htmlwidgets", "IRdisplay",
libraries <- c("rgdal", "raster", "maptools", "spatialEco", "randomForest",
"e1071", "devtools", "velox", "rgeos", "leaflet", "htmlwidgets", "IRdisplay",
"HaSa")
lapply(libraries, library, character.only = TRUE)
```
......@@ -201,10 +201,10 @@ raster::rasterOptions(tmpdir = "./RasterTmp/")
The satellite time series is either passed as a **3.2.1** stack of
images already clipped or **3.2.2** a stack of image to be clipped. In
both cases, the input Satellite images needs to either have a valid
projection or the projection be passed as parameter, i.e., `sat_crs_str
= '+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs'`, otherwise, the
function will report error. Satellite time series data are available in
`dataPath`.
projection or the projection be passed as parameter, i.e.,
`sat_crs_str = '+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs'`,
otherwise, the function will report error. Satellite time series data
are available in `dataPath`.
``` r
satellite_series_path <- paste(dataPath, "SentinelStack_2018.tif", sep = "")
......@@ -246,15 +246,15 @@ table_data_path <- paste(dataPath, "Example_Reference_table.txt", sep = "")
ref <- HaSa::load_reference_as_table(table_data_path)
```
| | SentinelStack\_2018.1 | SentinelStack\_2018.2 | SentinelStack\_2018.3 | … | SentinelStack\_2018.54 |
| -------------- | --------------------: | --------------------: | --------------------: | :- | ---------------------: |
| deciduous | 1066 | 1069 | 915 | … | 1725 |
| coniferous | 656 | 687 | 444 | … | 1671 |
| heather\_young | 2071 | 2303 | 2227 | … | 2726 |
| heather\_old | 895 | 910 | 728 | … | 1413 |
| heather\_shrub | 889 | 927 | 792 | … | 1718 |
| bare\_ground | 2176 | 2335 | 2277 | … | 2139 |
| xeric\_grass | 3952 | 4566 | 4757 | … | 4893 |
| | SentinelStack\_2018.1 | SentinelStack\_2018.2 | SentinelStack\_2018.3 | … | SentinelStack\_2018.54 |
|----------------|----------------------:|----------------------:|----------------------:|:----|-----------------------:|
| deciduous | 1066 | 1069 | 915 | … | 1725 |
| coniferous | 656 | 687 | 444 | … | 1671 |
| heather\_young | 2071 | 2303 | 2227 | … | 2726 |
| heather\_old | 895 | 910 | 728 | … | 1413 |
| heather\_shrub | 889 | 927 | 792 | … | 1718 |
| bare\_ground | 2176 | 2335 | 2277 | … | 2139 |
| xeric\_grass | 3952 | 4566 | 4757 | … | 4893 |
Reference data
......@@ -286,7 +286,7 @@ reference spectra (rows = class).
``` r
# create vector with class names. The order of classes must follow the
# same order of reference spectra (row = class)
classNames <- c("deciduous", "coniferous", "heather_young", "heather_old", "heather_shrub",
classNames <- c("deciduous", "coniferous", "heather_young", "heather_old", "heather_shrub",
"bare_ground", "xeric_grass")
```
......@@ -373,15 +373,15 @@ HaSa::multi_Class_Sampling(
)
```
- **Note 1**: Regular sampling is faster than random
- **Note 2**: The argument `last = T` can be set when only one class
- **Note 1**: Regular sampling is faster than random
- **Note 2**: The argument `last = T` can be set when only one class
should be separated from the background pixels
- **Note 3**: The results from previous steps are reproducible when
- **Note 3**: The results from previous steps are reproducible when
using the same seed value and `int.seed=Run@seeds`
(e.g. <Run02@seeds>) in consequence, `init.sample` for regular
sampling determines an invariant sample distribution, use `random`
sampling or vary `init.sample` to get varying sample distributions.
- **Note 4**: If `multiTest > 1` the user will get multiple maps and
- **Note 4**: If `multiTest > 1` the user will get multiple maps and
will be asked to enter the number of the probability distribution
that is appropriate.
......@@ -401,27 +401,28 @@ Habitat sampling output. R object that contains:
### 4.1.2 Interactive probability maps and downloading output
An interactive map is plotted in a web browser (e.g., Firefox for Linux)
containing a selected habitat type. The probability threshold can be
viewed by hovering the mouse over the map.
containing a selected habitat type. The number of models predicting this
habitat type can be viewed by hovering the mouse over the map.
![](./images/inter_map_ex.png)
<img src="./images/inter_map_ex_new.png" style="width:65.0%" />
From this interactive map, the user has two choices:
1. Extract class type on the basis of a threshold if the probability
map meets the user’s evaluation
1. Extract class type on the basis of a threshold (minimum number of
models assigning a pixel to that class type) if the probability map
meets the user’s evaluation
If the user chooses to extract the class, a user defined threshold is
entered into the R console and the following files are saved:
- HabitatSampler object (Run) - R Binary: The R object is used when
- HabitatSampler object (Run) - R Binary: The R object is used when
the user wants to restart the computation at a specific step or
reuse the seeds for sampling.
- probability map - *.kml, *.png, geocoded \*.tif: Tiff contains all
- probability map - *.kml, *.png, geocoded \*.tif: Tiff contains all
classes plotted, one class, one color. See example in the
demo/Data/Results/HabitatMap\_final.pdf
- threshold list - R Binary
- leaflet interactive web interface - \*.html: LeafLet Map with the 3
- threshold list - R Binary
- leaflet interactive web interface - \*.html: LeafLet Map with the 3
RGB channels and the raster containing the probabilities. The file
is re-written for each run
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment