Questions tagged [gdalbuildvrt]
The GDAL command to build a VRT (Virtual Dataset).
101
questions
0
votes
0
answers
39
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 ...
0
votes
2
answers
36
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',{..., '...
0
votes
1
answer
45
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 ...
1
vote
1
answer
712
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
...
2
votes
2
answers
554
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 ...
1
vote
1
answer
344
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. ...
0
votes
1
answer
375
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 ...
1
vote
0
answers
27
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 ...
0
votes
1
answer
142
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, ...
1
vote
0
answers
79
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 ...
1
vote
0
answers
590
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 ...
3
votes
1
answer
442
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 ...
0
votes
0
answers
96
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 ...
2
votes
0
answers
317
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 ...
1
vote
0
answers
78
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 ...
1
vote
1
answer
531
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 ...
0
votes
1
answer
489
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 ...
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, ...
0
votes
1
answer
318
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 ...
1
vote
0
answers
187
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 ...
4
votes
1
answer
2k
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: ...
1
vote
0
answers
317
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-...
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 ?
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 ...
0
votes
0
answers
129
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 ...
0
votes
0
answers
72
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 ...
3
votes
1
answer
807
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)...
1
vote
0
answers
867
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 ...
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 ...
1
vote
0
answers
418
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 (...
0
votes
0
answers
379
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 ...
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 ...
0
votes
1
answer
269
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:
...
1
vote
0
answers
986
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, ...
-1
votes
1
answer
180
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) <...
3
votes
0
answers
154
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"...
1
vote
1
answer
474
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 ...
4
votes
1
answer
301
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 ...
1
vote
1
answer
193
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 ...
1
vote
0
answers
454
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 ...
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 ...
1
vote
0
answers
78
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, ...
1
vote
0
answers
398
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 ...
1
vote
1
answer
350
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(...) ...
2
votes
1
answer
207
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:
...
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, ...
0
votes
2
answers
807
views
How to construct dataset in memory that is built from CSV and VRT file?
I'm using GDAL .Net wrapper, GDAL.Net.
I have a list of scattered points ( in X,Y,Z coordinates) that I would like to rasterized via the function GDAL_GRID( or via the underlying .Net wrapper, Gdal....
0
votes
0
answers
589
views
gdal: create a tile index or VRT from a folder of downloaded map tiles
I need to use GDAL tools to either create a tile index or create a VRT from a folder full of map tiles. The folder is in the format:
<zoom_level>
|
|-- <row_number>
| ...
1
vote
1
answer
2k
views
"gdalbuildvrt command not found" in Build Virtual Raster tool
I am trying to use the "Build Virtual Raster" tool in QGIS 3 to build a mosaic. When I run the tool, I get the following message:
GDAL command output:
/bin/sh: gdalbuildvrt: command not found
...
4
votes
1
answer
2k
views
Virtual Raster Mosaic - gdalbuildvrt - data gaps
I'm trying to create a virtual mosaic of several raster images (.tif) in R using the function "gdalbuildvrt" from the "gdal" package. The raster images are flight lines from a drone flight over a ...