diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fee9d7d45c4dfce9369dcf25afebbb802b877ff9..7e9bfd30c188cc83b1946c8b60bebf09db03d050 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -62,7 +62,7 @@ test_geoarray_install: - conda config --set channel_priority strict # otherwise gdal or libgdal may be installed from defaults channel # resolve some requirements with conda - - conda install --yes -q -c conda-forge numpy scikit-image matplotlib geopandas gdal rasterio pyproj basemap shapely + - conda install --yes -q -c conda-forge numpy scikit-image matplotlib geopandas gdal pyproj basemap shapely # run installer - python setup.py install diff --git a/README.rst b/README.rst index d3f4b74925132149c5d12374fc5f3e55bfa4452f..681c1e3f53f6c3439c3cafbc232fa58f20e92ba4 100644 --- a/README.rst +++ b/README.rst @@ -62,7 +62,7 @@ Using conda_, the recommended approach is: # create virtual environment for geoarray, this is optional conda create -y -q --name geoarray python=3 source activate geoarray - conda install -y -q -c conda-forge numpy gdal scikit-image matplotlib pandas rasterio pyproj basemap shapely geopandas + conda install -y -q -c conda-forge numpy gdal scikit-image matplotlib pandas pyproj basemap shapely geopandas conda install --yes -c ioam bokeh holoviews # optional diff --git a/geoarray/baseclasses.py b/geoarray/baseclasses.py index 6d414beb0ef09c4d9059cf88b037ef1c140b033d..c71b2041133b81e6674afe7029cc66873602b316 100644 --- a/geoarray/baseclasses.py +++ b/geoarray/baseclasses.py @@ -532,12 +532,12 @@ class GeoArray(object): @property def metadata(self): """ - Returns a GeoDataFrame containing all available metadata (read from file if available). + Returns a DataFrame containing all available metadata (read from file if available). Use 'metadata[band_index].to_dict()' to get a metadata dictionary for a specific band. Use 'metadata.loc[row_name].to_dict()' to get all metadata values of the same key for all bands as dictionary. Use 'metadata.loc[row_name, band_index] = value' to set a new value. - :return: geopandas.GeoDataFrame + :return: pandas.DataFrame """ if self._metadata is not None: diff --git a/geoarray/metadata.py b/geoarray/metadata.py index dd58b72522724a9c19e081ae7b6f5017b41d81c8..0fec72d3a759099cc74c3fd15d79fd8f62355a0b 100644 --- a/geoarray/metadata.py +++ b/geoarray/metadata.py @@ -27,7 +27,7 @@ from copy import deepcopy from typing import Union # noqa F401 # flake8 issue from collections import OrderedDict -from geopandas import GeoDataFrame, GeoSeries +from pandas import DataFrame, Series import numpy as np try: from osgeo import gdal @@ -70,15 +70,15 @@ class GDAL_Metadata(object): return GDAL_Metadata(filePath=filePath) def to_DataFrame(self): - df = GeoDataFrame(columns=range(self.bands)) + df = DataFrame(columns=range(self.bands)) # add global meta for k, v in self.global_meta.items(): - df.loc[k] = GeoSeries(dict(zip(df.columns, [v] * len(df.columns)))) + df.loc[k] = Series(dict(zip(df.columns, [v] * len(df.columns)))) # add band meta for k, v in self.band_meta.items(): - df.loc[k] = GeoSeries(dict(zip(df.columns, v))) + df.loc[k] = Series(dict(zip(df.columns, v))) return df diff --git a/requirements.txt b/requirements.txt index 42dd65aaba990d2ccc82a3873eba9112ec13e542..0ddd5aca2a47656fec8a99645d7ade1bb135a8ac 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,9 @@ -py_tools_ds>=0.10.0 +py_tools_ds>=0.14.25 numpy matplotlib six gdal shapely -geopandas pandas dill mpld3 diff --git a/requirements_pip.txt b/requirements_pip.txt index d1b9d57e66c99710bbf93c1b4ca4e16c2b7b22af..f762aecf64e431232801f67488ac8217c77bbf6b 100644 --- a/requirements_pip.txt +++ b/requirements_pip.txt @@ -1,5 +1,4 @@ six -geopandas dill mpld3 geojson diff --git a/setup.py b/setup.py index 8ab26a0623e40a4601f06e097d76c57cda9a29d2..82277ea2c3879f45b04d553df7167a01348f699e 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ with open("geoarray/version.py") as version_file: exec(version_file.read(), version) requirements = [ - 'py_tools_ds>=0.10.0', 'numpy', 'matplotlib', 'six', 'gdal', 'shapely', 'geopandas', 'pandas', 'dill', 'mpld3', + 'py_tools_ds>=0.14.25', 'numpy', 'matplotlib', 'six', 'gdal', 'shapely', 'pandas', 'dill', 'mpld3', 'geojson', 'folium', 'scikit-image', 'dask>=0.15.0' # dask is only indirectly needed but updating to >=0.15.0 resolves https://stackoverflow.com/questions/43833081/ # attributeerror-module-object-has-no-attribute-computation diff --git a/tests/CI_docker/context/environment_geoarray.yml b/tests/CI_docker/context/environment_geoarray.yml index ed95b87a1d0663f2ab8ffe07b388016ca3a94395..6510cd425fb1d6da644b03e5997887265e674bad 100644 --- a/tests/CI_docker/context/environment_geoarray.yml +++ b/tests/CI_docker/context/environment_geoarray.yml @@ -7,22 +7,20 @@ channels: &id1 dependencies: - python=3.*.* - pip # avoids that conda uses the wrong pip - - pyqt - numpy - gdal - conda-forge::libgdal # force to use conda-forge for libgdal to avoid package version incompatiblies due to mixed channels - scikit-image - - rasterio - - pyproj - - lxml - - geopandas - - ipython - matplotlib - basemap - shapely - holoviews - bokeh + # py_tools_ds + - geopandas + - pyproj + - pip: - dicttoxml - jsmin @@ -44,7 +42,7 @@ dependencies: - nose-htmloutput - coverage - rednose - - py_tools_ds>=0.10.0 + - py_tools_ds>=0.14.25 - pandas - dill - geojson