Skip to content

Commit

Permalink
Merge pull request #49 from ESA-PhiLab/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
BuddyVolly authored Sep 17, 2021
2 parents 73ee19c + 4ff7b48 commit d3a43f3
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 29 deletions.
7 changes: 4 additions & 3 deletions ost/generic/ard_to_ts.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
try:
import gdal
except ModuleNotFoundError as e:
from osgeo import gdal
except ModuleNotFoundError as e:
raise e
try:
from osgeo import gdal
except ModuleNotFoundError:
raise e

from ost.generic.common_wrappers import create_stack, mt_speckle_filter
from ost.helpers import raster as ras, helpers as h
Expand Down
7 changes: 4 additions & 3 deletions ost/generic/mosaic.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
try:
import gdal
except ModuleNotFoundError as e:
from osgeo import gdal
except ModuleNotFoundError as e:
raise e
try:
from osgeo import gdal
except ModuleNotFoundError:
raise e

from ost.helpers import vector as vec
from ost.helpers import helpers as h
Expand Down
2 changes: 1 addition & 1 deletion ost/generic/ts_ls_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
except ModuleNotFoundError:
raise e

from ost.helpers import raster as ras, vector as vec
from ost.helpers import vector as vec

logger = logging.getLogger(__name__)

Expand Down
7 changes: 4 additions & 3 deletions ost/helpers/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
try:
import ogr
except ModuleNotFoundError as e:
from osgeo import ogr
except ModuleNotFoundError as e:
raise e
try:
from osgeo import ogr
except ModuleNotFoundError:
raise e

from ost.helpers.vector import get_proj4, reproject_geometry

Expand Down
8 changes: 4 additions & 4 deletions ost/helpers/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
try:
import gdal
except ModuleNotFoundError as e:
from osgeo import gdal
except ModuleNotFoundError as e:
raise e

try:
from osgeo import gdal
except ModuleNotFoundError:
raise e

logger = logging.getLogger(__name__)

Expand Down
7 changes: 4 additions & 3 deletions ost/helpers/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
try:
import gdal
except ModuleNotFoundError as e:
from osgeo import gdal
except ModuleNotFoundError as e:
raise e
try:
from osgeo import gdal
except ModuleNotFoundError:
raise e

import fiona
import imageio
Expand Down
11 changes: 9 additions & 2 deletions ost/helpers/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@
from functools import partial
from pathlib import Path

import osr
import warnings
import pyproj
import geopandas as gpd
import logging

# osgeo safe imports
try:
import osr
except ModuleNotFoundError as e:
try:
from osgeo import osr
except ModuleNotFoundError:
raise e

try:
import ogr
except ModuleNotFoundError as e:
Expand Down
20 changes: 10 additions & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
descartes
fiona>=1.8
gdal>=3
fiona
gdal>=2
godale
geopandas>=0.8
jupyterlab>=1.2
jupyterlab
matplotlib
numpy>=1.19
pandas>=1.1
numpy
pandas
psycopg2-binary
rasterio>=1.1
requests>=2.2
scipy>=1.5
rasterio
requests
scipy
shapely
tqdm>=4.51
tqdm
imageio
rtree>=0.9
rtree
retrying
pytest
pytest-cov
Expand Down

0 comments on commit d3a43f3

Please sign in to comment.