comparison gdalbuildvrt.xml @ 0:2241ff3e5b7c draft default tip

Uploaded
author mnhn65mo
date Thu, 02 Aug 2018 06:30:23 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:2241ff3e5b7c
1 <tool id="gdalbuildvrt" name="GDAL Build VRT" version="0.1.0">
2 <description>builds a VRT from a list of datasets</description>
3 <requirements>
4 <requirement type="package" version="2.1.0">gdal</requirement>
5 <requirement type="package" version="9b">jpeg</requirement>
6 <requirement type="package" version="1.5.90">libjpeg-turbo</requirement>
7 </requirements>
8 <command detect_errors="exit_code"><![CDATA[
9 gdalbuildvrt
10 '$output'
11 -q
12 #for $i, $s in enumerate( $series )
13 '${s.input}'
14 #end for
15
16 #if $settings.advanced=='advanced'
17 #unless $settings.b=='e.g : -b 1 -b 2 -b 3'
18 $settings.b
19 #end unless
20
21 #if $settings.condi_te.te=='te'
22 -te $settings.condi_te.xmin $settings.condi_te.ymin $settings.condi_te.xmax $settings.condi_te.ymax
23 #end if
24
25 #if $condi_tr.tr=='tr'
26 -tr $condi_tr.xres $condi_tr.yres
27 #end if
28
29 #if $settings.condi_resample.resample=='resampling'
30 -r $settings.condi_resample.r
31 #end if
32
33 #if $settings.condi_resolution.resolution=='chose_resolution'
34 -r $settings.condi_resolution.reso
35 #end if
36
37 #unless $settings.a_srs==''
38 -a_srs '$settings.a_srs'
39 #end unless
40
41 $settings.tap
42 $settings.addalpha
43 $settings.hidenodata
44 $settings.separate
45
46 #unless $settings.oo=='NAME=VALUE'
47 -oo '$settings.oo'
48 #end unless
49
50 $settings.allow_projection_difference
51
52 #unless $settings.tileindex=='field_name'
53 -tileindex '$settings.tileindex'
54 #end unless
55
56 #unless $settings.sb=='subdataset'
57 -sb '$settings.sb'
58 #end unless
59
60 #end if
61
62 ]]></command>
63 <inputs>
64 <repeat name="series" title="Input file">
65 <param type="data" name="input" format="data" label="Gdal supported input file" help="http://www.gdal.org/formats_list.html"/>
66 </repeat>
67
68 <conditional name="settings">
69 <param name="advanced" type="select" label="Specify advanced parameters">
70 <option value="simple" selected="true">No, use program defaults.</option>
71 <option value="advanced">Yes, see full parameter list.</option>
72 </param>
73 <when value="simple">
74 </when>
75 <when value="advanced">
76
77 <param name="b" type="text" label="-b band" value="e.g : -b 1 -b 2 -b 3"/>
78
79 <conditional name="condi_te">
80 <param name="te" type="select" label="-te">
81 <option value="no_te" selected="true">Don't use the -te option</option>
82 <option value="te">Use the -te option</option>
83 </param>
84 <when value="no_te">
85 </when>
86 <when value="te">
87 <param name="xmin" type="float" label="xmin" value="0"/>
88 <param name="ymin" type="float" label="ymin" value="0"/>
89 <param name="xmax" type="float" label="xmax" value="0"/>
90 <param name="ymax" type="float" label="ymax" value="0"/>
91 </when>
92 </conditional>
93
94 <conditional name="condi_tr">
95 <param name="tr" type="select" label="-tr">
96 <option value="no_tr" selected="true">Don't use the -tr option</option>
97 <option value="tr">Use the -tr option</option>
98 </param>
99 <when value="no_tr">
100 </when>
101 <when value="tr">
102 <param name="xres" type="float" label="xres" value="0"/>
103 <param name="yres" type="float" label="yres" value="0"/>
104 </when>
105 </conditional>
106
107 <conditional name="condi_resample">
108 <param label="-r" name="resample" type="boolean" truevalue="resampling" falsevalue="no_resampling" checked="false"/>
109 <when value="resampling">
110 <param name="r" type="select" label="Reseampling algorithm" >
111 <option value="nearest" selected="true"/>
112 <option value="bilinear"/>
113 <option value="cubic"/>
114 <option value="cubicspline"/>
115 <option value="lanczos"/>
116 <option value="average"/>
117 <option value="mode"/>
118 <option value="max"/>
119 <option value="min"/>
120 <option value="med">Median resampling</option>
121 <option value="q1">First quartile resampling</option>
122 <option value="q2">Third quartile resampling</option>
123 </param>
124 </when>
125 <when value="no_resampling">
126 </when>
127 </conditional>
128
129 <conditional name="condi_resolution">
130 <param label="-resolution" name="resolution" type="boolean" truevalue="chose_resolution" falsevalue="no_resolution" checked="false"/>
131 <when value="chose_resolution">
132 <param name="reso" type="select" label="Chose a resolution" >
133 <option value="highest" selected="true"/>
134 <option value="lowest"/>
135 <option value="average"/>
136 <option value="user"/>
137 </param>
138 </when>
139 <when value="no_resolution">
140 </when>
141 </conditional>
142
143 <param name="tap" type="boolean" truevalue="-tap" falsevalue="" checked="false" label="-tap"/>
144 <param name="addalpha" type="boolean" truevalue="-addalpha" falsevalue="" checked="false" label="-addalpha"/>
145 <param name="hidenodata" type="boolean" truevalue="-hidenodata" falsevalue="" checked="false" label="-hidenodata"/>
146 <param name="separate" type="boolean" truevalue="-separate" falsevalue="" checked="false" label="-separate" />
147 <param name="allow_projection_difference" type="boolean" truevalue="-allow_projection_difference" falsevalue="" checked="false" label="-allow_projection_difference" />
148 <param name="a_srs" type="text" label="-a_srs srs_def" value=""/>
149 <param name="oo" type="text" label="-oo" value="NAME=VALUE" />
150 <param name="tileindex" type="text" label="-tileindex field_name" value="field_name"/>
151 <param name="sb" type="text" label="-sb subdataset" value="subdataset"/>
152
153 </when>
154 </conditional>
155 </inputs>
156
157 <outputs>
158 <data name="output" auto_format="true" label="${on_string}.vrt"/> <!--label="${input.name}.${of}-->
159 </outputs>
160
161
162 <tests>
163 <test>
164 <param name="input" value="east.dem"/>
165 <param name="input" value="west.dem"/>
166 <param name="advanced" value="simple"/>
167 <output name="output" file="dem.vrt" lines_diff="4"/>
168 </test>
169 </tests>
170
171 <help><![CDATA[
172 ==========================
173 Gdalbuildvrt
174 ==========================
175 **What it does**
176
177 This program builds a VRT (Virtual Dataset) that is a mosaic of the list of input GDAL datasets.
178
179 If one GDAL dataset is made of several subdatasets and has 0 raster bands, all the subdatasets will be added to the VRT rather than the dataset itself.
180
181
182 gdalbuildvrt does some amount of checks to assure that all files that will be put in the resulting VRT have similar characteristics : number of bands, projection, color interpretation... If not, files that do not match the common characteristics will be skipped. (This is only true in the default mode, and not when using the -separate option)
183
184
185 If there is some amount of spatial overlapping between files, the order of files appearing in the list of source matter: files that are listed at the end are the ones from which the content will be fetched. Note that nodata will be taken into account to potentially fetch data from less prioritary datasets, but currently, alpha channel is not taken into account to do alpha compositing (so a source with alpha=0 appearing on top of another source will override is content). This might be changed in later versions.
186
187
188 This utility is somehow equivalent to the gdal_vrtmerge.py utility and is build by default in GDAL 1.6.1.
189
190 |
191
192 **How to use it**
193
194 Add as much input files you want to use to create the VRT.
195
196 |
197
198 **Other options, advanced usage**
199
200 *-tileindex*
201
202 Use the specified value as the tile index field, instead of the default value with is 'location'.
203
204 |
205
206 *-resolution {highest|lowest|average|user}*
207
208 In case the resolution of all input files is not the same, the -resolution flag enables the user to control the way the output resolution is computed. 'average' is the default. 'highest' will pick the smallest values of pixel dimensions within the set of source rasters. 'lowest' will pick the largest values of pixel dimensions within the set of source rasters. 'average' will compute an average of pixel dimensions within the set of source rasters. 'user' is new in GDAL 1.7.0 and must be used in combination with the -tr option to specify the target resolution.
209
210 |
211
212 *-tr xres yres*
213
214 (starting with GDAL 1.7.0) set target resolution. The values must be expressed in georeferenced units. Both must be positive values. Specifying those values is of course incompatible with highest|lowest|average values for -resolution option.
215
216 |
217
218 *-tap*
219
220 (target aligned pixels) align the coordinates of the extent of the output file to the values of the -tr, such that the aligned extent includes the minimum extent.
221
222 |
223
224 *-te xmin ymin xmax ymax*
225
226 (starting with GDAL 1.7.0) set georeferenced extents of VRT file. The values must be expressed in georeferenced units. If not specified, the extent of the VRT is the minimum bounding box of the set of source rasters.
227
228 |
229
230 *-addalpha*
231
232 Adds an alpha mask band to the VRT when the source raster have none. Mainly useful for RGB sources (or grey-level sources). The alpha band is filled on-the-fly with the value 0 in areas without any source raster, and with value 255 in areas with source raster. The effect is that a RGBA viewer will render the areas without source rasters as transparent and areas with source rasters as opaque. This option is not compatible with -separate.
233
234 |
235
236 *-hidenodata*
237
238 Even if any band contains nodata value, giving this option makes the VRT band not report the NoData. Useful when you want to control the background color of the dataset. By using along with the -addalpha option, you can prepare a dataset which doesn't report nodata value but is transparent in areas with no data.
239
240 |
241
242 *-b band*
243
244 Select an input band to be processed. Bands are numbered from 1. If input bands not set all bands will be added to vrt. Multiple -b switches may be used to select a set of input bands.
245
246 |
247
248 *-sd subdataset*
249
250 If the input dataset contains several subdatasets use a subdataset with the specified number (starting from 1). This is an alternative of giving the full subdataset name as an input.
251
252 |
253
254 *-separate*
255
256 Place each input file into a separate band. In that case, only the first band of each dataset will be placed into a new band. Contrary to the default mode, it is not required that all bands have the same datatype.
257
258 |
259
260 *-allow_projection_difference*
261
262 When this option is specified, the utility will accept to make a VRT even if the input datasets have not the same projection. Note: this does not mean that they will be reprojected. Their projection will just be ignored.
263
264 |
265
266 *-a_srs srs_def*
267
268 Override the projection for the output file. The srs_def may be any of the usual GDAL/OGR forms, complete WKT, PROJ.4, EPSG:n or a file containing the WKT. No reprojection is done.
269
270 |
271
272 *-r {nearest (default),bilinear,cubic,cubicspline,lanczos,average,mode}*
273
274 Select a resampling algorithm.
275
276 |
277
278 *-oo NAME=VALUE*
279
280 Dataset open option (format specific)
281
282 |
283
284 **Sources**
285
286 http://www.gdal.org
287
288 http://www.gdal.org/gdalbuildvrt.html
289
290 Raster Processing Tutorial : https://trac.osgeo.org/gdal/wiki/UserDocs/RasterProcTutorial
291 ]]></help>
292 </tool>