specifysystems / lmpy

A library of tools useful for Lifemapper and related computations
GNU General Public License v3.0
2 stars 0 forks source link

Docker fails when calling proj #208

Closed cjgrady closed 2 years ago

cjgrady commented 2 years ago

Describe the bug

Docker container is failing with "ERROR 1: PROJ: proj_create_from_database: Open of /usr/local/share/proj failed" when trying to set the epsg for an osr spatial reference.

To Reproduce

From python

from osgeo import osr
srs = osr.SpatialReference()
srs.ImportFromEPSG(4326)

ERROR 1: PROJ: proj_create_from_database: Open of /usr/local/share/proj failed 6

cjgrady commented 2 years ago

The problem stems from not having the PROJ_LIB environment variable set. Setting it manually bypasses the problem. I will add to the dockerfile.