comparison gdal_merge.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="gdal_merge" name="GDAL Merge" version="0.1.0">
2 <description>mosaics a set of images.</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 gdal_merge.py
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 #if $settings.advanced=='advanced'
21
22 #unless $settings.co=='NAME=VALUE'
23 -co '$settings.co'
24 #end unless
25
26 #unless $settings.ot=='Datatype'
27 -ot '$settings.ot'
28 #end unless
29
30 #if $settings.condi_ps.pixelsize=='use_ps'
31 -ps $settings.condi_ps.pixelsize_x $settings.condi_ps.pixelsize_y
32 #end if
33
34 $settings.tap
35
36 #if $settings.condi_ul_lr.ul_lr=='ul_lr'
37 -ul_lr $settings.condi_ul_lr.ulx $settings.condi_ul_lr.uly $settings.condi_ul_lr.lrx $settings.condi_ul_lr.lry
38 #end if
39
40 $settings.v
41
42 $settings.separate
43
44 $settings.pct
45
46 #unless $settings.n=='nodata_value'
47 -n '$settings.n'
48 #end unless
49
50 #unless $settings.a_nodata=='output_nodata_value'
51 -a_nodata '$settings.a_nodata'
52 #end unless
53
54 #unless $settings.init=='value(s)'
55 -init '$settings.init'
56 #end unless
57
58 #end if
59
60 -o '$output'
61 ]]></command>
62
63 <inputs>
64
65 <repeat name="series" title="Input file">
66 <param type="data" name="input" format="data" label="Gdal supported input file" help="http://www.gdal.org/formats_list.html"/>
67 </repeat>
68
69 <param name="of" type="text" label="Output format" value="" help="Select the output format. The default is GeoTIFF (GTiff). Use the short format name. http://www.gdal.org/formats_list.html"/>
70
71 <conditional name="settings">
72 <param name="advanced" type="select" label="Specify advanced parameters">
73 <option value="simple" selected="true">No, use program defaults.</option>
74 <option value="advanced">Yes, see full parameter list.</option>
75 </param>
76 <when value="simple">
77 </when>
78 <when value="advanced">
79 <param name="co" type="text" label="-co" value="NAME=VALUE"/>
80
81 <param name="ot" type="text" label="-ot" value="Datatype" />
82
83 <conditional name="condi_ps">
84 <param label="-ps pixelsize_x pixelsize_y" name="pixelsize" type="boolean" truevalue="use_ps" falsevalue="no_ps" checked="false" />
85 <when value="use_ps">
86 <param name="pixelsize_x" type="integer" value="0"/>
87 <param name="pixelsize_y" type="integer" value="0"/>
88 </when>
89 <when value="no_ps">
90 </when>
91 </conditional>
92
93 <param name="tap" label="-tap" type="boolean" truevalue="-tap" falsevalue="" checked="false" />
94
95 <conditional name="condi_ul_lr">
96 <param name="ul_lr" type="select" label="-ul_lr ulx uly lrx lry" >
97 <option value="no_ul_lr" selected="true">Don't use the -ul_lr option</option>
98 <option value="ul_lr">Use the -ul_lr option</option>
99 </param>
100 <when value="no_ul_lr">
101 </when>
102 <when value="ul_lr">
103 <param name="ulx" type="integer" label="ulx" value="0"/>
104 <param name="uly" type="integer" label="uly" value="0"/>
105 <param name="lrx" type="integer" label="lrx" value="0"/>
106 <param name="lry" type="integer" label="lry" value="0"/>
107 </when>
108 </conditional>
109
110 <param name="v" type="boolean" truevalue="-v" falsevalue="" checked="false" label="-v" />
111
112 <param name="separate" type="boolean" truevalue="-separate" falsevalue="" checked="false" label="-separate" />
113
114 <param name="pct" type="boolean" truevalue="-pct" falsevalue="" checked="false" label="-pct" />
115
116 <param name="n" type="text" label="-n nodata_value" value="nodata_value" />
117
118 <param name="a_nodata" type="text" label="-a_nodata" value="output_nodata_value" />
119
120 <param name="init" type="text" label="-init" value="value(s)" />
121
122
123 </when>
124 </conditional>
125
126 </inputs>
127
128 <outputs>
129 <data name="output" auto_format="true"/> <!--label="${input.name}.${of}-->
130 </outputs>
131
132 <tests>
133
134 <test>
135 <param name="input" value="west.dem"/>
136 <param name="input" value="east.dem"/>
137 <param name="advanced" value="simple"/>
138 <output name="output" file="mergeddem.tif"/>
139 </test>
140
141 </tests>
142
143 <help><![CDATA[
144 ==========================
145 Gdal_merge
146 ==========================
147 **What it does**
148
149 This utility will automatically mosaic a set of images. All the images must be in the same coordinate system and have a matching number of bands, but they may be overlapping, and at different resolutions. In areas of overlap, the last image will be copied over earlier ones.
150
151 |
152
153 **How to use it**
154
155 Select as much raster files as you want from history to make the mosaic.
156
157 Specifiy output format using short name (http://www.gdal.org/formats_list.html).
158
159 |
160
161 **Other options, advanced usage**
162
163 *-co NAME=VALUE*
164
165 Creation option for output file. Multiple options can be specified. See format specific documentation for legal creation options for each format
166
167 |
168
169 *-ot datatype*
170
171 Force the output image bands to have a specific type. Use type names (i.e. Byte, Int16,...)
172
173 |
174
175 *-ps pixelsize_x pixelsize_y*
176
177 Pixel size to be used for the output file. If not specified the resolution of the first input file will be used.
178
179 |
180
181 *-tap*
182
183 (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.
184
185 |
186
187 *-ul_lr ulx uly lrx lry*
188
189 The extents of the output file. If not specified the aggregate extents of all input files will be used.
190
191 |
192
193 *-v*
194
195 Generate verbose output of mosaicing operations as they are done.
196
197 |
198
199 *-separate*
200
201 Place each input file into a separate band.
202
203 |
204
205 *-pct*
206
207 Grab a pseudo-color table from the first input image, and use it for the output. Merging pseudo-colored images this way assumes that all input files use the same color table.
208
209 |
210
211 *-n nodata_value*
212
213 Ignore pixels from files being merged in with this pixel value.
214
215 |
216
217 *-a_nodata output_nodata_value*
218
219 Assign a specified nodata value to output bands.
220
221 |
222
223 *-init "value(s)"*
224
225 Pre-initialize the output image bands with these values. However, it is not marked as the nodata value in the output file. If only one value is given, the same value is used in all the bands.
226
227 |
228
229 **Sources**
230
231 http://www.gdal.org
232
233 http://www.gdal.org/gdal_merge.html
234
235 Raster Processing Tutorial : https://trac.osgeo.org/gdal/wiki/UserDocs/RasterProcTutorial
236 ]]></help>
237 </tool>