Skip to main content

Questions tagged [vrt]

GDAL Virtual Dataset (XML based)

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

Add Scale and Offset to VRT from python

I'm using the python GDAL package to build a VRT containing multiple bands. These bands might have a scale and offset to be applied. Is there any way to add these parameters to the VRT when creating ...
Guillermo Moreno Castaño's user avatar
1 vote
1 answer
49 views

Trouble merging TIFF files

I have several .tif files I need to merge. I've tried some methods but none of them work. First I warped them all into the same crs (they were originally a 32617 and I reprojected them to the same crs)...
Aleucid's user avatar
  • 11
0 votes
1 answer
46 views

Convert RGB(A) GeoPDF to Grayscale GeoTIFF with GDAL

I'm using the GDAL command line tools gdal_warp and gdal_translate to convert RGB(A) GeoPDF images into GeoTIFF images. Unfortunately I found no config option that changes the RGB(A) color space to ...
christoph's user avatar
  • 5,857
1 vote
1 answer
55 views

Altering AWS environment custom variable with PyQGIS

I was able to create a script which imports into QGIS .vrt files from a private bucket in Amazon Web Services S3. But I had this one-time task to manually set the environment custom variables ...
Andre Silva's user avatar
  • 10.3k
1 vote
0 answers
53 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
0 votes
1 answer
36 views

GDAL VRT Display Weirdness in QGIS

I am building VRT's from many single channel, continuous data (i.e. float32) geotiffs. My desire is that when these VRTs get added to QGIS, they are symbolized in a particular manner. For example, ...
user890's user avatar
  • 5,733
1 vote
1 answer
64 views

Get XML content of GDAL VRT memory datasource in Python

I'm trying to fetch the XML content of a GDAL Memory VRT raster datasource in Python without saving the datasource to disk. I looked into the GDAL Python API, but have absolutely no idea how to get ...
christoph's user avatar
  • 5,857
0 votes
0 answers
96 views

Cannot write GeoTIFF larger than 4GB with gdalwarp despite using BIGTIFF createopt

I am running a Bash script to create a series of NetCDF grid files from MB-System that contain gridded swath multibeam bathymetry data. Each grid is unprojected Geographic Lat-Long, about 15-20MB in ...
Theophan's user avatar
1 vote
0 answers
35 views

Bad values with gdalwarp and "aliased" coordinate transformation

I've strange values using gdallocationinfo on vrt with coordinate system transformation. Here is my use case, maybe you can help to understand what I did bad or misunderstood 1) I've got a bunch of ...
nono303's user avatar
  • 61
0 votes
1 answer
159 views

Reading and writing VRTs differ in size and values when using Terra and Stars

I want to use the tree cover density layer from copernicus (https://land.copernicus.eu/pan-european/high-resolution-layers/forests/tree-cover-density/status-maps/tree-cover-density-2018?tab=download) ...
Lenn's user avatar
  • 1,297
1 vote
0 answers
46 views

How to get dataAxisToSRSAxisMapping from an image

I'm working on lib to build VRT files in Python using only rasterio and avoid compatibility issue (roi-vrt). I started back from the spec (https://gdal.org/drivers/raster/vrt.html) but there are still ...
Pierrick Rambaud's user avatar
1 vote
0 answers
125 views

Is there a way to create a .vrt and raster tiles without creating blanks?

I have a lot of high resolution data from thin tracks on a diagonal. Tiling these creates perhaps 80% or more completely blank tiles. Is there a routine that can either tile an input raster without ...
Campbell Smith's user avatar
0 votes
1 answer
128 views

Origin corner of a VRT file

I'm writting a pure Python lib to read VRT files and I'm struggling to understand a spec of the VRT format: https://gdal.org/drivers/raster/vrt.html. When a source is added in a SimpleSource tag, on ...
Pierrick Rambaud's user avatar
2 votes
0 answers
151 views

Updating VRT raster layers in QGIS 3.28.3 (Windows) with PyQGIS

I'm trying to update a VRT raster layer in QGIS after clipping the VRT file with Python GDAL. When I pan with the mouse afterwards, I lose my raster and get the following GDAL warning for all raster ...
christoph's user avatar
  • 5,857
0 votes
0 answers
167 views

Unable to create VRT file of COG GeoTIFF imagery files located on AWS using QGIS

I've attempted several ways to get the "Build Virtual Raster" tool in QGIS 3.26.2 to build a .vrt file using (https:...). It works fine with the same files if I previously download them, but ...
Phil Worrall's user avatar
0 votes
0 answers
162 views

gdal_translate from .vrt doesn't reproject tiles, but .vrt has right projection

Translation of a big .vrt (tiles are .bil in EPSG:4326, .vrt has ESRI:102027) file results in a wrong raster with EPSG:4326 projection. Command here is gdal_translate -of GTiff -ot Float32 $INPATH/...
Nikolay Yasinskiy's user avatar
0 votes
1 answer
677 views

IReadBlock failed at X offset 0, Y offset 690: Failed to read scanline 690 error when processing a vrt file

I am working with a rather big .vrt file (38 tiles, sum size is 4Gb) and I get an error IReadBlock failed at X offset 0, Y offset 690: Failed to read scanline 690 It is probably due to non-square ...
Nikolay Yasinskiy's user avatar
0 votes
1 answer
112 views

How .vrt file paths should be corrected if the file was created previously from other machine?

I have a .vrt file with some SRTM tiles created from windows PC, so paths there are like: <SourceFilename relativeToVRT="0">Y:\srtm_eurasia\Env\EarthEnv-DEM90_N55E120.bil</...
Nikolay Yasinskiy's user avatar
0 votes
1 answer
249 views

gdal.Warp is not creating a TIFF file (very big raster)

My raster size is more than 6 Gb. It was created from SRTM tiles, so I wasn't even able to save it as TIFF, hence I used vrt format. Now I want to translate it to .map, so I use: warpopt = gdal....
Nikolay Yasinskiy's user avatar
0 votes
1 answer
355 views

Detecting empty TIFFs [closed]

How to detect if a TIFF or VRT is empty. I don't want to loop all over values. By empty, I mean full of NODATA values. A C++ method is preferred. Using the flag -stats with gdalinfo I can get ...
ARAFAT's user avatar
  • 21
0 votes
0 answers
507 views

Meaning of "object of wrong GDALDatasetShadow" TypeError in GDAL

I have written a Python script which using gdal.Warp in order to get image from source and save it as TIFF image. Unfortunately I cannot share the full script, but I can tell that the error part comes ...
ReutKeller's user avatar
  • 2,169
1 vote
0 answers
100 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
1 answer
50 views

gdalinfo on each tile of a vrt

Is there a way to use the gdalinfo tool to calculate the statistics of each tile in a vrt? I would like to get a set of descriptive statistics (min, max, mean, etc.) for each of the slabs that make up ...
Atm's user avatar
  • 1,537
0 votes
1 answer
359 views

"GDALWarpOptions.Validate(): hSrcDS is not set" when reading a VRT pointing to a STACTA

Using rasterio.open() I was trying to read a VRT. This VRT pointed to another VRT and this in turn pointed to a STACTA file. This error message appeared: rasterio.errors.RasterioIOError: Read or write ...
StefanBrand_EOX's user avatar
0 votes
0 answers
252 views

Converting .vrt to .tif causes massive change in coordinates

I am trying to convert a .vrt file to a .tif file so that I can upload it to Google Earth Engine as an image asset. However, I get an error that the tif is not within the -90 to 90 latitude range, ...
user2031's user avatar
  • 221
1 vote
0 answers
389 views

PDAL colorizing LAZ with GeoTIFF

I understand the example from PDAL workshop and it works well. However since I puzzle around with some data and find most effective way to use it I thought I might ask for some opinions here. I do ...
Kalle's user avatar
  • 41
5 votes
2 answers
214 views

Add VRT via PyQGIS not working whereas same file loaded via the GUI works

How to reproduce my issue? Create the 2 files, a CSV and a VRT from below recipe (also available at https://gist.github.com/ThomasG77/56db21b335e25668ff86c2e8359bf3d1). Then, try to add them with both ...
ThomasG77's user avatar
  • 31k
0 votes
0 answers
315 views

ECW support on QGIS 3.22, GDAL (Mac OS 11.2.3 Big Sur)

I'm having trouble making virtual raster layers of .ecw files. I can load them into QGIS 3.22 but I can't seem to use buildvrt on them. I wonder why since GDAL warp seems to work on these files if I ...
hmnoidk's user avatar
  • 707
0 votes
0 answers
1k views

Splitting a georeferenced TIFF to multiple TIFFs using QGIS

I want to take a TIFF and split it to multiple TIFFs. I'm trying to do this with: Right click on the layer -> Export -> Save As -> Checking "Create VRT". The problem is that when ...
gisman's user avatar
  • 11
6 votes
1 answer
353 views

GDAL VRT - How to create RGB composite from two input GeoTIFF files (input1, input2, input1/input2)

I'm trying to create an RGB composite from two input GeoTIFF files. The first two bands in the VRT are straightforward and look like the following: <VRTDataset rasterXSize="10980" ...
maawoo's user avatar
  • 63
0 votes
1 answer
40 views

Using VRT to mimick N bands Geotiff from a k-bands Geotiff, N >> k?

I recently discovered VRT format and I wonder if it could be suited to my problem. I have a program A that expects as an input a N-bands Geotiff (N >> 1000). I have presently k = 200 rasters ...
WaterFox's user avatar
  • 133
0 votes
0 answers
141 views

GDAL_RASTERIO_RESAMPLING error when using QGIS GDAL translate

I have a VRT of a multiband raster layer from Sentinel 2. I converted it to a GTiff using GDAL translate in QGIS 3.10 and, though I received the output I wanted, I got hundreds or thousands of these ...
Jess's user avatar
  • 1
1 vote
1 answer
166 views

Using Java BuildVRTOptions​ to create a VRT file

I wish to dynamically build a GDAL VRT file from a java application. I really want to avoid driving the CLI from within the app. I can easily create the VRT file: final String vrtFilePath = "...
Disjoint Conjecture's user avatar
1 vote
1 answer
351 views

Efficient VRT GeoTIFF image stack reading

My aim is to read time series with Python from a stack of spatially aligned GeoTIFF files as efficient as possible. The time series is not only limited to one pixel, but can also relate to a certain ...
clax's user avatar
  • 183
0 votes
1 answer
195 views

DEM Raster Data hosted on GeoServer 2.15 serving OSGEarth platform

I can locally host DEM data and successfully read this data within OSGEarth application. Yet when I host same data on GeoServer (2.15), the terrain disintegrates / shows spikes all over respective ...
HThomas's user avatar
1 vote
1 answer
412 views

Soilgrids - Using VRT format in R

Is it necessary to use GDAL when trying to use VRT files in R? Raster Attempt Following this answer I tried: link <- "/vsicurl/https://files.isric.org/soilgrids/latest/data/clay/clay_0-...
Ndharwood's user avatar
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
2 votes
0 answers
331 views

Use relative path in VRT with VSIZIP

I'm trying to load a GPKG file into QGIS by a VRT file. The vector is inside a ZIP. So I'm using the vsizip. I would like to use just relative paths. But when I try to load it, the new layer comes ...
MarceloBaliu's user avatar
2 votes
1 answer
400 views

GDAL: use virtual file system (VSI) as datasource in virtual format (VRT files)

I cant' make something like that work: <OGRVRTDataSource> <OGRVRTLayer name="adresses-33"> <SrcDataSource>/vsigzip//vsicurl/https://adresse.data.gouv.fr/data/...
Guts's user avatar
  • 652
0 votes
0 answers
616 views

GDAL translate not creating .tif when running a VRT file with Python function

I've created a .vrt file using gdal.BuildVRT() and tried to apply a simple Python function Using Derived Bands to multiply original values (all values are 1) and then use gdal.Translate() to write it ...
Renato Ferreira's user avatar
0 votes
0 answers
95 views

Why am I getting nodata values from gdal_translate only when bounding box under a certain size? Is there a minimum bounding box size?

Problem: If my bounding box is too small, I get nodata I am using gdal_translate to convert a .vrt into a .tif. If my bounding box is large, it works perfectly. BUT as soon as I decrease the size of ...
Sheldonfrith's user avatar
1 vote
0 answers
122 views

Split one TIFF file into multiple TIFF files using VRT file

I have a VRT file like below <VRTDataset rasterXSize="10801" rasterYSize="10801"> <SRS dataAxisToSRSAxisMapping="2,1">GEOGCS["WGS 84",DATUM["...
user1298426's user avatar
2 votes
1 answer
327 views

VRT with overlapping images

I want to create a WMS of a VRT of eventually ~2500 GeoTIFFs. At the moment it's only five of them. This is my workflow: Crop the (PDF) images in photoshop and save them as PNG. Load the PNGs in QGIS,...
s74559's user avatar
  • 161
1 vote
0 answers
88 views

Blank screen when displaying vector file from spreadsheet in QGIS

I have a spreadsheet plugin installed. The Excel spreadsheet has coordinates in Australia's national grid GDA94 zone 56 which are metric. I open the Excel file and use the geometry button and ...
Neil Wilkins's user avatar
0 votes
2 answers
466 views

QGIS - creating VRT does nothing

I've got 69 .asc files to make a nice colored and shadowed elevation map or levels contours, and maybe a 3D view. They all open and get shadows. One by one… So I would like to create a VRT ("menu:...
MarJoM's user avatar
  • 31
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
3 votes
1 answer
993 views

Is it possible to create a VRT file with ogr2ogr?

I want to create VRT files from ungridded .asc files (example file). The VRT files should look like this: <OGRVRTDataSource> <OGRVRTLayer name="worms"> <...
Andreas's user avatar
  • 83
0 votes
1 answer
224 views

How to use gdal_grid with ungridded .asc DTM files

There was a question about processing ungridded .asc DTM files: Problem processing Slovenian LiDAR DTM with GDAL (and QGIS): "too many stepY values" error The answer helped a lot already, ...
Andreas's user avatar
  • 83
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
160 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