Commit 9d7f604f authored by Daniel Scheffler's avatar Daniel Scheffler

The geopandas dependency is not needed anymore. Updated conda environment....

The geopandas dependency is not needed anymore. Updated conda environment. Updated minimal version of py_tools_ds.
Signed-off-by: Daniel Scheffler's avatarDaniel Scheffler <danschef@gfz-potsdam.de>
parent 66458217
Pipeline #5532 passed with stages
in 7 minutes and 37 seconds
......@@ -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
......
......@@ -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
......
......@@ -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:
......
......@@ -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
......
six
geopandas
dill
mpld3
geojson
......
......@@ -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
......
......@@ -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
......
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