Skip to content

Commit

Permalink
make gdal dep optional
Browse files Browse the repository at this point in the history
  • Loading branch information
iboates committed Jan 18, 2025
1 parent b566a47 commit 2495ee0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions geo/Calculation_gdal.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
from osgeo import gdal # noqa
except ImportError:
import gdal # noqa
except ImportError:
raise ImportError("Package `gdal` is required to run this function. Install it with `pip install gdal`.")


def raster_value(path: str) -> dict:
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
pygments
requests
seaborn
gdal
matplotlib
xmltodict
xmltodic

0 comments on commit 2495ee0

Please sign in to comment.