-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OGR provider] Allow opening (GeoPackage) datasets with many layers
Currently each time you instanciate a QgsOgrProvider layer, a GDAL dataset is created. In the case of GeoPackage, this means a SQLite connection and a file handle. As GDAL enables Spatialite function on GeoPackage connections, we are bound to Spatialite limits, and Spatialite has a hard limit on a maximum of 64 simultaneous connections. Thus we cannot open more than 64 layers of the same GeoPackage. This commits enables sharing of the same GDALDataset object among several QgsOgrProvider object. Care is made to reuse a GDALDataset object only if the QgsOgrProvider do not point to the same layer. Mutexes are also taken to allow safe instanciation and use of QgsOgrProvider objects from multiple threads (but a same QgsOgrProvider should not be used by more than one thread at a time)
- Loading branch information
Showing
6 changed files
with
1,678 additions
and
527 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.