I have s3 private bucket which contains .tif files. Now, I need to create STAC file like the following:

My goal is to index file (in Open Data Cube) with the stac-to-dc method.

How can I create this .json file?

1 Answer 1


Great question. The easiest way to do this is using RIO STAC, which was developed by the magnificent Vincent Sarago. I use it programmatically (from Python).

Make sure you enable the Projection extension, but other than that, that's all you need to do.

Here's some code that does it.

And example is this:

    item = create_stac_item(
        input_datetime=datetime(2021, 12, 25),
            "odc:product": "not_required_but_useful_for_odc"
  • Thank you Alex! I will try!
    – Cormogolov
    Commented Feb 10, 2022 at 22:26

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.