developmentseed / geolambda

Create and deploy Geospatial AWS Lambda functions
MIT License
303 stars 85 forks source link

Problem with projections (EPSG), unable to read 'gcs.csv' #92

Closed ghost closed 3 years ago

ghost commented 4 years ago

Having this error in Logging: _Unable to open EPSG support file gcs.csv. Try setting the GDALDATA environment variable to point to the directory containing EPSG csv files.

Corresponding code parts:

# imports used for the example code below
import logging
from osgeo import gdal
from osgeo import ogr
from osgeo import osr
epsg_in = 4326
osr_in = osr.SpatialReference()
osr_in.ImportFromEPSG(epsg_in)

But if check the geolambda layer, I can find the gcs.csv file in share/gdal folder. Already tried with the setting of Environmental variable at Lambda function (key: GDAL_DATA, value: /usr/local/share/gdal) but nothing changed :S
What can be the reason of this? Any idea how to fix it?

Additional: Tried with these as well, didn't work: "GDAL_DATA": "/opt/share/gdal", "PROJ_LIB": "/opt/share/proj",

matthewhanson commented 3 years ago

@ewirth sorry this was never responded to this, this whole repo has gone unattended. But I'm working on some updates, did you ever resolve this? It seems like it should have been solved with the GDAL_DATA envvar.

MrSpark2591 commented 3 years ago

I am facing same issue any solution. I have set "GDAL_DATA": "/opt/share/gdal", "PROJ_LIB": "/opt/share/proj". But still getting the issue.

ghost commented 3 years ago

I guess the issue should not be closed... The problem still exist..