Skip to content

New CWL Application Package - Visualisation #155

@james-hinton

Description

@james-hinton

A new application package that generates an NDVI PNG from a Sentinel-2 STAC item. Similar to https://github.com/EOEPCA/deployment-guide/blob/main/scripts/processing/oapip/examples/app-water-bodies-cloud-native.1.5.0.cwl but simpler.

Inputs

  • stac_item (string) - URL to a Sentinel-2 STAC Item from Earth Search
  • aoi (string, optional) - Bounding box as minx,miny,maxx,maxy in EPSG:4326

Output

  • PNG showing NDVI with a colour ramp
  • STAC Catalog for the output

Example

{
  "inputs": {
    "stac_item": "https://earth-search.aws.element84.com/v1/collections/sentinel-2-l2a/items/S2A_34SEG_20240721_0_L2A",
    "aoi": "21.0,37.0,21.5,37.5"
  }
}

Use the water bodies CWL as a starting point, the existing tools can be reused:

  • crop - ghcr.io/terradue/ogc-eo-application-package-hands-on/crop:1.5.0
  • norm_diff - ghcr.io/terradue/ogc-eo-application-package-hands-on/norm_diff:1.5.0 (this is generic, works for NDVI with nir and red bands)
  • stac - ghcr.io/terradue/ogc-eo-application-package-hands-on/stac:1.5.0

NDVI calculation: grab the nir (B08) and red (B04) assets from the STAC item, then calculate (nir - red) / (nir + red).

What needs creating

  1. visualise tool - Python script that takes an NDVI GeoTIFF, applies a colour ramp, outputs PNG
  2. Dockerfile for the visualise tool
  3. CWL workflow tying it all together (based on water-bodies structure but without the Otsu step, adding visualise instead)

Reference

Done when

  • CWL workflow file that orchestrates the steps
  • Python script for the visualise tool
  • Dockerfile for the visualise tool

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions