Using Fiona for reading my VRT file I'm receiving an error that OGR_VRT driver is not supported:

fiona.errors.DriverError: unsupported driver: 'OGR_VRT'

My test.vrt file looks like:

<?xml version="1.0" encoding="UTF-8"?>
    <OGRVRTLayer name="test">

I'm trying to read it using:

>>> import fiona
>>> c = fiona.open('abs_path/test.vrt')

How can Ogr VRT be read by Fiona?


1 Answer 1


Fiona only handles a subset GDAL’s supported drivers:

>>> fiona.supported_drivers
{'AeronavFAA': 'r', 'ARCGEN': 'r', 'BNA': 'raw', 'DXF': 'raw', 'OpenFileGDB': 'r', 'ESRI Shapefile': 'raw', 'GeoJSON': 'rw', 'GPKG': 'rw', 'GPX': 'raw', 'GPSTrackMaker': 'raw', 'Idrisi': 'r', 'MapInfo File': 'raw', 'DGN': 'raw', 'PCIDSK': 'r', 'SEGY': 'r', 'SUA': 'r'}

VRT files are format drivers - they’re used to create geographic datasets, reference geographic datasets, and even specify geometric changes to datasets. But VRT files are not geographic datasets themselves. They’re XML files!

Python’s standard library has plenty of support for processing XML files:

And there are some great 3rd party options too:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.