Resolves #1406 by giving each fiona.open() collection its own VSI plugin handler when the opener keyword argument is used. Works with threads.
The approach is not unlike the one mentioned in https://github.com/OSGeo/gdal/pull/8772 and benefits from the VSIRemovePluginHandler() function added in GDAL 3.9.0. With older versions of GDAL, the Pyopener registry will accumulate openers and GDAL will accumulate plugin handlers.
This PR also adds and uses Rasterio's chaining error handler and error stack checker.
Resolves #1406 by giving each
fiona.open()
collection its own VSI plugin handler when theopener
keyword argument is used. Works with threads.The approach is not unlike the one mentioned in https://github.com/OSGeo/gdal/pull/8772 and benefits from the
VSIRemovePluginHandler()
function added in GDAL 3.9.0. With older versions of GDAL, the Pyopener registry will accumulate openers and GDAL will accumulate plugin handlers.This PR also adds and uses Rasterio's chaining error handler and error stack checker.