Mercurial > repos > ecology > srs_process_data
comparison comparison_div.xml @ 0:cf69ad260611 draft default tip
planemo upload for repository https://github.com/Marie59/Sentinel_2A/srs_tools commit b32737c1642aa02cc672534e42c5cb4abe0cd3e7
| author | ecology |
|---|---|
| date | Mon, 09 Jan 2023 13:36:02 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:cf69ad260611 |
|---|---|
| 1 <tool id="srs_process_data" name="Compare diversity indicators" version="@VERSION@" profile="20.01"> | |
| 2 <description>with remote sensing data</description> | |
| 3 <macros> | |
| 4 <import>macro.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="SRS_requirements"/> | |
| 7 <command detect_errors="exit_code"><![CDATA[ | |
| 8 #import re | |
| 9 #if $method.type == 'envi_bil': | |
| 10 #set input_raster = $method.input_raster | |
| 11 #set input_raster_identifier = re.sub('[^\s\w\-]', '_', str($input_raster.element_identifier)) | |
| 12 #set input_header = $method.input_header | |
| 13 #set input_header_identifier = re.sub('[^\s\w\-]+[^.hdr]', '_', str($input_header.element_identifier)) | |
| 14 cp '${input_raster}' '${input_raster_identifier}' && | |
| 15 cp '${input_header}' '${input_header_identifier}' && | |
| 16 #end if | |
| 17 Rscript | |
| 18 '$__tool_directory__/comparison_div.r' | |
| 19 #if $method.type == 'envi_bil': | |
| 20 '$input_raster_identifier' | |
| 21 '$input_header_identifier' | |
| 22 '' | |
| 23 #else: | |
| 24 '' | |
| 25 '' | |
| 26 '$method.input' | |
| 27 #end if | |
| 28 '$input_plot' | |
| 29 '$choice' | |
| 30 '$__tool_directory__/functions.r' | |
| 31 '$typepca' | |
| 32 '$output_div' | |
| 33 '$output_beta' | |
| 34 '$plots' | |
| 35 ]]> | |
| 36 </command> | |
| 37 <inputs> | |
| 38 <conditional name="method"> | |
| 39 <param name="type" type="select" label="In which format are your data ?"> | |
| 40 <option value="zipper">The data you are using are in a zip folder Reflectance</option> | |
| 41 <option value="envi_bil">Your already have the files in ENVI BIL format</option> | |
| 42 </param> | |
| 43 <when value="zipper"> | |
| 44 <param name="input" type="data" format="zip" multiple="true" label="Input data"/> | |
| 45 </when> | |
| 46 <when value="envi_bil"> | |
| 47 <param name="input_raster" type="data" format="bil" label="Input raster" help="It can be the raw data in bil or the PCA raster layer in bil"/> | |
| 48 <param name="input_header" type="data" format="hdr" label="Input header"/> | |
| 49 </when> | |
| 50 </conditional> | |
| 51 <param name="input_plot" type="data" format="data" label="Plots folder zip"/> | |
| 52 <param name="choice" type="select" label="Do you want to compute beta diversity (needs mutliple locations) ?" display="radio"> | |
| 53 <option value="Y">Yes</option> | |
| 54 <option value="N">No</option> | |
| 55 </param> | |
| 56 <param name="typepca" type="select" label="Do you want to do a PCA or a SPCA ?" display="radio" help="If you choose PCA there is no rescaling of the data as oppposed as if you choose SPCA"> | |
| 57 <option value="SPCA">SPCA</option> | |
| 58 <option value="PCA">PCA</option> | |
| 59 </param> | |
| 60 </inputs> | |
| 61 <outputs> | |
| 62 <data name="output_div" from_work_dir="Diversity.tabular" format="tabular" label="Global diversity"> | |
| 63 </data> | |
| 64 <data name="output_beta" from_work_dir="BrayCurtis.tabular" format="tabular" label="Bray Curtis"> | |
| 65 <filter>choice == 'Y'</filter> | |
| 66 </data> | |
| 67 <collection type="list" name="plots" label="Comparison plot"> | |
| 68 <discover_datasets pattern="(?P<designation>.+)\.png" visible="false" format="png"/> | |
| 69 <filter>choice =='Y'</filter> | |
| 70 </collection> | |
| 71 </outputs> | |
| 72 <tests> | |
| 73 <test> | |
| 74 <param name="type" value="envi_bil"/> | |
| 75 <param name="input_raster" value="S2A_Subset"/> | |
| 76 <param name="input_header" value="S2A_Subset.hdr"/> | |
| 77 <param name="input_plot" value="S2A_T33NUD_Plots.zip"/> | |
| 78 <param name="choice" value="Y"/> | |
| 79 <output name="output_div"> | |
| 80 <assert_contents> | |
| 81 <has_n_lines n="25"/> | |
| 82 </assert_contents> | |
| 83 </output> | |
| 84 <output name="output_beta"> | |
| 85 <assert_contents> | |
| 86 <has_n_lines n="25"/> | |
| 87 </assert_contents> | |
| 88 </output> | |
| 89 <output_collection name="plots" type="list" count="1"/> | |
| 90 </test> | |
| 91 </tests> | |
| 92 <help><![CDATA[ | |
| 93 ======================================================================== | |
| 94 Process satellite remote sensing data to produce biodiversity indicators | |
| 95 ======================================================================== | |
| 96 | |
| 97 | |
| 98 **What it does** | |
| 99 | |
| 100 Féret and Asner (2014) developed a method for **tropical forest** diversity mapping based on very high spatial resolution airborne imaging spectroscopy. | |
| 101 | |
| 102 The goal of this tool using the package biodivMapR is to compute diversity indices over each spatial polygon of a shapefile of plots, if available, in order to compare field inventories with diversity indices estimated from remotely-sensed images. | |
| 103 | |
| 104 **Input description** | |
| 105 | |
| 106 It expects an image file as input, with a specific data format. ENVI HDR image with BIL interleave required. | |
| 107 The image is an ENVI raster including : | |
| 108 | |
| 109 - A binary file (which has no extension here). | |
| 110 | |
| 111 - A header file (with .hdr extension). | |
| 112 | |
| 113 The header file is a text file including all necessary metadata which can be read with a text editor. It includes image dimensions, projection, and the name and central wavelength for each spectral band. | |
| 114 | |
| 115 In order to get such input we advise to use the tool preprocessing sentinel 2 data. | |
| 116 | |
| 117 +--------------+----------+--------------+ | |
| 118 | BIL | ENVI HDR | Shapefiles | | |
| 119 +==============+==========+==============+ | |
| 120 | raster stack | Metadata | plots.zip | | |
| 121 +--------------+----------+--------------+ | |
| 122 | ... | ... | ... | | |
| 123 +--------------+----------+--------------+ | |
| 124 | |
| 125 **Output** | |
| 126 | |
| 127 - Two tabulars : | |
| 128 - One matrix for Bray-Curtis indicator | |
| 129 - One table for the following indicators; Species richness, shannon, fisher, simpson, richness, eveness, divergence | |
| 130 | |
| 131 - One comparison png plot in the Pcoa space that summarizes α- and β-diversity in scatterplots and illustrates that the combination of the three components computed with PCoA allows proper differentiation among vegetation types: | |
| 132 - PCoA#1 allows differentiating medium and high diversity forests from low diversity forest and low vegetation, but does not discriminate medium and high diversity forests. | |
| 133 - PCoA#2 allows differentiating low diversity forest from medium/high diversity forests and low vegetation | |
| 134 - PCoA#3 allows differentiating medium diversity forests from high diversity forests and low vegetation. | |
| 135 | |
| 136 ]]> </help> | |
| 137 <expand macro="SRS_BDMRref"/> | |
| 138 </tool> |
