Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,15 +15,15 @@ import fiona
|
|
15 |
fiona.drvsupport.supported_drivers['LIBKML'] = 'rw'
|
16 |
|
17 |
#Intialize EE library
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
# ee.Initialize()
|
23 |
-
|
24 |
-
ee.Authenticate()
|
25 |
ee.Initialize()
|
26 |
|
|
|
|
|
|
|
27 |
# Functions
|
28 |
def convert_to_2d_geometry(geom): #Handles Polygon Only
|
29 |
if geom is None:
|
|
|
15 |
fiona.drvsupport.supported_drivers['LIBKML'] = 'rw'
|
16 |
|
17 |
#Intialize EE library
|
18 |
+
ee_credentials = os.environ.get("EE")
|
19 |
+
os.makedirs(os.path.expanduser("~/.config/earthengine/"), exist_ok=True)
|
20 |
+
with open(os.path.expanduser("~/.config/earthengine/credentials"), "w") as f:
|
21 |
+
f.write(ee_credentials)
|
|
|
|
|
|
|
22 |
ee.Initialize()
|
23 |
|
24 |
+
# ee.Authenticate()
|
25 |
+
# ee.Initialize()
|
26 |
+
|
27 |
# Functions
|
28 |
def convert_to_2d_geometry(geom): #Handles Polygon Only
|
29 |
if geom is None:
|