Questions tagged [vrt]
GDAL Virtual Dataset (XML based)
180
questions
1
vote
0
answers
17
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 ...
0
votes
1
answer
48
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)
...
1
vote
0
answers
16
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 ...
1
vote
0
answers
52
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 ...
0
votes
1
answer
55
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 ...
2
votes
0
answers
106
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 ...
0
votes
0
answers
59
views
How to get mask with rasterio mask + vrt containing some raster's with alpha band, most without
I have a bunch of geotiff's that are jpeg compressed; so they are type Byte with values from 0-255.
Some of these geotiff's have regions of nodata, in which case the geotiffs use an alpha band to ...
0
votes
0
answers
97
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 ...
0
votes
0
answers
72
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/...
0
votes
1
answer
389
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 ...
0
votes
1
answer
43
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</...
0
votes
1
answer
178
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....
0
votes
0
answers
16
views
Reference hdf5 data in VRTRawRasterBand
I have hdf5 data in this shape: nEastingPixel x nBands x nNorthingPixel
I would like to create a vrt file, which references a specific band in that data cube.
I tired with a SimpleSource, but this ...
0
votes
0
answers
41
views
Reference hdf5 in vrt
I have hdf5 data that has this shape: (nEastingPixel x nBands x nNorthingPixel) BIL.
I'd like to have a vrt file, which references to a band in that data.
However, the second dimension is interpreted ...
0
votes
1
answer
184
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 ...
0
votes
0
answers
221
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 ...
1
vote
0
answers
74
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
45
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
207
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
167
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
217
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
183
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
242
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
745
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 ...
6
votes
1
answer
280
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
33
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
123
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 ...
1
vote
1
answer
123
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
264
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
128
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
334
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
60
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
242
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
278
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
455
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
71
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
103
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
259
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
68
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
312
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:...
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 ?
2
votes
1
answer
775
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
161
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
985
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
114
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
46
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
43
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 ...
5
votes
1
answer
218
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
413
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
512
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 ...