Commit b677b5ff authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Bugfix for GeoArray.metadata.setter

- fix for not accepting instances of pandas.DataFrame

- updated __version__
parent 90586987
......@@ -15,7 +15,7 @@ __all__=[#'compatibility',
__version__ = '20170221_02'
__version__ = '20170223_01'
__author__='Daniel Scheffler'
# Validate GDAL version
......@@ -23,6 +23,7 @@ except ImportError:
import gdal
import gdalnumeric
from geopandas import GeoDataFrame, GeoSeries
from pandas import DataFrame
from ...geo.coord_calc import get_corner_coordinates, calc_FullDataset_corner_positions
......@@ -489,7 +490,7 @@ class GeoArray(object):
def metadata(self, GDF):
assert isinstance(GDF, GeoDataFrame) and len(GDF.columns)==self.bands, \
assert isinstance(GDF, (GeoDataFrame, DataFrame)) and len(GDF.columns)==self.bands, \
"%s.metadata can only be set with an instance of geopandas.GeoDataFrame of which the column number " \
"corresponds to the band number of %s." %(self.__class__.__name__, self.__class__.__name__)
self._metadata = GDF
Supports Markdown
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