1GDALBUILDVRT(1)                      GDAL                      GDALBUILDVRT(1)
2
3
4

NAME

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

EXAMPLES

184       · Make a virtual mosaic from all TIFF files contained in a directory :
185
186          gdalbuildvrt doq_index.vrt doq/*.tif
187
188       · Make  a  virtual  mosaic from files whose name is specified in a text
189         file :
190
191          gdalbuildvrt -input_file_list my_list.txt doq_index.vrt
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       · Make a virtual mosaic with blue background colour (RGB: 0 0 255) :
198
199          gdalbuildvrt -hidenodata -vrtnodata "0 0 255" doq_index.vrt doq/*.tif
200

AUTHOR

202       Even Rouault <even.rouault@spatialys.com>
203
205       1998-2021
206
207
208
209
210                                 Jan 05, 2021                  GDALBUILDVRT(1)
Impressum