Map validation

From AWF-Wiki
(Difference between revisions)
Jump to: navigation, search
(QGIS Processing toolbox with OTB plugin)
 
(25 intermediate revisions by one user not shown)
Line 1: Line 1:
=== Orfeo Toolbox === <!--ComputeConfusionMatrix-->
+
= QGIS Processing toolbox with OTB plugin =
The Orfeo Toolbox provides two opportunities for the data format of the reference data: '''raster''' and '''shape'''.
+
# Type into the search box of Processing tools {{typed|text=Confusion}} and double click '''ComputeConfusionMatrix'''.
# Open {{mitem|text=Toolbox --> Orfeo --> Learning --> ComputeConfusionMatrix (vector)}} or {{mitem|text=ComputeConfusionMatrix (raster)}} depending on your reference data.
+
 
# Set the classified map as {{button|text=Input image}}.
 
# Set the classified map as {{button|text=Input image}}.
# Set the training data as {{button|text=Input reference data}}.
+
# Select the output file name with the extension '''.csv''' under {{button|text=Matrix output}}.
# In case of the {{mitem|text=ComputeConfusionMatrix (vector)}} tool, it is also possible to adjust the {{button|text=Field name}}, which includes the class information of the reference data.
+
# The validation data can be in vector or raster format. Select as Ground truth {{button|text=vector}}.
# Save the output file under {{button|text=Matrix output}}.
+
# Set the validation file '''clip_regular_points.shp''' as {{button|text=Input reference vector data}}.
 +
# Set the Field name with the class code '''Code'''.
 +
# Click {{button|text=Run}}.
 +
# Open the CSV output file with Libre Office Calc or MS Excel. Calculate User accuracies, Producer accuracies, Overall accuracy and F-Scores.
 +
[[File:qgis_otb_confusionMatrix.png|400px]]
  
 +
= Accuracy assessment and area estimation with R =
 +
FAO implemented a map validation and stratified area estimation tool based on R, Rstudio and the Shiny package.
 +
The method is based on Olofsson et al. [http://dx.doi.org/10.1016/j.rse.2012.10.031 2013], [http://dx.doi.org/10.1016/j.rse.2014.02.015 2014])
 +
If not already installed on your laptop: [http://wiki.awf.forst.uni-goettingen.de/wiki/index.php/R_installation install R], [http://www.rstudio.org RStudio] and [https://cran.r-project.org/bin/windows/Rtools/ Rtools].
 +
Start Rstudio and type into the console:
 +
<pre>
 +
install.packages("shiny", dependencies = TRUE)
 +
</pre>
 +
==Create validation sample points with a stratified random sampling design==
 +
Start Rstudio and type:
 +
<pre>
 +
library(shiny)
 +
options(shiny.launch.browser = TRUE)
 +
runGitHub("openforis/accuracy-assessment",subdir="aa_design")
 +
</pre>
  
 +
==Area estimation==
 +
Start Rstudio and type:
 +
<pre>
 +
library(shiny)
 +
options(shiny.launch.browser = TRUE)
 +
runGitHub("openforis/accuracy-assessment",subdir="aa_analysis")
 +
</pre>
 
[[Category:QGIS Tutorial]]
 
[[Category:QGIS Tutorial]]

Latest revision as of 19:02, 28 June 2020

Contents

[edit] QGIS Processing toolbox with OTB plugin

  1. Type into the search box of Processing tools Confusion and double click ComputeConfusionMatrix.
  2. Set the classified map as Input image.
  3. Select the output file name with the extension .csv under Matrix output.
  4. The validation data can be in vector or raster format. Select as Ground truth vector.
  5. Set the validation file clip_regular_points.shp as Input reference vector data.
  6. Set the Field name with the class code Code.
  7. Click Run.
  8. Open the CSV output file with Libre Office Calc or MS Excel. Calculate User accuracies, Producer accuracies, Overall accuracy and F-Scores.

Qgis otb confusionMatrix.png

[edit] Accuracy assessment and area estimation with R

FAO implemented a map validation and stratified area estimation tool based on R, Rstudio and the Shiny package. The method is based on Olofsson et al. 2013, 2014) If not already installed on your laptop: install R, RStudio and Rtools. Start Rstudio and type into the console:

install.packages("shiny", dependencies = TRUE)

[edit] Create validation sample points with a stratified random sampling design

Start Rstudio and type:

library(shiny)
options(shiny.launch.browser = TRUE)
runGitHub("openforis/accuracy-assessment",subdir="aa_design")

[edit] Area estimation

Start Rstudio and type:

library(shiny)
options(shiny.launch.browser = TRUE)
runGitHub("openforis/accuracy-assessment",subdir="aa_analysis")
Personal tools
Namespaces

Variants
Actions
Navigation
Development
Toolbox
Print/export