![Forrest logo](/images/logo.png)
gdalbuildvrt:tldr:226c6
gdalbuildvrt: Make an RGB virtual mosaic from 3 single-band input files.
$ gdalbuildvrt -separate ${path-to-rgb-vrt} ${path-to-red-tif} ${path-to-green-tif} ${path-to-blue-tif}
try on your machine
The gdalbuildvrt -separate
command is used to build a Virtual Raster (VRT) file from separate Red, Green, and Blue (RGB) image bands. VRT is a GDAL supported format that acts as a virtual mosaic of multiple raster files.
Here is a breakdown of the command with the provided paths:
gdalbuildvrt
is the command itself, which is used to create a VRT file.-separate
is an option used to specify that the source files are separate bands of an RGB image, and they should be combined into a single VRT file as separate bands.${path-to-rgb-vrt}
is the path where the output VRT file will be saved. Replace${path-to-rgb-vrt}
with the desired path and filename of the VRT file.${path-to-red-tif}
is the path to the Red band of the RGB image in TIF format. Replace${path-to-red-tif}
with the actual path and filename of the Red band TIF file.${path-to-green-tif}
is the path to the Green band of the RGB image in TIF format. Replace${path-to-green-tif}
with the actual path and filename of the Green band TIF file.${path-to-blue-tif}
is the path to the Blue band of the RGB image in TIF format. Replace${path-to-blue-tif}
with the actual path and filename of the Blue band TIF file.
In summary, the command takes three separate band files (Red, Green, and Blue) and creates a single VRT file using these bands as separate layers. This VRT file can then be used for further processing or visualization as an RGB image.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.