IndigoWizard / NDVI-Viewer

Monitor Vegetation Health by Viewing & Comparing NDVI Values & Satellite Images On The Fly!
https://ndvi-viewer.streamlit.app/
16 stars 6 forks source link

Deployement #12

Closed IndigoWizard closed 1 year ago

IndigoWizard commented 1 year ago
IndigoWizard commented 1 year ago

Authentication

It seems that the usual Earth Engine authentication and initialization method don't work with streamlit and throw errors. I found that using geemap instead for the auth method works, according to the discussion in this issue https://github.com/gee-community/geemap/discussions/822#discussioncomment-3357617 :

Do not use ee.Authenticate() or ee.Initialize() with streamlit. It will fail. Instead, set EARTHENGINE_TOKEN as an environment variable, then use geemap.ee_initialize() to geemap.Map(), which will read the environment variable and create the credentials file in the Streamlit Cloud.