[gdal-dev] Get Metadata from VRT file, store 4D Dataset into VRT
even.rouault at spatialys.com
Thu Jul 14 06:47:37 PDT 2016
> 1st Question: How can I get the metadata from each band e.g. the
> I tried the following:
> Unfortunately, there is not output, although /gdalinfo/ (outside python)
> provides all the metadata of the vrt file.
You can get the file list with ds.GetFileList()
And if you want to get the file below a given pixel, you can do, here for pixel
That will return something like :
> 2nd Question:
> Is there a way that I can add another dimension to the vrt file, for
> example by adding multiple products (jp2-files) to each virtual raster
> band, just like gdalbuildvrt does if the "-separate" keyword is not set?
Not sure to really understand what you mean, but the GDAL raster model is
limited to several bands of 2D raster, so "3D". You can emulate 4D by
flattening the extra dimensions.
But here it seems you want to do a spatial mosaic ? You could potentially do
gdalbuildvrt in default mode to mosaic the same bands of several products, and
then gdalbuildvrt -separate those mosaiced VRTs to make a multi band raster.
Spatialys - Geospatial professional services
More information about the gdal-dev