Questions tagged [vrt]
GDAL Virtual Dataset (XML based)
165
questions
1
vote
0
answers
14
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
1
answer
14
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 ...
0
votes
1
answer
31
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 ...
0
votes
0
answers
51
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, ...
1
vote
0
answers
44
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 ...
5
votes
2
answers
124
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 ...
0
votes
0
answers
73
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 ...
0
votes
0
answers
122
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 ...
5
votes
1
answer
104
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" ...
0
votes
1
answer
25
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 ...
0
votes
0
answers
57
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 ...
0
votes
0
answers
41
views
Making all raster tiles have same colour scale as parent raster using QGIS
I created a few hundred 100 x 100 pixel tiles from a single raster image. Each tile will be converted to PNG and be labelled for an object detection model. I made the tiles by clicking Export -> ...
1
vote
0
answers
53
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 = "...
1
vote
1
answer
72
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 ...
0
votes
1
answer
25
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 ...
1
vote
1
answer
135
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-...
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
0
answers
82
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 ...
1
vote
1
answer
89
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/...
0
votes
0
answers
122
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 ...
0
votes
0
answers
56
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 ...
1
vote
0
answers
44
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["...
2
votes
1
answer
113
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,...
1
vote
0
answers
45
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 ...
0
votes
2
answers
131
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:...
0
votes
2
answers
539
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 ?
1
vote
1
answer
328
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">
<...
0
votes
1
answer
73
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, ...
2
votes
3
answers
500
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
33
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
1
answer
35
views
Using NASA Above landcover imagery in place with Qgis
Landsat-derived Annual Dominant Land Cover Across ABoVE Core Domain is composite tiled classified imagery dataset covering the years 1984-2014. The format is elegant and clever but hard to use. Each ...
0
votes
1
answer
32
views
Using NASA Above landcover imagery in place with ArcGIS
Landsat-derived Annual Dominant Land Cover Across ABoVE Core Domain is composite tiled classified imagery dataset covering the years 1984-2014. The format is elegant and clever but hard to use. Each ...
4
votes
1
answer
119
views
Storing GDAL VRT sources inside QGIS project files (.qgs, .qgz, .gpkg)?
After I managed to store SVG symbols in Geopackage BLOBs (Read (and write) SVG from Geopackage with QGIS) another idea was growing in my mind: Maybe we can store simple GDAL VRT sources in GPKG BLOBs ...
5
votes
2
answers
375
views
Accessing CSV data directly from website
I want to do what this person has asked here. I am using QGIS 3.16
I have copied what was suggested and what seemed to work for the OP, however I am not getting any information displayed. The data ...
2
votes
1
answer
269
views
Merging CSV layers (XYZ files with point coordinates)
I have list of many XYZ files with points without header an space delimited.
Example:
-877500 -1014000 471.95
-877500 -1013995 472.28
-877500 -1013990 472.61
-877500 -1013985 473.04
-877500 -1013980 ...
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
449
views
Converting grayscale VRT to palleted VRT using GDAL tools
I have this virtual file called virtual-raster.vrt with the following gdalinfo of:
Band 1 Block=1x1 Type=Float32, ColorInterp=Gray
I just want to convert it into a palleted one like so:
Band 1 Block=...
1
vote
1
answer
120
views
Refreshing VRT raster layer using PyQGIS
I'm working a lot with GDAL VRT raster layers in QGIS 3.14, often changing the file content while viewing the rasters in map canvas. When I zoom or refresh the canvas in QGIS 2.18, all modified VRT ...
2
votes
1
answer
96
views
Create single VRT from images with the same name
I have a list of rasters some with the same date that I have to turn into VRTs with the same date too. The problem is that when I create a loop in the Gdal list it overwrites the VRTs that have the ...
0
votes
2
answers
2k
views
Reading VRT from SoilGrids in R
I need the global SOC stocks map at 0-30cm from the new SoilGrids 2.0:
https://files.isric.org/soilgrids/latest/data/ocs/
I have no previous experience with VRT files. I have simply downloaded "...
2
votes
1
answer
348
views
Why can't gdal open my VRT?
I am trying to reproject and retile BMNG data. So far I have processing my images into geotifs. I can view them together in QGIS and everything looks good:
I then created a vrt file. The vrt file ...
2
votes
1
answer
2k
views
Rasterio IO Error: Read Failed and Gdal VRT_SHARED_SOURCE
I trying to follow some code on git which uses sentinel hub images code
I'm stuck with one part of the code which opens and reads a grayscale tif image which for some reason returns a rasterio ...
3
votes
1
answer
351
views
Need an alternative to modify overviews in a GDAL Virtual Raster (VRT)
I have built a VRT mosaic and overviews with these lines of code:
out_vrt = os.path.join('/out/dir/', 'out.vrt')
ds = gdal.BuildVRT(out_vrt, my_raster_list)
ds = None
ds = gdal.Open(out_vrt)
factors =...
0
votes
0
answers
166
views
QGIS GDAL Build VRT results do not reflect input raster values
I am having trouble successfully creating a VRT.
My Build VRT gdal command results in values of ±1.79769e+308. The values should be 1,2,3, or 4.
I've verified projection info is the same across the ...
0
votes
1
answer
165
views
How can I modify a VRTRasterBand sub-class,etc from Python?
I am using GDAL to merge a series of overlapping rasters using Pixel Functions to combine the color bands. As a proof-of-concept, my approach has been to create a VRT, and then to modify it in a text ...
1
vote
1
answer
207
views
BuildOverviews() not supported for VRT dataset
I am trying to build overviews in a VRT dataset with python GDAL.
I try this code:
out_vrt = os.path.join(out_dir, 'mosaic.vrt')
ds = gdal.BuildVRT(out_vrt, [raster1.tif, raster2.tif])
factors = [...
1
vote
2
answers
332
views
gdalbuildvrt.exe doesn't recognize existing path
I used this function before but it suddenly stopped working on some updates. The simple command throws an error.
PS C:\> c:\ProgramData\Anaconda3\Library\bin\gdalbuildvrt.exe 'c:/tmp/index.vrt' 'c:...
2
votes
1
answer
699
views
Build VRT from list of VRTs in Python
I have a list with lots of VRTs. Each VRT is the mosaic for a single band for a single band. What I want to do is to make a final TIFF with as many layers as bands. I'm trying to first make one VRT ...
2
votes
0
answers
250
views
"Warning 1: All options related to creation ignored in update mode" (GDAL)
I am attempting to clip a raster using a polygon file (shapefile) and to save the result in memory. I succeed to do it using gdal.Warp and the option format=VRT using the following code. Please note ...
1
vote
0
answers
76
views
Defining invalid regions of VRT file with rasterio in a way that allows windowing [closed]
I'm using a VRT file to represent a bunch of individual map tiles as one big image. I noticed that some of the data is invalid but not marked as such (via the invalid data value). I'd like to define ...