Skip to main content

Questions tagged [gdalbuildvrt]

The GDAL command to build a VRT (Virtual Dataset).

Filter by
Sorted by
Tagged with
0 votes
1 answer
39 views

Stripes in map are missing after gdalwarp and gdalbuildvrt

I have a problem with some GeoTIFF:s that are in EPSG:3006 and I need them in EPSG:3857. The problem is that after gdalwarp, and gdalbuildvrt I get transparent stripes in the vrt map This is one of ...
Mårten Swärd's user avatar
1 vote
0 answers
51 views

Creating Orthomosaic with GDAL

Platform: Windows 11 1. Aim trying to achieve: I have some very high quality multispectral data (drone multispectral imagery), from which I am trying to create an orthomosaic. My multispectral data ...
DevM's user avatar
  • 11
2 votes
1 answer
172 views

How to estimate amount of disk space required for gdal.Translate?

I've got a raster dataset (>10000 tiles) I want to merge into one single file (mosaic). For this purpose, I'm using a 2-step algo: create a .VRT file with gdal.BuildVRT (no options) create a .TIFF ...
druid's user avatar
  • 63
1 vote
0 answers
52 views

Cropping VRT with Shapefile to create new VRT with no dependecy from input

I'm new to work with gdal and I'm trying to crop a VRT-File with a shapefile to create a new VRT-File that is independent from the input. I use gdalbuildvrt [...] to create the base VRT-File from ...
Martin Reger's user avatar
1 vote
0 answers
63 views

VRT File with zipped files no longer working in QGIS 3.32.2

I created a .vrt of a number of a number of .tif files, each in a separate zip file, using gdalbuilvrt with the following command (in powershell for those wondering about the "&" at the ...
George of all trades's user avatar
0 votes
2 answers
74 views

Get footprint of clipped 4-band VRT with nodata as polygon in QGIS

For a 1 band image, I use processing.run("gdal:cliprasterbymasklayer", {...,'NODATA':0}) processing.run('gdal:translate',{...,'EXTRA': '-b mask'}) processing.run('gdal:translate',{..., '...
MoritzMoreira's user avatar
0 votes
1 answer
73 views

GDAL BuildVRT last image in list does not appear

The following code does not put the last file in the list on top, as it says in the description of the doc: "If there is some amount of spatial overlapping between files, the order of files ...
MoritzMoreira's user avatar
1 vote
1 answer
1k views

How to merge overlapping raster data sets in GDAL for Python to select maximum value at each pixel

I am trying to merge a variable number of geotiffs into a single, clipped output geotiff, using GDAL 's Python bindings (or via command line). Requirements: there will be 2 to N input files each time ...
bphi's user avatar
  • 111
2 votes
2 answers
928 views

gdalbuildvrt does not support positive NS resolution

I need to convert a bunch of xyz tiles in a folder into a single GeoTIFF file using GDAL on Ubuntu 22.04.1 (CLI). I first tried to use gdal_translate -if XYZ -of GTIFF *.xyz test.tif on a bunch of ...
swiss_knight's user avatar
  • 10.5k
1 vote
1 answer
492 views

Any way to merge tifs with overviewsm or overvies alone

I have a large dataset of tif images with external overviews. Is there any way to merge these images to one bigtiff including the overviews? Using vrt and gdal_translate doesn't seem to be working. ...
jfp's user avatar
  • 51
0 votes
1 answer
609 views

Adding data to VRT file

I'm using a gdalbuildvrt command to build a VRT file from TIFF files (using the -separate option). It's a very time-consuming process once I have thousand of images. I would like to add more dates ...
Julio's user avatar
  • 1
1 vote
0 answers
32 views

Tile GeoTIFF images in locations far from each other in one layer

How to tile two aerial TIFF images from two cities in one layer? I understand that first, I should create a virtual layer (vrt) and then tile it after reprojection. However, gdal2tile creates too many ...
Arash Archer's user avatar
0 votes
1 answer
187 views

Merging .tif files via gdalbuildvrt not working

I have a piece of code in R that I have used for a while now to transform .xyz files to .tif and then merge all those .tif files into one big .tif. It has worked well when I last used it 2 years ago, ...
Bianca Piper's user avatar
1 vote
0 answers
99 views

Reading a VRT that composes multiple WMTS sources gives "IReadBlock failed" errors

I'm trying to combine several WMTS layers into a single VRT image. My goal is to have a single image with all the WMTS rasters mosaic'ed together. The input layers overlap in some places but for the ...
jzxu's user avatar
  • 11
1 vote
0 answers
787 views

Build VRT to merge overlapping rasters always takes max values?

I'm attempting to merge two overlapping rasters from the same source with the same resolution. I would like the overlapping pixels to take the average value of the two overlapping pixels. When I ...
hmnoidk's user avatar
  • 707
3 votes
1 answer
666 views

Tile a large VRT with different resolutions

I have a large raster GeoTIFF of the whole world with a low resolution, and also parts of the world with higher resolutions. Some very high, some medium high resolution. Now I would like to create new ...
Georg's user avatar
  • 1,001
0 votes
0 answers
115 views

Requirements or limits for tiling a huge number of TIFFs

I want to create webtiles from the topographic maps of large areas, eg. a whole country. So I have some 100 GeoTIFFs, all 4000x4000. So first I create a vrt: gdalbuildvrt tifs.vrt tifs/*.tif Second ...
Tom's user avatar
  • 121
2 votes
0 answers
390 views

How to run gdal.BuildVRT in rasterio?

I'm running some code in Google Colab and I'm using rasterio. I'm trying to do the same thing as the following function, but using rasterio instead (I can't use gdal for this specific project): def ...
Jacques's user avatar
  • 121
1 vote
0 answers
87 views

Output VRT from 3 tif files is incorrectly georeferenced despite having correct and same CRS

I have 3 .tif files of a Natural Earth world map, each representing the bands of the source NE world map. I run gdalbuildvrt -a_srs EPSG:4326 -separate rgb.vrt red.tif green.tif blue.tif to create a ...
BallpenMan's user avatar
  • 1,217
1 vote
1 answer
698 views

gdalbuildvrt does not support heterogeneous band scale

I need to merge about 300 geotiff files, and I choose to use the gdalbuildvrt. However I got one problematic file, which caused the error as following: Warning 6: gdalbuildvrt does not support ...
RS_zyf's user avatar
  • 13
0 votes
1 answer
527 views

Meaning of error message for gdal_translate() and gdalbuildtvrt()? [closed]

I am working with gdal_translate() and gdal_buildvrt() from the gdalUtils package in R to merge several batches of a large number of raster files. This is my code gdalbuildvrt(gdalfile = l, # uses all ...
LuleSa's user avatar
  • 25
2 votes
1 answer
1k views

Merging rasters with alpha channel using GDAL

I need to merge 13 GeoTIFFs with (RGB+alpha channel) into one, some of them touch each other. For tests I used only two of them. I was trying to use gdalbuildvrt tool and gdal_translate afterwards, ...
Agata's user avatar
  • 31
0 votes
1 answer
385 views

gdal image quality problem when using gdalbuildvrt?

I have ~1000 1GB images that I want to make into a COG w/ JPEG compression. Any time I try to use gdalbuildvrt to create a vrt of my entire directory of images then I get big quality loss. Can ...
A. Mort's user avatar
  • 395
1 vote
0 answers
205 views

Why does this HDF4 file converted to .tif with gdal come out at a coarser resolution?

I'm currently working with large-domain MODIS data. These come in multiple separate HDF4 files which I stitch together into a virtual data set (VRT), reproject into EPSG:4326, sub-set to the domain of ...
bumbling_geographer's user avatar
4 votes
1 answer
3k views

gdalbuildvrt does not support heterogeneous projection

I have a set of about 200 geotiff files over the UK for which I need to generate a .vrt. When I use gdalbuildvrt, it spits out multiple warnings (on about 25% of the files), which say: Warning 6: ...
Mike Metcalf's user avatar
1 vote
0 answers
357 views

raster2pgsql with the -R flag (remote dataset) results in invalid table

I'm trying to setup a PostGIS table with NED raster tiles stored remotely. My raster2pgsql command works fine and results in a valid table without the -R flag, but when I use the -R flag (for an 'out-...
jamierob's user avatar
  • 1,559
2 votes
3 answers
2k views

Is it possible to build a .vrt file from multiple files with Rasterio?

I would like to build a vrt file from multiple dataset. I know the gdalbuildvrt but i don't find how I'm supposed to do the same using rasterio vrt object. Does anyone have a simple example ?
Pierrick Rambaud's user avatar
2 votes
3 answers
1k views

Merging TIFFs while retaining details in GDAL

I am currently trying to merge overlapping raster TIFFs into one single, continuous image. Just using Merge results in a raster with borders, and it is unsatisfactory : However, using a pixel ...
Aayush Panda's user avatar
0 votes
0 answers
158 views

Select first valid datasource in VRT

When reading data from a VRT, gdal appears to interpolate values from all available rasters. Is there a way to configure the VRT in such a way that it selects the first valid raster in the dataset, or ...
Will's user avatar
  • 31
0 votes
0 answers
83 views

gdalbuildvrt strips attribute table

I would like to create a virtual raster from an .img file that has associated .ige, .rde, .rrd, and .xml files. I am doing this to enable virtual I/O so I want an "exact copy" of the ...
qdread's user avatar
  • 283
4 votes
1 answer
974 views

GDAL VRT Pixel Function no output with signed or float data type

I am trying to average multiple partially overlapping rasters using a VRT and a Python based Pixel Function (https://gdal.org/drivers/raster/vrt.html#using-derived-bands-with-pixel-functions-in-python)...
Tins's user avatar
  • 41
1 vote
0 answers
912 views

gdal_translate VRT to TIF has sub-pixel shift [closed]

Problem: While combining 2 tif images using gdalbuildvrt and gdal_translate, the output tif has sub-pixel shift. (GDAL 3.1.1, released 2020/06/22) File names: input files: input1.tif, input2.tif input ...
PDash's user avatar
  • 383
3 votes
2 answers
2k views

How to make a VRT with an input raster containing multi bands?

I have 3 different rasters each containing 2 bands. Such as : Input1.tif B1 B2 Input2.tif B1 B2 Input3.tif B1 B2 I want to build a vrt with the B2 of each raster. With gdalbuildvrt I always get ...
Diane Heymans's user avatar
1 vote
0 answers
441 views

Error with gdal_translate in R

I am trying to mosaic very large rasters in R. My code, taken from this helpful answer, worked perfectly for 3 test rasters (50 MB, 50 MB, 120 MB), but when I tried a larger test on 7 rasters (...
rachell's user avatar
  • 107
0 votes
0 answers
418 views

gdalbuildvrt fails to allocate memory

I have 92 GeoTIFFs which vary subtantially in disk size, from around 60MB to 1.4GB rasters. I would like to build a mosaic of these slightly overlapping rasters, and I have read that one of the best ...
jhc's user avatar
  • 409
0 votes
2 answers
1k views

Stacking a raster with GDAL in python - vrt, translate, merge giving errors

I'm trying to create a composite of all my sentinel bands into one tif in python. I've tried doing a few things but nothing seems to be working. I am using an arcpy python environment as I need a few ...
Emtomp's user avatar
  • 543
0 votes
1 answer
319 views

Problems with .ecw files using gdalbuildvrt

I used gdalbuildvrt C:\Users\Vector_district.vrt D:\177_SwissImage_10cm_2017_190410\2548\*.ecw trying to create a vrt. The console gives back following error for each file in the folder: ERROR 4: ...
user156872's user avatar
1 vote
0 answers
998 views

Creating overview images for individual rasters becomes more flexible when the layer is partially updated. How do I do this?

I use a GeoServer. I want to create a layer from a mosaic that I got using gdal from a vrt file that is created from pieces of a map whose size is 9 000 000 * 3 000 000 pixels. To create a VRT file, ...
4gexotron's user avatar
-1 votes
1 answer
192 views

Grid_metrics fails to create grid_metrics.vrt

I need to obtain the metrics for a denoised normalized dataset. This is part of the code that I am using: ctg_denoised <- readLAScatalog("G:/NoBackUp/denoised/") opt_chunk_buffer(ctg_denoised) <...
candelas762's user avatar
3 votes
0 answers
168 views

gdal_merge runs indefinitely, crashes system, BSOD

I have two small rasters. Same resolution, SRID, type, format. When I use gdal_merge, the console keeps running the command ad infinitum. import time, os ot = "UInt16" of = "GTiff"...
Theo F's user avatar
  • 1,839
1 vote
1 answer
509 views

QGIS use multiple rasterfiles: virtual raster with Python

I'm new to QGIS (using version 3.4). I'd like to make our raster files ready to use. There are 5k rasters in one folder with several subfolders. What's the best way to display them all in QGIS? I ...
user156872's user avatar
4 votes
1 answer
312 views

Build Mosaic using gdal based on Modal value

I have an immense (~50,000) set of tiles that I want to mosaic using the mode for every pixel. The tiles have a size of 299x299 and are overlapping each other by 2/3 respectively. For the sake of ...
Illundra's user avatar
  • 371
1 vote
1 answer
208 views

gdalbuildvrt error 1: unable to find 'location' in DBF

I'm trying to create a vrt file with several shapes which I had created previously with gdal_contour (all of them only have 1 feature): gdalbuildvrt -input_file_list tiles.txt vrtFile.vrt But I got ...
Joss's user avatar
  • 21
1 vote
0 answers
508 views

GDAL virtual dataset with transparency

I'm trying to create image pyramid of multiple smaller images for GeoServer use. I have done this by first creating virtual dataset with gdalbuildvrt and then with gdal_retile.py. The problem I'm ...
jfp's user avatar
  • 51
0 votes
2 answers
2k views

error: Gdalbuildvrt does not support rotated geo transforms?

I try to convert several tiff to vrt -file. All tif-files are in same projection (EPSG:3067). I get error message: Gdalbuildvrt does not support rotated geo transforms. What this mean and how to avoid ...
Mickeler's user avatar
  • 453
1 vote
0 answers
79 views

Multiband GeoTIFF loading slow in browser

Here's the problem: http://www.doctorharapos.com/webMap/geotiff.html My GeoTIFF files are light, just 4MB My process: starting from an ASCII Esri file I transform it to GeoTIFF using gdalwarp, ...
David Santos Domínguez's user avatar
1 vote
0 answers
410 views

Merging multiple QgsRasterLayer objects to create virtual raster (.vrt file) using gdal

I am creating multiple QgsRasterLayer objects in pyqgis and I need to merge them into a virtual raster .vrt file which will eventually be loaded as a layer in QGIS. The QgsRasterLayer objects are ...
Faiz Kidwai's user avatar
1 vote
1 answer
381 views

GDAL C# Bindings for VRT don't write a VRT file

I have previously asked this question on stack overflow, and am now asking this more specialized audience. I'm wondering why the GDAL C# library (v2.3.3) call to Gdal.wrapper_GDALBuildVRT_names(...) ...
OrangeWombat's user avatar
2 votes
1 answer
213 views

sampling error using gdalwarp on a subsetted VRT?

I am currently trying to prepare an SRTM subset including height conversion from EGM96 to WGS84 using gdalwarp. I encountered some strange shifts in part of the image. Here is a reproducible example: ...
John Truckenbrodt's user avatar
3 votes
2 answers
3k views

Gdal.BuildVRT not creating any output

I am trying to create a mosaic of all the images in file_list, Using: > vrt_options = gdal.BuildVRTOptions(resampleAlg='cubic', addAlpha=True) > gdal.BuildVRT('C:\\my.vrt', file_list, ...
Muhammad Fasiurrehman Sohi's user avatar