Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [vrt]

GDAL Virtual Dataset (XML based)

0
votes
1answer
33 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
21 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
19 views

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

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
39 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
48 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
66 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
32 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
46 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
110 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....
0
votes
0answers
24 views

Waiting for tif processing to read it

I'm writing a script where many little tif-files are generated, then converted to vrt and merged to a tif to finish. Here is the code: rasters = glob.glob('/{0}/ndvi_clip/{1}*.tiff'.format(path, ...
1
vote
0answers
33 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 ...
1
vote
1answer
123 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 ...
0
votes
0answers
82 views

Creating a GDAL VRT for array stored in HDF5 (python bindings)

I'm trying to create a VRT for an array stored in an HDF dataset. The attributes of the array contain the geotransform and geoprojection information I need. After pulling out these information, is it ...
1
vote
0answers
128 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 ...
1
vote
0answers
43 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
72 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
94 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
134 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
166 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
121 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
108 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. ...
5
votes
1answer
197 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
226 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
131 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
146 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"...
0
votes
0answers
314 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 ...
1
vote
1answer
1k 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 ...
0
votes
1answer
243 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
809 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 ...
1
vote
0answers
110 views

reprojecting a tif file

I have a tif file whose gdalinfo provides the above displayed information which is geographically projected and I have to assign Mercator 2SP projection to it. So I created lat.vrt, lon.vrt and data....
3
votes
0answers
114 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-...
0
votes
0answers
44 views

Getting error while assigning Geolocation to raster

I am using VIIRS imagery EDR dataset and trying to give Geolocation to Brightness Temperature layer by creating VRT files of Longitude, Latitude and Brightness Temperature layers given in HDF5 dataset....
1
vote
0answers
151 views

Not able to figure out what is wrong with geolocation or projection in upoaded raster

I am working on VIIRS SDR dataset. I had different layer of Brightness temperature, latitude and longitude in given .HDF5 dataset. Using reference from http://geoinformaticstutorial.blogspot.in/2014/...
1
vote
1answer
107 views

Getting ValueError while creating VRT using python

I am trying to create VRT file using python(GDAL). I am getting "ValueError: array larger than output file, or offset off edge". How to solve this error? Code written for the same is as follows. ...
1
vote
0answers
49 views

How to include long.vrt and lat.vrt into bt.vrt as x-dataset and y-dataset respectively, Using python?

I am using following code to create bt2.vrt file using python. import numpy as np import gdal from gdalconst import * import osr # Function to read the original file's projection: def GetGeoInfo(...
2
votes
1answer
538 views

Building virtual raster in QGIS?

I have attempted to build a virtual raster in QGIS to avoid working with several smaller mosaics. That ended up well, and I saved all of these individual files as tiff files. Now I am trying to save ...
1
vote
1answer
377 views

Reading Gdal VRT format

How can I read a gdal vrt file with GDALOpen function? I have a vrt file built with gdalbuildvrt and I want to read it using GDALOpen but It returns a null dataset, Is it even possible? In this code ...
2
votes
1answer
2k views

Python - gdal.Grid() correct use

Is there any good, complete API for the GDAL Python bindings? I am interpolating and rasterizing points with elevation data using the gdal.Grid() method; output = gdal.Grid('outcome.tif','newpoints....
7
votes
1answer
576 views

Gdal won't read geotiff in parallel, but will read it in serial, and will read virtual raster in parallel. Why?

My algorithm takes a global dataset at 30m resolution, breaks it up into pieces, analyzes the pieces somehow, and writes the analyzed piece to disk. As all the pieces are independent, this is ...
0
votes
2answers
117 views

Changing values of all rasters in VRT file

I am using MODIS data and have around 350 rasters. I have made "virtual rasters" containing them and I am wondering is there any way to change value of pixels of every raster inside virtual raster. ...
1
vote
1answer
225 views

Merge XYZ tilesets with different origins

So I have hit a snag. I wish to merge multiple XYZ tile sets together. Meaning I have multiple directories which contain tiles in the format /zoom/x/y.png. I tried just copy and pasting them in to ...
2
votes
0answers
101 views

Java GDAL Bindings: Write Out VRT File

I would like to use Java GDAL bindings to subset a GeoTIFF and write the result in VRT format. I have found several old posts, one of them states that this functionality is yet to be implemented in ...
0
votes
1answer
238 views

gdal2tiles Can Not Open Input File

I am using gdal2tiles to convert a vrt to tiles but getting the following message: ERROR 4: 'Depth (Max).vrt' not recognized as a supported file format. Usage: [.....] gdal2tiles.py: error: It ...
2
votes
0answers
134 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 ...
1
vote
0answers
847 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 ...
0
votes
1answer
114 views

Math function in VRT

I am using the following VRT to load a Excel sheet into QGIS and I would like to perform some functions on the inputs to create new fields. Is this possible? Ideally I would do pythagoras Field 10 ...
1
vote
0answers
291 views

QGIS - Automatically apply QML styles to Vector Layers within a VRT

I have created a VRT file that contains two vector files, one being made up of polygons, the other one points. My VRT file is as follows: <OGRVRTDataSource> <OGRVRTUnionLayer name="test"&...
3
votes
1answer
152 views

Is it possible to create VRTWarpedDataset with many sources using python and gdal?

I can easely create VRTWarpedDataset for one file. import gdal,osr in_ds = gdal.Open('/path/to/input',gdal.GA_ReadOnly) out_drv = gdal.GetDriverByName('VRT') prj = in_ds.GetProjection() sr = osr....
3
votes
0answers
2k views

K-Means clustering in QGIS (Attribute based clustering)

In the 2.18.4 and 2.18.5 version of QGIS K-means clustering was moved to a plugin called 'Attribute based clustering'. However, I am working with a virtual raster dataset (vrt.) and the current ...
5
votes
1answer
239 views

Sampling values from a .vrt raster using PostGIS points

I have about 1 mill 2D points in a table in a PostgreSQL database. I also have a DEM (Digital Elevation Model) in raster. It’s a lot of .tiff files, bound together by a .vrt file, so they function as ...