[PROJ] Disable .local in 7.0.0RC default search paths
Roger Bivand
Roger.Bivand at nhh.no
Sun Feb 23 06:12:49 PST 2020
Hi,
Trying out the RC with R package rgdal (Fedora 31), I see
proj_info().searchpath returning:
"/home/rsb/.local/share/proj:/usr/local/share/proj:/usr/local/share/proj"
Where in the documentation or code is the recipe for disabling the
creation of and writing of cache.db to .local/share/proj? No R package is
permitted to write anything without positive user confirmation to anywhere
other than R's per-session temporary directory.
Consequently, I must be able to prevent PROJ making assumptions about the
preferred directory location (if any at all) before the user has had the
opportunity to intervene.
I do not think an environment variable is enough, if that was going to be
the answer, I think software using PROJ has to be able to control this
from the C API (is there a list of environment variables in the
documentation?).
All I can see is unconditional code in src/filemanager.cpp from line 1185,
pj_context_get_user_writable_directory(), which only takes the context and
a boolean set defauly TRUE I think. This function seems to be called by
pj_open_lib_internal() - the code in rgdal calles none of these
explicitly. All that happens when rgdal loads into R is that
proj_info().searchpath is called, which presumably provokes a cascade of
consequences over which there is no obvious control. Please DO NOT release
7.0.0 until there is clear guidance on how to stop this.
I have been running against PROJ master for some time, but had not noticed
this - for us - regression; maybe I hadn't pulled recently enough after
RC4 was merged. 7.0.0 is unusable for R unless there is full control over
the creation of any directories in locations not given by the calling
program.
The .local/share/proj directory name (or equivalents on other OS) needs to
be proposed to the calling program with an indication of whether it was
populated before or needs to be created. Obviously, if other applications
are using it, a user of R may choose to use it themselves, but we should
not force their choice.
Best wishes,
Roger
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: Roger.Bivand at nhh.no
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
More information about the PROJ
mailing list