[gdal-dev] gdal_merge vs gdalbuildvrt

Homme Zwaagstra hrz at geodata.soton.ac.uk
Fri Feb 6 01:34:43 PST 2015


Hello Jorge,

I didn't see an answer to this question, so...

On 29/01/15 15:39, Jorge Arévalo wrote:
> Hello,
 >
 > What's the difference between gdal_merge and gdalbuildvrt? If I'm not 
wrong, gdal_merge actually creates a new dataset, merging the input 
ones. And gdalbuildvrt just creates a VRT file, which works as 
descriptor for a mosaic.

That's correct. Although you can theoretically create VRT files with 
gdal_merge
using the `-of VRT` option, this doesn't appear to work in practice.

> At the end, in both cases we  have a mosaic from several input files (real mosaic vs virtual 
mosaic). So, why would I use gdal_merge instead of gdalbuildvrt? With 
gdal_merge, I'd need more space in disk, in order to generate a merged file.

gdal_merge provides a quick way to provide a mosaic output in a 
transferrable
format (e.g. tiff for checking in an image viewer or serving up via a 
wms).  gdalbuildvrt is a more
powerful tool that provides a virtual raster that acts as a 'window' 
into the
input datasets, potentially with reprojection amidst other options. 
Saving disk
space at the expense of additional CPU processing is useful in data 
processing
pipelines but not generally ideal as a final output.

Best regards,

Homme

> Many thanks in advance.
 >
 > Best regards,
 >
 > --
 > Jorge Arévalo
 >
 > CartoDB
 > http://cartodb.com/
 >
 >
 >
 > _______________________________________________
 > gdal-dev mailing list
 > gdal-dev at lists.osgeo.org
 > http://lists.osgeo.org/mailman/listinfo/gdal-dev


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150206/2da0ec25/attachment-0001.html>


More information about the gdal-dev mailing list