I'm trying to index a clipped version of ESA's 2015 land cover map into an Open Data Cube instance. I've written a product specification yaml and a yaml for te actual product itself and it indexes into the data cube fine. However, when I try to load the data later on using dc.load, it gives the following error:

~/miniconda3/envs/cubeenv/lib/python3.6/site-packages/datacube/api/core.py in <listcomp>(.0)
644 def get_bounds(datasets, crs):
--> 645     left = min([d.extent.to_crs(crs).boundingbox.left for d in datasets])
646     right = max([d.extent.to_crs(crs).boundingbox.right for d in datasets])
647     top = max([d.extent.to_crs(crs).boundingbox.top for d in datasets])
AttributeError: 'NoneType' object has no attribute 'to_crs'

This makes me thinks that it is an error with the yaml coordinate specifications as it isn't picking up any of the actual data at all when trying to define the bbox coordinates of the data. I can only think that this is because I'm trying to index data in EPSG:4326 coordinate system, as the yaml is basically identical to previous yamls which have worked, only those yamls involved indexing data in UTM coordinate systems.

Both the product specification and individual product yamls are attached.

Product specification link: https://slack-files.com/T0L4V0TFT-FGXRVUWUV-b4eea86062

Product yaml link: https://slack-files.com/T0L4V0TFT-FGYJ8N223-ebe40ec2b0

  • 1
    This is now working in my datacube instance - I will check over and see what I changed to get this working correctly.
    – JackLidge
    Apr 3, 2019 at 14:42
  • Please do update here with your solution, @jacklidge
    – Alex Leith
    Jun 7, 2019 at 23:58

1 Answer 1


The solution we used in the end was to adapt scripts used for creating the yamls for Sentinel/Landsat data which use Gdalinfo to create the yaml files. The updated product yaml is below, although it seems to have little different from the one linked in question.

The difference I suspect is that the product extents are to a far higher degree of precision, which come from actually reading data directly from the file rather than manually typing in the extents.

Product yaml:

  groundstation: {code: ESA}
creation_dt: '2019-06-04T13:04:05.49914'
    ll: {lat: 40.99999999999608, lon: 87.00000000002137}
    lr: {lat: 40.99999999999608, lon: 120.50000000002404}
    ul: {lat: 52.499999999997, lon: 87.00000000002137}
    ur: {lat: 52.499999999997, lon: 120.50000000002404}
  from_dt: '2015-01-01T00:00:01.00000'
  to_dt: '2015-12-31T23:59:59.00000'
format: {name: GTiff}
      ll: {x: 87.00000000002137, y: 40.99999999999608}
      lr: {x: 120.50000000002404, y: 40.99999999999608}
      ul: {x: 87.00000000002137, y: 52.499999999997}
      ur: {x: 120.50000000002404, y: 52.499999999997}
    spatial_reference: GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433],AUTHORITY["EPSG","4326"]]
id: 0f6d23d2-26e2-408c-ae3f-598f87d5a162
    land_cover: {layer: 1, path: /home/vxeos/data_input/landcover/ESACCI-LC-L4-LCCS-Map-300m-P1Y-2015-v2.0.7_MNG.tif}
instrument: {name: ESACCI-LC-L4}
  source_datasets: {}
platform: {code: ESACCI-LC}
product_type: land_cover_300m

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.