Creating the Datasets Metadata
The records of datasets in the ODC-Core
catalog are made in the same way as the products: given a definition in YAML
file, it is possible to make the addition. In this case, stac2odc
offers a utility to map Harmonize Brazil-STAC items in datasets.
Note
Before executing the utility, it is necessary to understand that this process requires the Harmonize Brazil data repository; this is because the path to the data files is required during the datasets’ description. With this in mind, stac2odc
offers the option --download
, which allows you to download the data and then make its description. For this tutorial, this facility will be used.
To extract the metadata from the datasets, it is necessary to define the collection, the amount of data considered, and the options of unit
and instrument
presented previously:
sudo stac2odc item2dataset -c CB4_64_16D_STK-1 \
-o ~/products/CB4_64_16D_STK_1/datasets/ \
--units m \
-p CBERS4 \
--instrument WFI \
-m 3 \
--download \
--download-out /data \
--access-token Harmonize Brazil_ACCESS_TOKEN
The above command will download 03 items from the data cube CB4_64_16D_STK-1
, saved in the /data
directory. The descriptions of these items will be placed in the directory ~/products/CB4_64_16D_STK_1/datasets/
. The directory tree created in the /data
folder follows the same organization used in the Harmonize Brazil.
Note
Access to the data, done by the above command, depends on authentication to the Harmonize Brazil project services. Replace the value Harmonize Brazil_ACCESS_TOKEN
with your access key. If you do not have this key, it can be generated through the Harmonize Brazil Portal .