comparison gdalwarp.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="gdalwarp" name="GDAL Warp" version="0.1.0">
2 <description>image reprojection and warping utility</description>
3 <requirements>
4 <requirement type="package" version="2.1.0">gdal</requirement>
5 <requirement type="package" version="3.5.0">geos</requirement>
6 <requirement type="package" version="9b">jpeg</requirement>
7 <requirement type="package" version="1.5.90">libjpeg-turbo</requirement>
8 </requirements>
9 <command detect_errors="exit_code"><![CDATA[
10 gdalwarp
11 -q
12 #for $i, $s in enumerate( $series )
13 '${s.input}'
14 #end for
15
16 #unless $of==''
17 -of '$of'
18 #end unless
19
20 #unless $s_srs==''
21 -s_srs '$s_srs'
22 #end unless
23
24 #unless $t_srs==''
25 -t_srs '$t_srs'
26 #end unless
27
28 #if $settings.advanced=="advanced"
29
30 #if $settings.condi_tr.tr=='tr'
31 -tr $settings.condi_tr.xres $settings.condi_tr.yres
32 #end if
33
34 #unless $settings.to=='NAME=VALUE'
35 -to '$settings.to'
36 #end unless
37
38 #unless $settings.wo=='NAME=VALUE'
39 -wo '$settings.wo'
40 #end unless
41
42 #unless $settings.order=='no_value'
43 -order '$settings.order'
44 #end unless
45
46 #if $settings.condi_resample.resample=='resampling'
47 -r $settings.condi_resample.r
48 #end if
49
50 #if $settings.condi_et.et=='et'
51 -et $settings.condi_et.et
52 #end if
53
54 #if $settings.condi_refine_gcps.refine_gcps=='refine_gcps'
55 -refine_gcps $settings.condi_refine_gcps.tolerance $settings.condi_refine_gcps.minimum_gcps
56 #end if
57
58 #if $settings.condi_te.te=='te'
59 -te $settings.condi_te.xmin $settings.condi_te.ymin $settings.condi_te.xmax $settings.condi_te.ymax
60 #end if
61
62 $settings.tps
63 $settings.rpc
64 $settings.geoloc
65
66 #unless $settings.srcnodata==''
67 -srcnodata '$settings.srcnodata'
68 #end unless
69
70 $settings.dstalpha
71 #end if
72
73 '$output'
74
75 ]]></command>
76
77 <inputs>
78 <repeat name="series" title="Input file">
79 <param type="data" name="input" format="data" label="Gdal supported input file" help="http://www.gdal.org/formats_list.html"/>
80 </repeat>
81
82 <param name="of" type="text" label="Output format -of" value="" help="Select the output format. The default is GeoTIFF (GTiff). Use the short format name. http://www.gdal.org/formats_list.html"/>
83 <param name="s_srs" type="text" label="-s_srs Source spatial reference set" value="" help="The coordinate systems that can be passed are anything supported by the OGRSpatialReference."/>
84 <param name="t_srs" type="text" label="-t_srs Target spatial reference set" value="" help="The coordinate systems that can be passed are anything supported by the OGRSpatialReference."/>
85
86 <conditional name="settings">
87 <param name="advanced" type="select" label="Specify advanced parameters">
88 <option value="simple" selected="true">No, use program defaults.</option>
89 <option value="advanced">Yes, see full parameter list.</option>
90 </param>
91 <when value="simple">
92 </when>
93 <when value="advanced">
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
108 <param name="to" type="text" label="-to" value="NAME=VALUE"/>
109 <param name="wo" type="text" label="-wo" value="NAME=VALUE" />
110 <param name="order" type="select" label="-order n">
111 <option value="no_value" selected="true">Select an order.</option>
112 <option value="1">1</option>
113 <option value="2">2</option>
114 <option value="3">3</option>
115 </param>
116 <param name="tps" type="boolean" label="-tps" truevalue="-tps" falsevalue="" checked="false"/>
117 <param name="rpc" type="boolean" label="-rpc" truevalue="-rpc" falsevalue="" checked="false"/>
118 <param name="geoloc" type="boolean" label="-geoloc" truevalue="-geoloc" falsevalue="" checked="false"/>
119 <param name="srcnodata" type="text" label="-srcnodata value" value=""/>
120 <param name="dstalpha" type="boolean" label="-dstalpha" truevalue="-dstalpha" falsevalue="" checked="false"/>
121
122 <conditional name="condi_et">
123 <param name="et" label="-et" type="boolean" truevalue="et" falsevalue="no_et" checked="false"/>
124 <when value="no_et">
125 </when>
126 <when value="et">
127 <param name="et" type="float" label="-et error threshold" value=""/>
128 </when>
129 </conditional>
130
131 <conditional name="condi_refine_gcps">
132 <param name="refine_gcps" type="select" label="-refine_gcps">
133 <option value="no_refine_gcps" selected="true">Don't use the -refine_gcps option</option>
134 <option value="refine_gcps">Use the -refine_gcps option</option>
135 </param>
136 <when value="no_refine_gcps">
137 </when>
138 <when value="refine_gcps">
139 <param name="tolerance" type="float" label="tolerance" value="0"/>
140 <param name="minimum_gcps" type="float" label="minimum_gcps" value="0"/>
141 </when>
142 </conditional>
143
144 <conditional name="condi_resample">
145 <param name="resample" label="-r" type="boolean" truevalue="resampling" falsevalue="no_resampling" checked="false"/>
146 <when value="resampling">
147 <param name="r" type="select" label="Reseampling algorithm" >
148 <option value="nearest" selected="true"/>
149 <option value="bilinear"/>
150 <option value="cubic"/>
151 <option value="cubicspline"/>
152 <option value="lanczos"/>
153 <option value="average"/>
154 <option value="mode"/>
155 <option value="max"/>
156 <option value="min"/>
157 <option value="med">Median resampling</option>
158 <option value="q1">First quartile resampling</option>
159 <option value="q2">Third quartile resampling</option>
160 </param>
161 </when>
162 <when value="no_resampling">
163 </when>
164 </conditional>
165
166 <conditional name="condi_te">
167 <param name="te" type="select" label="-te">
168 <option value="no_te" selected="true">Don't use the -te option</option>
169 <option value="te">Use the -te option</option>
170 </param>
171 <when value="no_te">
172 </when>
173 <when value="te">
174 <param name="xmin" type="float" label="xmin" value="0"/>
175 <param name="ymin" type="float" label="ymin" value="0"/>
176 <param name="xmax" type="float" label="xmax" value="0"/>
177 <param name="ymax" type="float" label="ymax" value="0"/>
178 </when>
179 </conditional>
180
181 </when>
182 </conditional>
183
184 </inputs>
185
186 <outputs>
187 <data name="output" auto_format="true" label="${on_string}.${of}"/>
188 </outputs>
189
190 <tests>
191 <test>
192 <param name="input" value="stere.tif"/>
193 <param name="of" value="Gtiff" />
194 <param name="t_srs" value="EPSG:2154" />
195 <param name="advanced" value="simple"/>
196 <output name="output" file="stere_warp1.tiff"/>
197 </test>
198
199 <test>
200 <param name="input" value="geoworld.tif"/>
201 <param name="t_srs" value="+proj=ortho +datum=WGS84" />
202 <param name="advanced" value="simple"/>
203 <output name="output" file="ortho1.tif"/>
204 </test>
205
206 <test>
207 <param name="input" value="geoworld.tif"/>
208 <param name="t_srs" value="+proj=ortho +datum=WGS84" />
209 <param name="advanced" value="advanced"/>
210 <param name="wo" value="SOURCE_EXTRA=125"/>
211 <output name="output" file="ortho2.tif"/>
212 </test>
213
214 <test>
215 <param name="input" value="geoworld.tif"/>
216 <param name="t_srs" value="+proj=ortho +datum=WGS84" />
217 <param name="advanced" value="advanced"/>
218 <param name="wo" value="SOURCE_EXTRA=125"/>
219 <param name="dstalpha" value="-dstalpha"/>
220 <param name="srcnodata" value="11 10 50"/>
221 <output name="output" file="ortho3.tif"/>
222 </test>
223
224 <test>
225 <param name="input" value="west.dem"/>
226 <param name="input" value="east.dem"/>
227 <param name="advanced" value="simple"/>
228 <output name="output" file="warpmerged.tif"/>
229 </test>
230
231 </tests>
232 <help><![CDATA[
233 ==========================
234 Gdalwarp
235 ==========================
236 **What it does**
237
238 The gdalwarp utility is an image mosaicing, reprojection and warping utility. The program can reproject to any supported projection, and can also apply GCPs stored with the image if the image is "raw" with control information.
239
240 |
241
242 **How to use it**
243
244 Add as much input files you want to warp.
245
246 Specifiy output format using short name (http://www.gdal.org/formats_list.html).
247
248 Specify source and target spatial reference set.
249
250 |
251
252 **Other options, advanced usage**
253
254 *-to NAME=VALUE*
255
256 set a transformer option suitable to pass to GDALCreateGenImgProjTransformer2().
257
258 |
259
260 *-order n*
261
262 order of polynomial used for warping (1 to 3). The default is to select a polynomial order based on the number of GCPs.
263
264 |
265
266 *-tps*
267
268 Force use of thin plate spline transformer based on available GCPs.
269
270 |
271
272 *-rpc*
273
274 Force use of RPCs.
275
276 |
277
278 *-geoloc*
279
280 Force use of Geolocation Arrays.
281
282 |
283
284 *-et err_threshold*
285
286 error threshold for transformation approximation (in pixel units - defaults to 0.125, unless, starting with GDAL 2.1, the RPC_DEM warping option is specified, in which case, an exact transformer, i.e. err_threshold=0, will be used).
287
288 |
289
290 *-refine_gcps tolerance minimum_gcps*
291
292 refines the GCPs by automatically eliminating outliers. Outliers will be eliminated until minimum_gcps are left or when no outliers can be detected. The tolerance is passed to adjust when a GCP will be eliminated. Not that GCP refinement only works with polynomial interpolation. The tolerance is in pixel units if no projection is available, otherwise it is in SRS units. If minimum_gcps is not provided, the minimum GCPs according to the polynomial model is used.
293
294 |
295
296 *-te xmin ymin xmax ymax*
297
298 set georeferenced extents of output file to be created (in target SRS by default, or in the SRS specified with -te_srs)
299
300 |
301
302 *-tr xres yres*
303
304 set output file resolution (in target georeferenced units)
305
306 |
307
308 *-wo "NAME=VALUE"*
309
310 Set a warp option. The GDALWarpOptions**papszWarpOptions docs show all options. Multiple -wo options may be listed.
311
312 |
313
314 *-r resampling_method*
315
316 Resampling method to use. Available methods are
317
318 *near*
319
320 nearest neighbour resampling (default, fastest algorithm, worst interpolation quality).
321
322 *bilinear*
323
324 bilinear resampling.
325
326 *cubic*
327
328 cubic resampling.
329
330 *cubicspline*
331
332 cubic spline resampling.
333
334 *lanczos*
335
336 Lanczos windowed sinc resampling.
337
338 *average*
339
340 average resampling, computes the average of all non-NODATA contributing pixels.
341
342 *mode*
343
344 mode resampling, selects the value which appears most often of all the sampled points.
345
346 *max*
347
348 maximum resampling, selects the maximum value from all non-NODATA contributing pixels.
349
350 *min*
351
352 minimum resampling, selects the minimum value from all non-NODATA contributing pixels.
353
354 *med*
355
356 median resampling, selects the median value of all non-NODATA contributing pixels.
357
358 *q1*
359
360 first quartile resampling, selects the first quartile value of all non-NODATA contributing pixels.
361
362 *q3*
363
364 third quartile resampling, selects the third quartile value of all non-NODATA contributing pixels.
365
366 |
367
368 *-srcnodata value [value...]*
369
370 Set nodata masking values for input bands (different values can be supplied for each band). If more than one value is supplied all values should be quoted to keep them together as a single operating system argument. Masked values will not be used in interpolation. Use a value of None to ignore intrinsic nodata settings on the source dataset.
371
372 |
373
374 *-dstalpha*
375
376 Create an output alpha band to identify nodata (unset/transparent) pixels.
377
378 |
379
380 **Sources**
381
382 http://www.gdal.org
383
384 http://www.gdal.org/gdalwarp.html
385
386 Raster Processing Tutorial : https://trac.osgeo.org/gdal/wiki/UserDocs/RasterProcTutorial
387 ]]></help>
388 </tool>