Questions tagged [gdalbuildvrt]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
32 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
0answers
11 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
0answers
33 views

Merging TIFF files creates offset / deformation

I have a PNG library (524288 tiles of 256px * 256px) which I georeferenced via GDAL. This first part works correctly. ullr: ulx = (360 * (column / 1024)) - 180 uly = 90 - (180 * (line / 512)) lrx = ...
0
votes
1answer
28 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 ?
0
votes
0answers
27 views

Is there a way to search raster files with a bounding box using GDAL in C#?

So far I have tried this GdalConfiguration.ConfigureGdal(); var outputFile = "C:/Users/abcd/RPF/output.vrt"; var rasterFiles = Directory.GetFiles("C:/Users/abcd/...
2
votes
3answers
111 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
0answers
17 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
0answers
21 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 ...
1
vote
0answers
125 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
0answers
139 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 ...
2
votes
2answers
294 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
0answers
191 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
0answers
160 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
2answers
259 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
1answer
75 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
0answers
888 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
1answer
127 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
0answers
60 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
1answer
203 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 ...
3
votes
1answer
114 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
1answer
84 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
0answers
174 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
2answers
594 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
0answers
19 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
0answers
256 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
1answer
175 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
1answer
127 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: ...
0
votes
2answers
772 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
2answers
437 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
0answers
299 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
1answer
1k 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
1answer
1k 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
1answer
2k 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
1answer
365 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. ...
0
votes
1answer
905 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 ...
5
votes
0answers
322 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
1answer
385 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
1answer
370 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"...
4
votes
3answers
6k 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
1answer
350 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/...
0
votes
2answers
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 ...
1
vote
1answer
793 views

Reading Gdal VRT format

How can I read a gdal vrt file with GDALOpen function? I have a vrt file built with gdalbuildvrt and I want to read it using GDALOpen but It returns a null dataset, Is it even possible? In this code ...
6
votes
3answers
1k views

How Does QGIS Read 'nodata' in 3 Band Raster Data?

I have 3 band GeoTiffs of aerial imagery. The imagery is byte data with values of 0-255 on each band. A 'nodata' value has not been assigned on any band. I am assembling these images using a VRT, ...
2
votes
1answer
568 views

Unable to export GeoTIFF file with different datatypes per different bands

Already read Merge Multi-Band Geotiff with different datatypes (with gdal) but can't apply that solution so please do not flag as duplicate. I have near 3.000 geotiff files that I need to merge into ...
2
votes
0answers
227 views

Saving VRT file crashes QGIS

When I load a .vrt file, the image comes in with a black and blue tint usually or is some other weird color. If I zoom in at all QGIS crashes and creates a minidump in my program folder. Also, when I ...
6
votes
1answer
2k views

gdalbuildvrt vs gdal_merge on overlapping images

I once have used gdalbuildvrt on georeferenced images. That was okay when images did not overlap, It was also time efficient compared to gdal_merge or gdal_warp. Now I have overlapping images and ...
1
vote
0answers
2k views

Create VRT from TIFFs with different projections

Basically, I have a bunch of different TIFF files, each with their own projection (I think). I want to eventually mosaic and tile them all. But before I tile them I have to combine all the TIFFs in a ...
0
votes
0answers
386 views

Running a line from a terminal for QGIS [duplicate]

I am trying to run this code: # create virtual multi-band raster gdalbuildvrt -separate rgb.vrt red.tif green.tif blue.tif # write multi-band raster into geotiff gdal_translate -of GTiff -co ...
2
votes
3answers
2k views

ERROR 1: Failed to write .vrt file in FlushCache()

I'm trying to build .vrt from georeferenced DEM files from Photoscan. gdalbuildvrt global_dem.vrt dem*.tif It was working on Ubuntu 12.04(GDAL 1.10.0, released 2013/04/24), but now it fails on ...
2
votes
1answer
2k views

Export VRT to GeoTIFF in Python

I'm trying to export a Virtual raster (VRT) to GeoTIFF in Python 2.7 (Windows 10 System), but code runs with some problems. When i try export the following image (.vrt file) to GeoTIFF i had a ...