OpenGeoscience / geonotebook

A Jupyter notebook extension for geospatial visualization and analysis
Apache License 2.0
1.08k stars 141 forks source link

'RasterDataCollection' object has no attribute 'crs' #148

Open dementiev opened 6 years ago

dementiev commented 6 years ago

When trying to execute last polygons time-series example from https://github.com/OpenGeoscience/geonotebook/blob/master/notebooks/04_Annotations.ipynb I got:


AttributeError Traceback (most recent call last)

in () 9 10 for p in M.layers.annotation.polygons: ---> 11 layer, data = next(p.data) 12 time, lat, lon = data.shape 13 ax.plot(data.reshape(time, lat * lon).mean(axis=1), /usr/local/lib/python2.7/dist-packages/geonotebook/annotations.pyc in data(self) 63 if getattr(layer, 'can_subset', False) and \ 64 hasattr(layer, "data") and layer.data is not None: ---> 65 yield layer, self.subset(layer.data, **self._kwargs) 66 67 /usr/local/lib/python2.7/dist-packages/geonotebook/annotations.pyc in subset(self, raster_data, **kwargs) 100 # Convert the image corner coordinates to WGS84 101 trgt_srs = CRS.from_string("EPSG:4326") --> 102 src_srs = raster_data.crs 103 transformed = [transform_coordinates(src_srs, trgt_srs, [i[0]], [i[1]]) 104 for i in raster_data.shape.exterior.coords] AttributeError: 'RasterDataCollection' object has no attribute 'crs'