Difference between revisions of "Introduction to Vegetation Burn Mapping using Open Data Cube"

From CUOSGwiki
Jump to navigationJump to search
Line 43: Line 43:
   
 
At the end your "cube-in-a-box-master/notebooks" folder should look like figure two.
 
At the end your "cube-in-a-box-master/notebooks" folder should look like figure two.
<gallery widths=680px heights=780px mode="traditional">
+
<gallery widths=680px heights=280px mode="traditional">
 
Image:Final Folder Location.png|Figure 2: Final location of moved folders and files.
 
Image:Final Folder Location.png|Figure 2: Final location of moved folders and files.
 
</gallery>
 
</gallery>

Revision as of 21:15, 23 December 2020

Introduction to Open Data Cube

In this tutorial the main software framework used is called Open Data Cube (ODC), and who’s primary function is to make geospatial data management and performing analysis with large amounts of satellite data easier. It offers a complete system for ingesting, managing, and analyzing a wide variety of gridded data through a combination of many python libraries and a PostgreSQL database. It is extremely flexible in that it offers several cloud and local deployment options, can work with multispectral imagery to elevation models and interpolated surfaces and a multitude of ways to interface with the software. This tutorial will be using Jupyter Notebooks to work with ODC, but a web GUI is also available. A great way to think about ODC is like your own personal, open-source Google Earth Engine. However, unlike Google Earth Engine you are in control over the geospatial data and code you create. If you would like to learn more about the ODC framework you can check out the official website here.

Installation Instructions

At first the installation and configuration process for ODC can appear daunting and complex with several dependencies and a long configuration procedure. It is possible to use ODC on Windows, Linux, or Max, however I find it has the most support and is easiest on Ubuntu. To greatly simplify the installation process ODC has created something called “Cube in a Box”. This is an easy-to-use Docker image that will provide us with a pre-configured reference installation of ODC. Docker uses containerization to package software into units that can be run on most computing environments. More information about Docker and containers can be found here.

Installing Docker

The first step in the installation process will be to install docker. This tutorial is designed for Ubuntu 20.04 but will likely work on other Linux versions.

To install docker run the following command in a new terminal window:

sudo apt-get install docker-compose

And select yes to install any dependencies.

Downloading ODC and Helper Scripts

In this section the Open Data Cube "Cube in a Box" docker configuration will be downloaded from GitHub. Feel free to use the "wget" or "git clone" commands to simplify this process if you undertand how.

Go to: https://github.com/opendatacube/cube-in-a-box and download the all the code using the "Download ZIP" button shown in figure one.

Unzip these files to a desired location in Ubuntu. I chose the downloads folder. This tutorial takes advantage of a number of helper scripts and a code example from Digital Earth Africa.

Go to: https://github.com/digitalearthafrica/deafrica-sandbox-notebooks And using the previous download instructions grab the all the code.

Next, move the Scripts folder inside the previous cube-in-a-box Notebooks folder. For me I placed Scripts inside /home/admind/Downloads/cube-in-a-box-master/notebooks. Then place the Burnt_area_mapping.ipynb file from the Real_world_examples folder inside deafrica-sandbox-notebooks to the same location as before. This would be /home/admind/Downloads/cube-in-a-box-master/notebooks for me.

The last file is called stac_api_to_dc.py and can be found at: https://raw.githubusercontent.com/opendatacube/odc-tools/develop/apps/dc_tools/odc/apps/dc_tools/stac_api_to_dc.py Place this file inside the Scripts folder you just moved. For me this is now /home/admind/Downloads/cube-in-a-box-master/notebooks/Scripts.

At the end your "cube-in-a-box-master/notebooks" folder should look like figure two.

And have 13 python files in the Scripts folder and the 3 .ipynb files in the Notebooks folder.

Configuring Docker

H

Performing Vegetation Burn Mapping

H

Importing Geospatial Data

H

Performing Analysis

H

Potential Errors

  • If you receive an error during package installation like “Hash Sum Mismatch” then make sure you are using the latest version of Oracle VirtualBox. Version 6.1.16 fixes this bug.
  • Ambiguous docker errors including “Cannot Connect to daemon” can be resolved by inserting “sudo” infront of the command you are trying to run.
  • If you encounter the following error in figure nine when running scripts in Jupyter Notebooks then you must confirm the entire installation process has been followed.

Sources and Additional Resources

PASTE HERE