Open Data Cube Query plugin¶
A QGIS 3 processing plugin to query and return data from an Open Data Cube instance.
Installation¶
Australian NCI users¶
The plugin is installed in a QGIS environment on the NCI. See the DEA documentation for more details
Prerequisites¶
- QGIS 3
- datacube-core python package
- A populated and running local Open Data Cube instance [1]
Linux¶
Installation with pip:
Install QGIS 3 via your distribution package manager
Install the datacube-core package which will also install the required dependencies
$ pip3 install datacube
Installation with conda:
Install miniconda if you haven’t already
Create a QGIS + Data Cube environment
$ conda create -c conda-forge -n qgiscube python=3.6 qgis=3 datacube $ source activate qgiscube $ qgis
Windows¶
Installation with OSGeo4W
Run osgeo4w-setup-x86_64.exe and select Advanced install
Install QGIS 3.x from the Desktop section.
Download the appropriate rasterio wheel from the Unofficial Windows Binaries for Python Extension Packages site
Open an OSGeo4W shell and
C:\> pip3 install <path to download folder>\rasterio-1.0a12-cp36-cp36m-win_amd64.whl C:\> pip3 install datacube
Note: You may need to install updated GDAL, numpy and pandas from the above site.
Settings¶
The plugin can be configured through the QGIS Settings | Options… menu in the Processing | Providers | Open Data Cube section.
Open Data Cube database config file¶
Type: | File path |
---|---|
Notes: | Path to an Open Data Cube config file. If not set, the Open Data Cube library will look for a config file in some default locations. |
Maximum datasets to load in a query¶
Type: | Integer |
---|---|
Notes: | The plugin can and will load every available dataset that matches your query. This can cause memory issues and will certainly be slow for large numbers of datasets. If a query will return data from more than the maximum specified in this settings, the query will not execute and a message will be displayed. |
Default: | 500 |
Build GeoTiff Overviews¶
Type: | Checkbox |
---|---|
Notes: | If checked, the plugin will build overviews/pyramids for the returned data to speed up rendering. |
Default: | checked |
GeoTiff Creation Options¶
Type: | JSON |
---|---|
Notes: | A valid JSON string that contains rasterio
creation options. |
Default: | {"driver": "GTiff", "interleave": "band", "tiled": true, "blockxsize": 256, "blockysize": 256, "compress": "lzw", "predictor": 1, "tfw": false, "jpeg_quality": 75, "profile": "GDALGeoTIFF", "bigtiff": "IF_NEEDED", "geotiff_keys_flavor": "STANDARD", "photometric": "RGBA"} |
Algorithms¶
Data Cube Query¶
A QGIS 3 processing plugin to query and return data in GeoTIFF format from an Open Data Cube.
Parameters¶
Products and measurements
[selection]Select one or more products and/or individual product measurements.
If the algorithm can’t connect to a running Data Cube instance, this list will be empty and the warning message “Unable to connect to a running Data Cube instance” will be displayed.
Date range
[date] (Optional)- Restrict query by start and end date.
Query extent (xmin, xmax, ymin, ymax)
[extent]Restrict query to specified extent.
Click the […] button to the right of the parameter to select the extent from a layer/map canvas extent or by drawing a rectangle.
Output CRS
[crs] (Optional)Coordinate reference system for outputs
Default: Input Product CRS
Note: This parameter is required for products that do not have a CRS defined.Output pixel resolution
[number] (Optional)Output pixel resolution
Default: Input Product resolution
Note: This parameter is required for products that do not have a defined resolution.Group data by
[combobox]Observation grouping method. One of Solar Day or Time.
For EO-specific datasets that are based around scenes, the time dimension can be reduced to the day level, using solar day to keep scenes together.
Default: Solar Day
Outputs¶
Output directory
[directory]- The output directory.
Notes¶
If a selected product does not have a CRS or pixel resolution defined and you do not specify either, that product will be skipped when the algorithm is run and a warning message will be shown in the log.
If you specify an output CRS or resolution, this will be applied to all products you select, not just those that do not have a CRS or resolution defined.