Skip to content

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

Description

@dementiev

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions