Spaces:
Sleeping
Sleeping
Update Utils/convert_raster.py
Browse files- Utils/convert_raster.py +8 -1
Utils/convert_raster.py
CHANGED
|
@@ -1,8 +1,15 @@
|
|
| 1 |
-
|
| 2 |
import numpy as np
|
| 3 |
import os
|
| 4 |
import tempfile
|
| 5 |
from PIL import Image
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
def convert_gtiff_to_8bit(src):
|
| 8 |
dst = src
|
|
|
|
| 1 |
+
|
| 2 |
import numpy as np
|
| 3 |
import os
|
| 4 |
import tempfile
|
| 5 |
from PIL import Image
|
| 6 |
+
try:
|
| 7 |
+
from osgeo import gdal
|
| 8 |
+
st.write("GDAL successfully imported. Version:", gdal.__version__)
|
| 9 |
+
except ImportError as e:
|
| 10 |
+
st.write("Failed to import GDAL:", str(e))
|
| 11 |
+
st.write("Installed packages:")
|
| 12 |
+
st.write(os.popen("pip list").read())
|
| 13 |
|
| 14 |
def convert_gtiff_to_8bit(src):
|
| 15 |
dst = src
|