Questions tagged [gdalbuildvrt]

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

38 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
355 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 \ --...
3
votes
0answers
76 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"...
3
votes
1answer
166 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 ...
3
votes
0answers
261 views

GDAL VRT - gap artifact in output

I have created a VRT using gdalbuildvrt from three single-band GeoTiffs (1-m resolution) as follows: gdalbuildvrt chm_2157.vrt P_712806_CHM.tif P_712808_CHM.tif P_712810_CHM.tif -a_srs 'epsg:2157' -...
3
votes
0answers
2k views

How to build .vrt of shapefiles?

I've a huge number of shapefiles and I would like to create a VRT as I do with gdalbuilvrt for raster. I find here https://github.com/dwtkns/gdal-cheat-sheet that it should be possible and the format ...
2
votes
1answer
22 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 ...
2
votes
0answers
49 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 ...
2
votes
0answers
252 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 ...
2
votes
0answers
944 views

Multiband virtual raster with gdalbuildvrt: Control how bands are sorted

I am making a multiband virtual raster using gdalbuildvrt. Everything works fine, but a little detail remains annoying: I cannot control how the bands are sorted. I specified the input raster using ...
2
votes
1answer
773 views

gdal_merge tries to create image with negative dimensions

I am trying to use gdal_merge.py to create a mosaic from a set of geotiffs, however the command fails with the error message: "ERROR 1: Attempt to create -3510x1817 dataset is illegal,sizes must be ...
1
vote
0answers
15 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 ...
1
vote
0answers
27 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
0answers
87 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 ...
1
vote
0answers
61 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-...
1
vote
0answers
291 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 (...
1
vote
0answers
889 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
vote
1answer
120 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
0answers
25 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
309 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
217 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(...) ...
1
vote
1answer
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 ...
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 ...
1
vote
0answers
140 views

GDAL concatenating vrts

I'd like to concatenate a few vrts together. So i have three vrts representing data from different years and to make my life easier would like just to have one vrt created from the three vrts. Each ...
1
vote
0answers
167 views

Changing pixel values of GDAL VRT

Is it possible to manipulate the pixel values of a GDAL VRT and, if so, how? The original data must remain unchanged. I have a dataset which might be a bit rotated so that there are no data values on ...
1
vote
0answers
141 views

How to dynamically change the draw-order of geotiff rasters in QGIS?

In ArcGIS it is possible, via raster mosaics, to choose the raster order depending on various methods. One such method is the center method. The raster that is closest to the coordinate of the center ...
1
vote
0answers
400 views

Importing multiple GeoTiffs in TileMill

I am a software engineer that is very new in the geo world. So excuse my ignorance if this question seems simple or if terms I use are totally wrong. Problem: I have been tasked with taking multiple ...
1
vote
0answers
249 views

How to prevent transparent borders (collars) of a tif wipe out overlapping regions of adjecent tif while using gdalbuildvrt

I have a set of Geotifs that have got transparent borders (collars) of irregular shapes & dimensions around them. First I created a VRT over this set of Geotifs through gdalbuildvrt. Then I ...
1
vote
0answers
50 views

Problem defining the tiling starting point

We are tiling a image datasets. However, we want to specifically define custom windows. To do this, we are using -te option during warping. The warped output is then tiled. The problem though is that ...
1
vote
0answers
729 views

How do I load offline google map/earth vrt files as a backdrop in qgis

I was trying to follow the process : saving-google-earth-location in order to cache google maps/earth offline for digitizing, but I am fairly new to qgis. When I try to add the vrt file as a raster ...
1
vote
0answers
846 views

`gdalbuildvrt` and selecting individual bands

I want to produce a set of VRTs (GDAL's internal virtual rasters) that comprise a re-arrangement of bands of a number of individual GeoTIFF files. Say I have my initial set of GeTIFF files, all having ...
0
votes
0answers
28 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 ...
0
votes
0answers
41 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
0answers
46 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/...
0
votes
0answers
23 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
25 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 ...
0
votes
0answers
246 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
0answers
248 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
0answers
356 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> | ...