Commit 59475e3a authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Removed pykrige from automatically installed libraries during setup. It is now...

Removed pykrige from automatically installed libraries during setup. It is now optional (Fixes issue #12)
parent 25329ca0
Pipeline #673 passed with stages
in 1 minute and 19 seconds
......@@ -15,7 +15,6 @@ except ImportError:
import numpy as np
from matplotlib import pyplot as plt
from geopandas import GeoDataFrame, GeoSeries
from pykrige.ok import OrdinaryKriging
from shapely.geometry import Point
from skimage.measure import points_in_poly, ransac
from skimage.transform import AffineTransform, PolynomialTransform
......@@ -683,6 +682,7 @@ class Tie_Point_Grid(object):
# Reference: P.K. Kitanidis, Introduction to Geostatistcs: Applications in Hydrogeology,
# (Cambridge University Press, 1997) 272 p.
from pykrige.ok import OrdinaryKriging
OK = OrdinaryKriging(X_coords, Y_coords, ABS_SHIFT, variogram_model='spherical',verbose=False)
zvalues, sigmasq = OK.execute('grid', grid_x, grid_y)#,backend='C',)
......@@ -751,6 +751,7 @@ class Tie_Point_Grid(object):
# Reference: P.K. Kitanidis, Introduction to Geostatistcs: Applications in Hydrogeology,
# (Cambridge University Press, 1997) 272 p.
from pykrige.ok import OrdinaryKriging
OK = OrdinaryKriging(X_coords, Y_coords, ABS_SHIFT, variogram_model='spherical',verbose=False)
zvalues, sigmasq = OK.execute('grid', grid_x, grid_y,backend='C',n_closest_points=12)
......
......@@ -12,12 +12,12 @@ with open('README.rst') as readme_file:
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'numpy', 'gdal', 'shapely', 'scikit-image', 'matplotlib', 'geopandas', 'spectral', 'pykrige','geoarray',
'py_tools_ds', 'plotly'
# 'pyfftw', # conda install --yes -c conda-forge pyfftw=0.10.4 ; \
# 'basemap', # conda install --yes -c conda-forge basemap; \
]
requirements = ['numpy', 'gdal', 'shapely', 'scikit-image', 'matplotlib', 'geopandas', 'spectral','geoarray',
'py_tools_ds', 'plotly'
# 'pykrige' # conda install --yes -c conda-forge pykrige
# 'pyfftw', # conda install --yes -c conda-forge pyfftw=0.10.4 ; \
# 'basemap', # conda install --yes -c conda-forge basemap; \
]
setup_requirements = [
# TODO(danschef): put setup requirements (distutils extensions, etc.) here
......@@ -70,5 +70,12 @@ except ImportError:
try:
from mpl_toolkits.basemap import Basemap
except ImportError:
warnings.warn('You need to install basemap manually (see www./matplotlib.org/basemap) if you want to plot maps. '
warnings.warn('You need to install basemap manually if you want to plot maps (see www./matplotlib.org/basemap). '
'It is not automatically installed.') # TODO
# check for pykrige
try:
import pykrige
except ImportError:
warnings.warn('You need to install pykrige manually if you want to interpolate tie point grids produced by AROSICS '
'(see https://github.com/bsmurphy/PyKrige). It is not automatically installed.') # TODO
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment