I would like to learn how to access and manipulate satellite images from an Open Data Cube (ODC) using Python. I have tried to follow the instructions found in https://datacube-core.readthedocs.io/en/latest/user/intro.html. The first step (installation) went smoothly, but I got stuck in the second step (database setup). After downloading, installing, and executing the suggested PostgreSQL version, I wasn't able to type the necessary commands described in https://datacube-core.readthedocs.io/en/latest/ops/db_setup.html. Even copy-pasting the commands did not work. I am not sure of the reason behind this, and I would like to know if there is a simpler way to access an ODC and query data from it online (without setting up a local database and configuring an environment).

PostgreSQL window

2 Answers 2


I like to use Docker for local Open Data Cube installations. Here's a simple example of a minimal install for a Docker-based ODC environment.

For your question, can you please explain what command you've tried and what is the result? If you're creating the database on postgres, that should be run while connected to the DB. For the ODC components, you will need to install a Python environment and run the commands there. People often use Conda to do this.

  • 1st step (went well): conda config --add channels conda-forge // conda create --name cubeenv python=3.6 datacube // source activate cubeenv // activate cubeenv // conda install jupyter matplotlib scipy //// 2nd step: I needed to type (create role u12345 superuser login; create database datacube;) But for some reason the postgresql window did not read any of the words I typed
    – farhat
    Commented Aug 26, 2020 at 22:48
  • This is a basic question. But is there a way (i.e. python package) that allows the user to access images in a data cube and analyze data in a similar way to what can be done in Google Earth Engine?
    – farhat
    Commented Aug 26, 2020 at 22:58

A researcher with whom I shared a discussion answered my question. Basically, an ODC is a framework that allows a user to download, pre-process, index, and store imagery in an optimized way. Access to the resulting repository can then be provided to other users through an API (like in the case of: scihub.copernicus.eu).

So what I needed to do is query data from an API.

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.