Mercurial > repos > ecology > srs_spectral_indices
comparison indices_spectral.xml @ 0:a8dabbf47e15 draft
planemo upload for repository https://github.com/Marie59/Sentinel_2A/srs_tools commit b32737c1642aa02cc672534e42c5cb4abe0cd3e7
author | ecology |
---|---|
date | Mon, 09 Jan 2023 13:39:08 +0000 |
parents | |
children | b40aba3d9e5c |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a8dabbf47e15 |
---|---|
1 <tool id="srs_spectral_indices" name="Compute spectral indices" version="@VERSION@" profile = "20.01"> | |
2 <description>as NDVI from remote sensing data</description> | |
3 <macros> | |
4 <import>macro.xml</import> | |
5 </macros> | |
6 <requirements> | |
7 <requirement type="package" version="4.2.2">r-base</requirement> | |
8 <requirement type="package" version="2.12.2">r-r.utils</requirement> | |
9 <requirement type="package" version="3.5_21">r-raster</requirement> | |
10 <requirement type="package" version="1.5_1">r-sp</requirement> | |
11 <requirement type="package" version="1.5_32">r-rgdal</requirement> | |
12 <requirement type="package" version="0.3.1">r-rasterdiv</requirement> | |
13 <requirement type="package" version="0.5_5">r-stars</requirement> | |
14 <requirement type="package" version="1.5.0">r-stringr</requirement> | |
15 <requirement type="package" version="2.4.2">r-pracma</requirement> | |
16 <requirement type="package" version="0.1_8">r-expint</requirement> | |
17 <requirement type="package" version="0.63.0">r-matrixstats</requirement> | |
18 <requirement type="package" version="3.4.0">r-ggplot2</requirement> | |
19 <requirement type="package" version="3.99_0.13">r-xml</requirement> | |
20 <requirement type="package" version="2.2.2">r-zip</requirement> | |
21 <requirement type="package" version="1.0.10">r-dplyr</requirement> | |
22 </requirements> | |
23 <command detect_errors="exit_code"><![CDATA[ | |
24 #import re | |
25 #if $method.type == 'envi_bil': | |
26 #set input_raster = $method.input_raster | |
27 #set input_raster_identifier = re.sub('[^\s\w\-]', '_', str($input_raster.element_identifier)) | |
28 #set input_header = $method.input_header | |
29 #set input_header_identifier = re.sub('[^\s\w\-]+[^.hdr]', '_', str($input_header.element_identifier)) | |
30 cp '${input_raster}' '${input_raster_identifier}' && | |
31 cp '${input_header}' '${input_header_identifier}' && | |
32 #end if | |
33 Rscript | |
34 '$__tool_directory__/indices_spectral.r' | |
35 #if $method.type == 'envi_bil': | |
36 '$input_raster_identifier' | |
37 '$input_header_identifier' | |
38 '' | |
39 #else: | |
40 '' | |
41 '' | |
42 '$method.input' | |
43 #end if | |
44 '$__tool_directory__/prosail-master/R/Lib_PROSAIL.R' | |
45 '$__tool_directory__/prosail-master/R/Lib_SpectralIndices.R' | |
46 '$__tool_directory__/prosail-master/R/Lib_PROSAIL_HybridInversion.R' | |
47 '$input_indice' | |
48 '$__tool_directory__/functions.r' | |
49 '$choice' | |
50 '$output_indices' | |
51 '$plots' | |
52 '$output_raster' | |
53 ]]> | |
54 </command> | |
55 <inputs> | |
56 <conditional name="method"> | |
57 <param name="type" type="select" label="In which format are your data ?" help="You can directly take the Reflectance output from the tool 'Preprocessing sentinel 2 data'"> | |
58 <option value="zipper">The data you are using are in a zip folder Reflectance</option> | |
59 <option value="envi_bil">You already have the files ENVI BIL</option> | |
60 </param> | |
61 <when value="zipper"> | |
62 <param name="input" type="data" format="zip" multiple="true" label="Input data"/> | |
63 </when> | |
64 <when value="envi_bil"> | |
65 <param name="input_raster" type="data" format="bil" label="Input raster"/> | |
66 <param name="input_header" type="data" format="hdr" label="Input raster header"/> | |
67 </when> | |
68 </conditional> | |
69 <param name="input_indice" type="select" label="Input the type of indice you want" multiple="true"> | |
70 <option value="ARI1">ARI1</option> | |
71 <option value="ARI2">ARI2</option> | |
72 <option value="ARVI">ARVI</option> | |
73 <option value="BAI">BAI</option> | |
74 <option value="BAIS2">BAIS2</option> | |
75 <option value="CCCI">CCCI</option> | |
76 <option value="CHL_RE">CHL RE</option> | |
77 <option value="CRI1">CRI1</option> | |
78 <option value="CRI2">CRI2</option> | |
79 <option value="EVI">EVI</option> | |
80 <option value="EVI2">EVI2</option> | |
81 <option value="GRVI1">GRVI1</option> | |
82 <option value="GNDVI">GNDVI</option> | |
83 <option value="IRECI">IRECI</option> | |
84 <option value="LAI_SAVI">LAI SAVI</option> | |
85 <option value="MCARI">MCARI</option> | |
86 <option value="mNDVI705">mNDVI705</option> | |
87 <option value="MSAVI2">MSAVI2</option> | |
88 <option value="MSI">MSI</option> | |
89 <option value="mSR705">mSR705</option> | |
90 <option value="MTCI">MTCI</option> | |
91 <option value="nBR_RAW">nBR_RAW</option> | |
92 <option value="NDI_45">NDI_45</option> | |
93 <option value="NDII">NDII</option> | |
94 <option value="NDSI">NDSI</option> | |
95 <option value="NDVI">NDVI</option> | |
96 <option value="NDVI_G">NDVI_G</option> | |
97 <option value="NDVI705">NDVI705</option> | |
98 <option value="NDWI">NDWI</option> | |
99 <option value="NDWI1">NDWI1</option> | |
100 <option value="NDWI2">NDWI2</option> | |
101 <option value="PSRI">PSRI</option> | |
102 <option value="PSRI_NIR">PSRI_NIR</option> | |
103 <option value="RE_NDVI">RE_NDVI</option> | |
104 <option value="RE_NDWI">RE_NDWI</option> | |
105 <option value="S2REP">S2REP</option> | |
106 <option value="SAVI">SAVI</option> | |
107 <option value="SIPI">SIPI</option> | |
108 <option value="SR">SR</option> | |
109 <option value="CR_SWIR">CR_SWIR</option> | |
110 </param> | |
111 <param name="choice" type="select" label="Do you want the raster layer of the indice as an output ?" display="radio"> | |
112 <option value="N">No</option> | |
113 <option value="Y">Yes</option> | |
114 </param> | |
115 </inputs> | |
116 <outputs> | |
117 <data name="output_indices" from_work_dir="Spec_Index.tabular" format="tabular" label="${input_indice} tabular"/> | |
118 <collection type="list" name="plots" label="${input_indice} plot"> | |
119 <discover_datasets pattern="(?P<designation>.+)\.png" visible="false" format="png"/> | |
120 </collection> | |
121 <collection type="list" name="output_raster" label="${input_indice} raster"> | |
122 <discover_datasets pattern="(?P<designation>.+)" directory="SpectralIndices/" visible="false" recurse="true" format="bil,hdr"/> | |
123 <filter> choice == 'Y'</filter> | |
124 </collection> | |
125 </outputs> | |
126 <tests> | |
127 <test> | |
128 <param name="type" value="envi_bil"/> | |
129 <param name="input_raster" value="S2A_Subset"/> | |
130 <param name="input_header" value="S2A_Subset.hdr"/> | |
131 <param name="input_indice" value="NDVI"/> | |
132 <param name="choice" value="N"/> | |
133 <output name="output_indices"> | |
134 <assert_contents> | |
135 <has_n_columns n="4"/> | |
136 <has_n_lines n="10001"/> | |
137 <has_text_matching expression="237\.25\t13.72\d*\t3.17\d*\t0.80\d*" /> | |
138 </assert_contents> | |
139 </output> | |
140 <output_collection name="plots" type="list" count="1"/> | |
141 </test> | |
142 </tests> | |
143 <help><![CDATA[ | |
144 ========================================================================= | |
145 Computes biodiversity spectral indices from satellite remote sensing data | |
146 ========================================================================= | |
147 | |
148 | |
149 **What it does** | |
150 | |
151 This tool estimates vegetation properties (leaf and canopy) from sensor measurements. You can choose which vegetation property you want to compute. | |
152 | |
153 **Input description** | |
154 | |
155 It expects an image file as input, with a specific data format. ENVI HDR image with BIL interleave required. | |
156 The image is an ENVI raster including : | |
157 | |
158 - A binary file (which has no extension here). | |
159 | |
160 - A header file (with .hdr extension). | |
161 | |
162 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. | |
163 | |
164 In order to get such input we advise to use the tool preprocessing sentinel 2 data. If you did so you can directly enter the "Reflectance" output from this tool and thus select the otpion "The data you are using are in a zip folder Reflectance". | |
165 | |
166 ⚠️ If you do not use this Reflectance folder make sure that your data are respectively in bil and hdr format in the datatypes. | |
167 | |
168 Finally, you can choose whether or not you want to have the raster layer of your indice. | |
169 | |
170 +--------------+----------+---------------+ | |
171 | BIL | HDR |Spectral indice| | |
172 +==============+==========+===============+ | |
173 | raster stack | Metadata | NDVI | | |
174 +--------------+----------+---------------+ | |
175 | ... | ... | ... | | |
176 +--------------+----------+---------------+ | |
177 | |
178 **Output** | |
179 | |
180 - One tabular with 3 columns : longitude, latitude and the chosen indice. | |
181 | |
182 - One png plot for the vizualisation of the chosen indice. | |
183 | |
184 - Opionnnal, the raster layer in a zip file. | |
185 | |
186 **Additionnal informations** | |
187 | |
188 This tools allows you to compute one of GEO BON EBV 'Canopy Chlorophyll Content' (https://portal.geobon.org/ebv-detail?id=13). This EBV is computed by GEO BON on the Netherlands, here you can compute it on which ever Sentinel 2 data you want by chosing to calculate the indice CCI. When you chose your data you have to select a cloud cover smaller than 10% (you can selct this character directly on the different platforms wher you can download Sentinel 2 data). | |
189 | |
190 **Indices description** | |
191 | |
192 +-------------------+---------------------------------------------------------+ | |
193 | Abbreviation | Name | | |
194 +===================+=========================================================+ | |
195 | ARI |Anthocyanin reflectance index | | |
196 +-------------------+---------------------------------------------------------+ | |
197 | ARVI |Atmospherically Resistant Vegetation Index | | |
198 +-------------------+---------------------------------------------------------+ | |
199 | BAI |Burn Area Index | | |
200 +-------------------+---------------------------------------------------------+ | |
201 | BAIS2 |Burned Area Index for Sentinel 2 | | |
202 +-------------------+---------------------------------------------------------+ | |
203 | CCCI |Canopy Chlorophyll Content Index | | |
204 +-------------------+---------------------------------------------------------+ | |
205 | CHL_RE |Chlorophyll Red-Edge ? | | |
206 +-------------------+---------------------------------------------------------+ | |
207 | EVI |Enhanced Vegetation Index | | |
208 +-------------------+---------------------------------------------------------+ | |
209 | GRVI1 |Green Ratio Vegetation Index | | |
210 +-------------------+---------------------------------------------------------+ | |
211 | GNDVI |Green Normalized Difference Vegetation Index | | |
212 +-------------------+---------------------------------------------------------+ | |
213 | IRECI |Inverted Red-Edge Chlorophyll Index | | |
214 +-------------------+---------------------------------------------------------+ | |
215 | LAI SAVI |Leaf Area Index Soil Adjusted Vegetation Index ? | | |
216 +-------------------+---------------------------------------------------------+ | |
217 | MCARI |Modified Chlorophyll Absorption in Reflectance Index | | |
218 +-------------------+---------------------------------------------------------+ | |
219 | mNDVI705 |Modified NDVI 705 | | |
220 +-------------------+---------------------------------------------------------+ | |
221 | MSAVI2 |Modified Soil Adjusted Vegetation Index 2 | | |
222 +-------------------+---------------------------------------------------------+ | |
223 | MSI |Moisture Stress Index | | |
224 +-------------------+---------------------------------------------------------+ | |
225 | mSR705 |Modified Simple Ratio 705 | | |
226 +-------------------+---------------------------------------------------------+ | |
227 | MTCI |MERIS Terrestrial Chlorophyll Index | | |
228 +-------------------+---------------------------------------------------------+ | |
229 | NBR_RAW |Normalized Burn Ratio RAW | | |
230 +-------------------+---------------------------------------------------------+ | |
231 | NDI_45 | | | |
232 +-------------------+---------------------------------------------------------+ | |
233 | NDII |Normalized Difference 819/1600 NDII | | |
234 +-------------------+---------------------------------------------------------+ | |
235 | NDSI |Normalized Difference Snow Index | | |
236 +-------------------+---------------------------------------------------------+ | |
237 | NDVI |Normalized Difference Vegetation Index | | |
238 +-------------------+---------------------------------------------------------+ | |
239 | NDVI_G | | | |
240 +-------------------+---------------------------------------------------------+ | |
241 | NDVI705 |NDVI 705 | | |
242 +-------------------+---------------------------------------------------------+ | |
243 | NDWI |Normalized Difference Water Index | | |
244 +-------------------+---------------------------------------------------------+ | |
245 | NDWI1 |NDMI ? Normalized Difference Moisture Index ? | | |
246 +-------------------+---------------------------------------------------------+ | |
247 | NDWI2 | | | |
248 +-------------------+---------------------------------------------------------+ | |
249 | PSRI |Plant Senescing Reflectance Index | | |
250 +-------------------+---------------------------------------------------------+ | |
251 | PSRI_NIR | | | |
252 +-------------------+---------------------------------------------------------+ | |
253 | RE_NDVI |Red Edge NDVI ? | | |
254 +-------------------+---------------------------------------------------------+ | |
255 | RE_NDWI |Red Edge NDWI | | |
256 +-------------------+---------------------------------------------------------+ | |
257 | S2REP |Sentinel 2 Red-Edge Position | | |
258 +-------------------+---------------------------------------------------------+ | |
259 | SAVI |Soil Adjusted Vegetation Index | | |
260 +-------------------+---------------------------------------------------------+ | |
261 | SIPI |Structure Intensive Pigment Index 1 | | |
262 +-------------------+---------------------------------------------------------+ | |
263 | SR |Simple Ratio ? | | |
264 +-------------------+---------------------------------------------------------+ | |
265 | CR_SWIR |CR short wave infrared | | |
266 +-------------------+---------------------------------------------------------+ | |
267 | |
268 ]]> </help> | |
269 <expand macro="SRS_prosailref"/> | |
270 </tool> |