1gdalbuildvrt(1)             General Commands Manual            gdalbuildvrt(1)
2
3
4

NAME

6       gdalbuildvrtBuilds a VRT from a list of datasets.
7

SYNOPSIS

9       gdalbuildvrt [-tileindex field_name]
10                    [-resolution {highest|lowest|average|user}]
11                    [-te xmin ymin xmax ymax] [-tr xres yres] [-tap]
12                    [-separate] [-b band]* [-sd subdataset]
13                    [-allow_projection_difference] [-q]
14                    [-optim {[AUTO]/VECTOR/RASTER}]
15                    [-addalpha] [-hidenodata]
16                    [-srcnodata "value [value...]"] [-vrtnodata "value [value...]"]
17                    [-a_srs srs_def]
18                    [-r {nearest,bilinear,cubic,cubicspline,lanczos,average,mode}]
19                    [-oo NAME=VALUE]*
20                    [-input_file_list my_list.txt] [-overwrite] output.vrt [gdalfile]*
21

DESCRIPTION

23       This program builds a VRT (Virtual Dataset) that is a mosaic of the
24       list of input GDAL datasets. The list of input GDAL datasets can be
25       specified at the end of the command line, or put in a text file (one
26       filename per line) for very long lists, or it can be a MapServer
27       tileindex (see gdaltindex utility). In the later case, all entries in
28       the tile index will be added to the VRT.
29
30       With -separate, each files goes into a separate band in the VRT band.
31       Otherwise, the files are considered as tiles of a larger mosaic and the
32       VRT file has as many bands as one of the input files.
33
34       If one GDAL dataset is made of several subdatasets and has 0 raster
35       bands, all the subdatasets will be added to the VRT rather than the
36       dataset itself.
37
38       gdalbuildvrt does some amount of checks to assure that all files that
39       will be put in the resulting VRT have similar characteristics : number
40       of bands, projection, color interpretation... If not, files that do not
41       match the common characteristics will be skipped. (This is only true in
42       the default mode, and not when using the -separate option)
43
44       If there is some amount of spatial overlapping between files, the order
45       of files appearing in the list of source matter: files that are listed
46       at the end are the ones from which the content will be fetched. Note
47       that nodata will be taken into account to potentially fetch data from
48       less prioritary datasets, but currently, alpha channel is not taken
49       into account to do alpha compositing (so a source with alpha=0
50       appearing on top of another source will override is content). This
51       might be changed in later versions.
52
53       This utility is somehow equivalent to the gdal_vrtmerge.py utility and
54       is build by default in GDAL 1.6.1.
55
56       -tileindex:
57           Use the specified value as the tile index field, instead of the
58           default value with is 'location'.
59
60       -resolution {highest|lowest|average|user}:
61           In case the resolution of all input files is not the same, the
62           -resolution flag enables the user to control the way the output
63           resolution is computed. 'average' is the default. 'highest' will
64           pick the smallest values of pixel dimensions within the set of
65           source rasters. 'lowest' will pick the largest values of pixel
66           dimensions within the set of source rasters. 'average' will compute
67           an average of pixel dimensions within the set of source rasters.
68           'user' is new in GDAL 1.7.0 and must be used in combination with
69           the -tr option to specify the target resolution.
70
71       -tr xres yres :
72           (starting with GDAL 1.7.0) set target resolution. The values must
73           be expressed in georeferenced units. Both must be positive values.
74           Specifying those values is of course incompatible with
75           highest|lowest|average values for -resolution option.
76
77       -tap:
78           (GDAL >= 1.8.0) (target aligned pixels) align the coordinates of
79           the extent of the output file to the values of the -tr, such that
80           the aligned extent includes the minimum extent.
81
82       -te xmin ymin xmax ymax :
83           (starting with GDAL 1.7.0) set georeferenced extents of VRT file.
84           The values must be expressed in georeferenced units. If not
85           specified, the extent of the VRT is the minimum bounding box of the
86           set of source rasters.
87
88       -addalpha:
89           (starting with GDAL 1.7.0) Adds an alpha mask band to the VRT when
90           the source raster have none. Mainly useful for RGB sources (or
91           grey-level sources). The alpha band is filled on-the-fly with the
92           value 0 in areas without any source raster, and with value 255 in
93           areas with source raster. The effect is that a RGBA viewer will
94           render the areas without source rasters as transparent and areas
95           with source rasters as opaque. This option is not compatible with
96           -separate.
97
98       -hidenodata:
99           (starting with GDAL 1.7.0) Even if any band contains nodata value,
100           giving this option makes the VRT band not report the NoData. Useful
101           when you want to control the background color of the dataset. By
102           using along with the -addalpha option, you can prepare a dataset
103           which doesn't report nodata value but is transparent in areas with
104           no data.
105
106       -srcnodata value [value...]:
107           (starting with GDAL 1.7.0) Set nodata values for input bands
108           (different values can be supplied for each band). If more than one
109           value is supplied all values should be quoted to keep them together
110           as a single operating system argument. If the option is not
111           specified, the intrinsic nodata settings on the source datasets
112           will be used (if they exist). The value set by this option is
113           written in the NODATA element of each ComplexSource element. Use a
114           value of None to ignore intrinsic nodata settings on the source
115           datasets.
116
117       -b band:
118           (GDAL >= 1.10.0) Select an input band to be processed. Bands are
119           numbered from 1. If input bands not set all bands will be added to
120           vrt. Multiple -b switches may be used to select a set of input
121           bands.
122
123       -sd subdataset
124           (GDAL >= 1.10.0) If the input dataset contains several subdatasets
125           use a subdataset with the specified number (starting from 1). This
126           is an alternative of giving the full subdataset name as an input.
127
128       -vrtnodata value [value...]:
129           (starting with GDAL 1.7.0) Set nodata values at the VRT band level
130           (different values can be supplied for each band). If more than one
131           value is supplied all values should be quoted to keep them together
132           as a single operating system argument. If the option is not
133           specified, intrinsic nodata settings on the first dataset will be
134           used (if they exist). The value set by this option is written in
135           the NoDataValue element of each VRTRasterBand element. Use a value
136           of None to ignore intrinsic nodata settings on the source datasets.
137
138       -separate:
139           (starting with GDAL 1.7.0) Place each input file into a separate
140           band. In that case, only the first band of each dataset will be
141           placed into a new band. Contrary to the default mode, it is not
142           required that all bands have the same datatype.
143
144       -allow_projection_difference:
145           (starting with GDAL 1.7.0) When this option is specified, the
146           utility will accept to make a VRT even if the input datasets have
147           not the same projection. Note: this does not mean that they will be
148           reprojected. Their projection will just be ignored.
149
150       -optim {[AUTO]/VECTOR/RASTER}}:
151           (starting with GDAL 2.3) Force the algorithm used (results are
152           identical). The raster mode is used in most cases and optimise
153           read/write operations. The vector mode is useful with a decent
154           amount of input features and optimise the CPU use. That mode have
155           to be used with tiled images to be efficient. The auto mode (the
156           default) will chose the algorithm based on input and output
157           properties.
158
159       -a_srs srs_def:
160           (starting with GDAL 1.10) Override the projection for the output
161           file. The srs_def may be any of the usual GDAL/OGR forms, complete
162           WKT, PROJ.4, EPSG:n or a file containing the WKT. No reprojection
163           is done.
164
165       -r {nearest (default),bilinear,cubic,cubicspline,lanczos,average,mode}:
166           (GDAL >= 2.0) Select a resampling algorithm.
167
168       -oo NAME=VALUE:
169           (starting with GDAL 2.2) Dataset open option (format specific)
170
171       -input_file_list:
172           To specify a text file with an input filename on each line
173
174       -q:
175           (starting with GDAL 1.7.0) To disable the progress bar on the
176           console
177
178       -overwrite:
179           Overwrite the VRT if it already exists.
180

EXAMPLE

182       Make a virtual mosaic from all TIFF files contained in a directory :
183
184       gdalbuildvrt doq_index.vrt doq/*.tif
185
186
187       Make a virtual mosaic from files whose name is specified in a text file
188       :
189
190       gdalbuildvrt -input_file_list my_list.txt doq_index.vrt
191
192
193       Make a RGB virtual mosaic from 3 single-band input files :
194
195       gdalbuildvrt -separate rgb.vrt red.tif green.tif blue.tif
196
197
198       Make a virtual mosaic with blue background colour (RGB: 0 0 255) :
199
200       gdalbuildvrt -hidenodata -vrtnodata "0 0 255" doq_index.vrt doq/*.tif
201
202

AUTHOR

204       Even Rouault even.rouault@mines-paris.org
205
206
207
208GDAL                            Mon Feb 11 2019                gdalbuildvrt(1)
Impressum