COG/STAC Generator with Docker
Overview
This is a generator that takes GeoTIFF data and a configuration JSON file as input and generates COG and STAC files compatible with the JAXA Earth Database for API.
How to Use the Generator
- Install Docker in your environment.
-
Download and unzip the generator package.
-
Change your current directory to the location of the
Dockerfile. - Run:
You can then execute main.py inside the Docker container to generate COG/STAC.
Description of Input Parameters
Parameters in main.py
| Parameter | Description |
|---|---|
root_local |
Location of COG/STAC output on your environment |
bucket |
Bucket name to be used |
ftype |
Fixed with "cog" |
version_path |
Fixed with "v1" |
version_full |
STAC version in JAXA Earth API |
Preparation of GeoTIFFs
Prepared GeoTIFFs must be placed under a date folder. The generator detects dates by folder name:
sample_geotiff/
├── 2020-01-01/
│ ├── sample_LST.tif
│ └── sample_LST_QA_flag.tif
└── 2020-01-09/
├── sample_LST.tif
└── sample_LST_QA_flag.tif
Supported date folder types:
| Date type | Example | Description |
|---|---|---|
| YYYY-MM-DD | 2022-01-01 | Daily, 8-day, half-monthly data |
| YYYY-MM | 2022-01 | Monthly data |
| YYYY | 2022 | Yearly data |
| DDD | 001, 365 | Daily normal data |
| MM-DD | 01-01, 12-31 | Half-monthly normal data |
| MM | 01, 12 | Monthly normal data |
Configuration Parameters in JSON
The JSON configuration file controls how GeoTIFF files are located and how the STAC file is generated.
Top-level parameters:
| Name | Description |
|---|---|
id |
Product ID |
description |
Description of the product |
title |
Title of the product |
keywords |
Keywords: platform, sensor, provider, etc. |
providers |
Providers information list (name, roles, url) |
license |
Fixed with "proprietary" |
extent |
Spatial and temporal extent |
duration |
Duration: 1D, 8D, HM, 1M, 1Y |
sci:publications |
Publication list |
summaries parameters:
| Name | Description |
|---|---|
platform |
Platform of product |
instrument |
Instrument/Sensor of product |
je:epsg |
EPSG: 4326 (EQR), 3995 (North pole), 3031 (South pole) |
je:stac_date_format |
Date format: YYYY-MM/DD, YYYY-MM, YYYY, DDD, MM-DD, MM |
je:cog_level_max |
Maximum COG level of product |
je:ppu_max |
Maximum PPU (Pixels Per Unit) of product |
je:stac_version |
STAC version of product |
assets / product parameters:
| Name | Description |
|---|---|
title |
Title of product |
roles |
data, data-mask, or visual |
classification:classes |
Class data of product |
source.path.dir |
GeoTIFF source directory |
source.path.wildcard |
Wildcard for searching GeoTIFF files |
source.path.layer_number |
Layer number in GeoTIFF files |
source.dn.data_type |
Data type: uint8, int8, uint16, int16, float32 |
source.dn.nodata |
Nodata value |
source.dn.error |
Error values |
source.dn2value |
Conversion parameters: slope, offset |
cog.value.def_interp |
Interpolation method: bilinear or nearest |
cog.value.unit |
Unit of product |
cog.dn.data_type |
Output COG data type |
cog.dn.min / .max |
Min/Max value in output COG |
cog.dn.nodata |
Nodata value in output COG |
cog.dn2value |
COG output conversion parameters: slope, offset |