Skip to content

PROJ6/GDAL3 causing "Cannot find proj.db" error #78

Description

@mstrimas

I'm on Mac OS Mojave and recently updated to proj 6.2.1 and gdal 3.0.2 with homebrew, which resulted in the following error when calling runGdal():

runGdal(product = "MCD12Q1", collection = "006", SDSstring = "01", 
        extent = "austria",
        begin = "2010.01.01", end = "2011.12.31", 
        outDirPath = "data", job = "modis",
        MODISserverOrder = "LPDAAC")
ERROR 1: PROJ: pj_obj_create: Cannot find proj.db
ERROR 1: PROJ: createGeodeticReferenceFrame: Cannot find proj.db
ERROR 1: PROJ: createGeodeticReferenceFrame: Cannot find proj.db
ERROR 1: PROJ: proj_as_wkt: Cannot find proj.db
ERROR 1: PROJ: proj_create_from_wkt: Cannot find proj.db
ERROR 1: PROJ: proj_as_wkt: Cannot find proj.db
ERROR 1: PROJ: proj_create_from_wkt: Cannot find proj.db
ERROR 1: PROJ: pj_obj_create: Cannot find proj.db
ERROR 1: PROJ: createGeodeticReferenceFrame: Cannot find proj.db
ERROR 1: PROJ: createGeodeticReferenceFrame: Cannot find proj.db
ERROR 1: PROJ: proj_as_wkt: Cannot find proj.db
ERROR 1: PROJ: proj_create_from_wkt: Cannot find proj.db
ERROR 1: PROJ: proj_as_wkt: Cannot find proj.db
ERROR 1: PROJ: proj_create_from_wkt: Cannot find proj.db

A little Googling turned up that it's looking for proj.gb in the PROJ_LIB environment variable, which is getting set to "/Users/mes335/Library/R/3.6/library/rgdal/proj" when MODIS is loaded. Through dumb luck I found that if I just nuke that env variable (Sys.unsetenv("PROJ_LIB")) everything works fine. No idea what's going on here, but would be nice to not have to always unset PROJ_LIB.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions