Questions tagged [vrt]

GDAL Virtual Dataset (XML based)

Filter by
Sorted by
Tagged with
-1
votes
2answers
156 views

Read VRT from SoilGrids 2.0 in R

I need the global SOC stocks map at 0-30cm from the new SoilGrids2.0: https://files.isric.org/soilgrids/latest/data/ocs/ I have no previous experience with VRT files. I have simply downloaded "ocs_0-...
2
votes
1answer
35 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 ...
0
votes
1answer
107 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 ...
2
votes
1answer
39 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
0answers
44 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
1answer
47 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
1answer
52 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
2answers
27 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:...
1
vote
1answer
119 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 ...
0
votes
0answers
28 views

Convert list of .hdf-files to .vrt in python with Gdal

I'm a little lost. I have a directory with some Landsat-8-scenes. There are files that end on .hdf and they are always accompanied by a .hdr file. What I wanted to do is to convert these scenes to a ...
2
votes
0answers
62 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
0answers
29 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 ...
2
votes
2answers
34 views

Describing/creating VRT/CSVT files of variable length space separator for gdal_rasterize command

I have LAS points (DTM) files with space separators. And the problem is for Z coordinate: 360020.678 6245020.453 0.008 ... 364895.678 6245245.453 14.970 ... 364370.678 6246870.453 112.312 ...
3
votes
1answer
60 views

How can I stop QGIS from crashing when opening layer properties of large raster?

I am using a VRT to organize and examine a very large LiDAR dataset (>250GB). I never display the full extent, so I can normally navigate around without any problems loading the tiles. But QGIS ...
0
votes
0answers
93 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 ...
5
votes
0answers
46 views

Difference between merge and create virtual raster

I have the DEM of a defined region that has been split into sub-DEM with a resolution of 1 km x 1 km. When I merge the sub-DEM to create a single DEM (Raster -> Miscellaneous -> Merge), the overall ...
1
vote
0answers
43 views

Many-Many Relationship in GDAL Pixel Functions

I am using pixel functions (in Python) in VRT derived data sets. As far as I know it is only possible to use One-One or Many-One relationships within a pixel function. In other words, the in_ar ...
1
vote
1answer
52 views

How to obtain elevation info from VRT file?

I have a VRT mosaic file I made from thousands of ESRI GRID files. It looks something like this. <VRTDataset rasterXSize="111831" rasterYSize="94785"> <SRS dataAxisToSRSAxisMapping="1,2"&...
2
votes
1answer
137 views

stack_raster.cpp:35:99: error: 'YES' was not declared in this scope

I've been playing around with C++ and the API for GDAL to create some functions that I have done using Python. One of them was to create a virtual raster based on a list of files found in certain ...
0
votes
0answers
33 views

Grid specification with multiple z fields/attributes in VRT-file in GDAL

I am trying to transform a csv file into a tiff-file (raster). As a first step I am creating a VRT-file. My csv has the following row structure: E_KOORD,N_KOORD,Z1,Z2,Z3 How do I correctly specify ...
1
vote
1answer
191 views

Create elevation-service from geotiff using python and gdal

I'd like to create a little server for us, that tells us the elevation of a point in a geotiff file. I already got it working basically using the following: dataset = gdal.Open('test_file.tif', gdal....
4
votes
2answers
256 views

QGIS VRT values differ from the source rasters

Background: I have six adjacent DEMs (NED 1/3 arc-second .img files from The National Map). The min-max values among the six range from: 90.4 - 2100.0 Problem: Using the 3.6.2 Raster > ...
0
votes
1answer
118 views

Is saving rasters to VRT bad convention?

I'm working with a lot of rasters (dozens of thousands) and would like to store them for a while. They will be used intermittently, but never all at once! The size of VRT (~2 kb) is such a positive ...
0
votes
0answers
69 views

Generating VRT in batch at GDAL

Is there any way to generate a virtual batch (.vrt) in batch? I imagine the coordinates should be in a .txt file and related to the name of the images that will be cropped. There are more than 1,000 ...
1
vote
0answers
112 views

GDAL/ogr2ogr .vrt driver - ERROR 1: Unable to find source field [closed]

We are using ogr2ogr to convert GML to Geopackage v1.2, using a .vrt to enforce a "schema" (reason: the greater control it offers over using a .gfs mapping file (e.g. enforcing nullable fields, ...
2
votes
0answers
85 views

VRT Files from QGIS2+ makes QGIS3 crash when opened

We got a bunch of VRT files that we made using QGIS 2 and which reference a varying number of ECW files (from 8 to 300). Those VRT files were perfectly runing QGIS 2.18. Problem is: Opening those ...
2
votes
1answer
101 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
0answers
357 views

gdal_translate errors with VRT: GetBlockRef failed and IReadBlock failed

I am projecting global rasters with the Homolosine. gdalwarp reprojects it nicely, but it does not compress the output, that must be done afterwards with gdal_translate. To reduce computation time, I ...
2
votes
1answer
141 views

When building a VRT in QGIS, which input raster will be assigned which band number?

I don't understand how QGIS assigns the band numbers to the input rasters for a virtual raster catalogue. Unfortunately the bands in the compiled virtual raster catalogue will only have the names "...
0
votes
1answer
111 views

Creating tiles from complex VRT

I have thousands of GeoTIFF source files that cover whole country in 6 different layers. I have created VRT file for each layer. I loaded everything in QGIS, assigning correct colors to bands in ...
0
votes
2answers
320 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....
1
vote
0answers
37 views

QGIS: can I somehow display a virtual raster of 7000 zipped GeoTiffs?

I've built a virtual raster of 7000 zipped geotiffs (each about 3600x2400 px). The GeoTIFFs have overviews. I've tried to open it with QGIS desktop application (via Add Raster Layer). Alas, QGIS ...
2
votes
1answer
322 views

Add a NoData buffer to a raster with rasterio

I am currently trying to extract Web Mercator tiles from a Geotiff raster using rasterio VRT (version 1.0rc5). The tiles sometimes exceed the extent of the raster, which causes me trouble. Reading ...
1
vote
0answers
246 views

Building pyramids of virtual raster not permanent when file is moved

I have a folder saved under: C:\QGIS\Active Layers\ In the "Active Layers" folder there our two folders; one called "Geotiffs" and the other "Virtual Raster". In QGIS 2.18.20 I created a virtual ...
2
votes
1answer
78 views

GDAL/OGR Error: Cyclic VRT opening detected

GDAL 2.2.4 (64bit Windows) throws an error during opening of a cyclic OGRVRT file. There was no problem with cyclic VRTs in GDAL 1.10.1 (32bit Windows). Here is a sample VRT file, which I used to ...
1
vote
0answers
95 views

QGIS 3.0.3 - Shift when saving image from Google Satellite as VRT

I tried to save Google satellite images with "save as", using VRT option, and setting up the correct resolution. Everything works but the resulting image is slightly shifted to the north, about 3 ...
0
votes
1answer
208 views

Increase contrast of merged Planet Labs scenes

I've download a few PlanetScope scenes from Celaya, MX. Taken alone they have a good contrast. Then I've merged them with gdalbuildvrt, which lowered the contrast: Link I've thought, that I could ...
0
votes
0answers
256 views

gdal_translate consuming too much memory when writing big JPEG2000 file

I am converting a 30.000 x 30.000 vrt image (made of JPEG2000 subimages) into a single (big) JPEG2000 image, using the KDU plugin. gdal_translate -of JP2KAK -co QUALITY=100 my30000_3000.vrt myOutput....
2
votes
2answers
290 views

OGR SQL Query not working in VRT layer

I'm having trouble with one SQL query I'm using on a shapefile in my VRT layer. My goal is to import several shapefiles to a PDF using OGR, GDAL and Python. My shapefile has follwing structure: ...
3
votes
1answer
134 views

OGR set different features to column name in PDF

I'm trying to import shapefile data into a geospatial PDF using OGR and Python. My shapefiles are structured as follow: shapefile1.shp: {stratt1: string1, intatt1: 1, ...} and shapefile2.shp: {...
3
votes
1answer
292 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. ...
4
votes
1answer
334 views

Importing CSV (via VRT) to PostGIS is slow with -skipfailures?

I am importing about 60 million records of csv data (about 25gb) to Postgresql server using ogr2ogr After googling million times, I found out that I can make VRT file and uploading my csv file using ...
0
votes
1answer
316 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? ...
1
vote
1answer
207 views

Forming vrt of 4139 ecw files?

I have 4139 ecw files of aerial photography that I would like to be able to open fairly easily and quickly in a QGIS project. I thought a virtual raster would be the way but when I have tried it comes ...
0
votes
1answer
272 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"...
1
vote
0answers
680 views

How to mask one raster using another?

I wish to apply one raster (GeoTIFF) as a mask to another raster. How can I do this using GDAL tools? I'd be happy to achieve this as a virtual raster because these images are large. Will it be ...
2
votes
1answer
2k views

Using multiple tiff files as a data store in Geoserver

I have hundreds of tifs I want to use as a data store on my Geoserver. So many that QGIS won't merge them for me. I heard some about .vrt but I never found a clear source of information on the ...
1
vote
1answer
380 views

Reading an OGR VRT with geometry from an Oracle OCI data source

I am having trouble creating/reading OGR VRT files from an Oracle OCI data source. I am running GDAL 2.2.1 on Windows 7 Professional SP1. My data source is an Oracle 11g (11.2.0.4.0) 64bit database ...
2
votes
1answer
2k views

GDAL Warp to in-memory raster

So, I have a few rasters I need to use for processing, but the task requires them to be in a different SRS than they currently are. GDAL Warp would be the go-to solution, however, it saves the ...
3
votes
0answers
182 views

Java GeoTools read VRT file

I am trying to read a GDAL VRT file. I have included <!-- VRT Format (reader) --> <dependency> <groupId>org.geotools</groupId> <artifactId>gt-...