[gdal-dev] How to convert large VRT mosaics into STAC?

Even Rouault even.rouault at spatialys.com
Tue May 26 03:54:19 PDT 2026


Jukka,

for a given VRT, you can get the list of files it references with:

gdal info your.vrt --format json | jq -r ".files[1:][]"

(the [1:] skip the intial .vrt file)

and then use your favorite GDAL raster to STAC utility. I don't think 
the VRT holds enough metadata on each file to create a proper STAC item.

Even

Le 26/05/2026 à 11:38, Rahkonen Jukka via gdal-dev a écrit :
> Hi,
>
> We have large VRT mosaics and now we would like to experiment STAC with the same GeoTIFF source data. We do not do any on-the-fly data manipulation with these VRTs but they are used just as indexes.  If anybody can suggest ideas about a workflow that would start from the VRT and yield a STAC we would be interested in hearing.
>
> We would like to start from the VRT instead of just scanning the image directiories with some special STAC tools because there can be much more images in the directories than what we have selected into VRT. Thus the steps which would be needed are perhaps
>
> 1) Extract the distinct filenames from the VRT
> 2) For each file on the list, get the STAC item metadata. Preferably from the VRT file if it contains all metadata that is needed, but if not, then by making a query to each source file
> 3) Collect the STAC items into a catalogue
>
> Help with any step is appreciated. Probably a ready mady vrt2stac utility does not exist.
>
> -Jukka Rahkonen
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Very grumpy about LLMs: FOSS is about increasing public capital,
not becoming enslaved to private equity of giga corporations
--
http://www.spatialys.com
My software is free, but my time generally not.



More information about the gdal-dev mailing list