[gdal-dev] PROJ context and threads

Andrew Bell andrew.bell.ia at gmail.com
Wed Apr 28 06:56:49 PDT 2021


On Wed, Apr 28, 2021 at 9:38 AM Even Rouault <even.rouault at spatialys.com>
wrote:

> We could have a OSRSetAutoclosePROJDatabase() global function that would
> call proj_context_set_autoclose_database() when it creates the per-thread
> PROJ context
>
> ==> ogr/ogr_proj_p.cpp
>
> An alternative would be to enhance PROJ to have a mode where the SQLite3
> db handle would be shared amongst several contexts. In theory that could be
> possible as you can invoke sqlite3_open_v2() with SQLITE_OPEN_FULLMUTEX.
> But would require non completely trivial changes.
>
Thanks. I can work around this issue for now.

Changes in GDAL might be nice, but I need to work with what's available
today. I could certainly PR the first suggestion if there is interest.
Perhaps I'm at the point where I should be using PROJ directly rather than
as wrapped by GDAL.

-- 
Andrew Bell
andrew.bell.ia at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210428/7492ea50/attachment.html>


More information about the gdal-dev mailing list