Questions tagged [gdalbuildvrt]
The GDAL command to build a VRT (Virtual Dataset).
92
questions
1
vote
0
answers
6
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
95
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 ...
2
votes
1
answer
92
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
43
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
93
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
33
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
122
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
135
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
355
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
115
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
111
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 ...
3
votes
1
answer
865
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
139
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-...
0
votes
2
answers
514
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
487
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
31
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
29
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
433
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
452
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
815
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
326
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
292
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
656
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
142
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
892
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
156
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
98
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
316
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
207
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
135
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 ...
0
votes
0
answers
288
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
1k
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
37
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
326
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
244
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
165
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:
...
1
vote
2
answers
2k
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
616
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
406
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 ...
2
votes
1
answer
3k
views
Using python gdal.BuildVRTOptions()
I want to define no data values when working with gdal.BuildVRT(). According to the gdal.documentation http://gdal.org/python/osgeo.gdal-module.html, by creating a gdal.BuildVRTOptions (srcNodata=-99, ...
3
votes
1
answer
538
views
Set georeferenced extents of VRT file when calling GDALBuildVRT
I'm using Jupyter Notebook and gdalbuildvrt to write a program that loads hundreds of rasters. I want to set an area of interest, and only keep rasters (or portions of rasters) that fall in this area.
...
2
votes
2
answers
1k
views
Using gdalbuildvrt in R gives Warning Message ... had status 1?
I want to make a mosaic out of several raster files that are next to each other, all including 4 bands. Due to saving space on the server I need to build a vrt and want to write the code in R, so I ...
6
votes
0
answers
401
views
When should I use gdal_merge.py?
When building a single georeferenced image from a collection of tiles, gdalbuildvrt followed by gdal_translate is much faster than gdal_merge.py.
In my own measurements of
gdal_merge.py \
--...
0
votes
1
answer
449
views
gdal_vrtmerge.py vs. gdalbuildvrt
In the gdalbuildvrt documentation, I read
This utility is somehow equivalent to the gdal_vrtmerge.py utility [...]
So what is the difference (if any) between gdalbuildvrt and gdal_vrtmerge.py?
...
0
votes
1
answer
517
views
C++ GDAL API: Add more than one rasters to VRT
I want to add more than one tiff file into a vrt file, Well Based on GDAL documentations it is possible to create a vrt using this code
GDALDriver *poDriver = (GDALDriver *) GDALGetDriverByName( "VRT"...
5
votes
3
answers
8k
views
Trying to run GDALbuildVRT in command line
I have a directory of OS data stored as tiff files (approximately 2000), which I want to create a virtual raster with. I understand that you can run this in the QGIS UI but because of the large number ...
1
vote
1
answer
388
views
QGIS Python Programming Error - Build Virtual Raster (.vrt file) - Error : Unable to execute algorithm Wrong parameter value : [closed]
I am reading a single row from a text file createvrt_row0.txt. The row is :
E:/Sreeraj/Task Global Data CONVERSION/Split/1 deg tiles_Global agri_data/N31E2.tif;E:/Sreeraj/Task Global Data CONVERSION/...
2
votes
3
answers
2k
views
How to fix positive North-South Pixel size in GeoTIFF with GDAL
I have issues with some GeoTIFF raster files with positive NS resolution (North-South)
gdalinfo gave me this:
Pixel Size = (1.000000000000000,1.000000000000000)
I run into all kind of problem with ...