[PROJ] PROJ without proj.db

Søren Holm sgh at sgh.dk
Tue Mar 9 23:37:57 PST 2021


I get this in stderr

pj_obj_create: Cannot find proj.db

Neither proj_log_level or proj_log_func makes any difference.

My code basically looks like this :

ctx = proj_context_create();
proj_log_level(ctx, PJ_LOG_NONE);
proj_log_func(ctx, nullptr, logger);
proj = proj_create(ctx, def);

But still proj_create(ctx, def) gives me that output. It is clear to me that 
for some reason loglevel and/or logfunction is overwritten  during 
proj_create. I that seems like unwanted behavior.

tirsdag den 9. marts 2021 22.05.33 CET skrev Kristian Evers:
> In what way is PROJ complaining? That is not clear to me from the setup you
> describe.
 
> /Kristian
> 
> 
> > On 9 Mar 2021, at 19:59, Søren Holm <sgh at sgh.dk> wrote:
> > 
> > Sure
> > 
> > To elaborate a bit.
> > 
> > My application in running on Android. That implies a couple of things.
> > 
> > 1. It is difficult to distribute static files - they are always placed in
> > a 
 compressed file and regular linux file io functions (that sqlite
> > uses) does not work on those.
> > 
> > 2. Given that I do not need the database, increasing my apk-size by 8MB is
> > 
 unnecessary.
> > 
> > So - I just need a way to have PROJ stop complaining about a database that
> > - 
 for my usecase - is not needed to resolved the initstring.
> > 
> > In all of this my assumption is that proj.db *MUST* be the file generated
> > for a 
 specific PROJ-version. Please correct me if I'm wrong about that
> > :) 
> > tirsdag den 9. marts 2021 19.42.49 CET skrev Kristian Evers:
> > 
> >>> What is the best way to avoid PROJ constantly
> >>> complaining about proj.db being missing ?
> >> 
> >> 
> >> By putting proj.db in $PROJ_LIB.
> >> 
> >> /Kristian
> > 
> > 
> > 
> > -- 
> > Søren Holm
> > 
> > 
> > _______________________________________________
> > PROJ mailing list
> > PROJ at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/proj
> 
> 


-- 
Søren Holm




More information about the PROJ mailing list