ceos-seo / data_cube_ui

Data Cube user interface allowing users to interact with the Data Cube and run sample analysis cases
http://ceos-cube.org/
Apache License 2.0
47 stars 51 forks source link

prepare dataset error #15

Open helyx-amcmillan opened 6 years ago

helyx-amcmillan commented 6 years ago

I downloaded the LE071950542015121201T1-SC20170427222707 scene linked from http://ec2-52-201-154-0.compute-1.amazonaws.com/datacube/data/LE071950542015121201T1-SC20170427222707.tar.gz

I believe this is a collection 1 dataset. I added the ls7_collections_sr_scene yaml file to the dataset types in the datacube as per the instructions. I then ran the usgs_ls_ard_prepare.py script:

'Collection 1 Higher level data uses usgs_ls_ard_prepare.py'

and it comes up with the error:

File "usgs_ls_ard_prepare.py", line 105, in valid_region geom = shapely.affinity.affine_transform(geom, (transform.a, transform.b, transform.d, transform.e, transform.xoff, AttributeError: 'list' object has no attribute 'a'

Someone on Slack suggested this was because the 'usgs_ls_ard_prepare.py' script is only for pre collection data. Is this right? Or do I have some other bug?

Thanks

ikselven commented 6 years ago

This seems to come from some API changes in rasterio. If you are using a version of rasterio < 1.0, changing this line in the prepare script to:

transform = ds.affine

should help.