Logo
  • Home

Tutorials

  • Overview
  • Your first custom-type input
  • GeoJSON
    • GeoJSON Point
    • GeoJSON Feature
  • OGC Bounding Box
  • STAC
    • STAC Catalog
    • STAC Collection
    • STAC Item
  • String formats
    • Datetime
    • URI
  • Experimental
    • Experimental Discovery Inputs
    • Experimental Process Inputs
      • CWL example
      • Input example
      • Execute the example

How-to guides

  • Overview
  • Use an existing schema
  • Define new types

Reference

  • Overview
  • GeoJSON
    • Types
    • Schema details
  • OGC API Processes
    • Types
    • Schema details
  • STAC
    • Types
    • Schema details
  • String formats
    • Types
    • Schema details

Explanation

  • Custom types and their limits
EOAP schemas
  • Tutorials
  • Experimental
  • Experimental Process Inputs
  • Edit on eoap/schemas

Experimental Process Inputs¶

CWL example¶

cwlVersion: v1.2
class: CommandLineTool
label: "geo API - Processes"
baseCommand: cat
requirements:
  - class: InlineJavascriptRequirement
  - class: SchemaDefRequirement
    types:
      - $import: https://raw.githubusercontent.com/eoap/schemas/main/string_format.yaml
      - $import: https://raw.githubusercontent.com/eoap/schemas/main/experimental/api-endpoint.yaml
      - $import: https://raw.githubusercontent.com/eoap/schemas/main/experimental/process.yaml
  - class: InitialWorkDirRequirement
    listing:
      - entryname: inputs.yaml
        entry: |-
          $(inputs.api_endpoint.url.value)
          ---
          $(inputs.execute_request.process_id)
          ---
          $(inputs.execute_request.inputs)
inputs:
  api_endpoint:
    type: https://raw.githubusercontent.com/eoap/schemas/main/experimental/api-endpoint.yaml#APIEndpoint
    label: "OGC API endpoint"
    doc: "OGC API endpoint for Landsat-9 data"
  execute_request:
    type: https://raw.githubusercontent.com/eoap/schemas/main/experimental/process.yaml#OGCExecuteProcessSettings
    label: "OGC API Processes settings"
    doc: "OGC API Processes settings for Landsat-9 data"
arguments:
  - inputs.yaml
outputs:
  echo_output:
    type: stdout
stdout: process-output.yaml

Input example¶


api_endpoint:
  url:
    value: https://planetarycomputer.microsoft.com/api/ogc/processes/v1
  headers: []
execute_request:
  process_id: "water-body-detection"
  inputs:
    item:
      class: "https://raw.githubusercontent.com/eoap/schemas/main/url.yaml#URL"
      value: "https://planetarycomputer.microsoft.com/api/stac/v1/collections/landsat-c2-l2/items/LC08_L2SP_042033_20231007_02_T1"
    aoi: "-118.985,38.432,-118.183,38.938"
    bands:
      - "green"
      - "nir08"
    epsg: "EPSG:4326"

Execute the example¶

Run the example with:

cwltool examples/experimental/process.cwl examples/experimental/process.yaml

This produces the output:

INFO /opt/hostedtoolcache/Python/3.12.14/x64/bin/cwltool 3.3.20260925135507
INFO Resolved '../../examples/experimental/process.cwl' to 'file:///home/runner/work/schemas/schemas/examples/experimental/process.cwl'
INFO [job process.cwl] /tmp/3m28985f$ cat \
    inputs.yaml > /tmp/3m28985f/process-output.yaml
INFO [job process.cwl] completed success
INFO Final process status is success

The content of the echo_output.txt file is:

https://planetarycomputer.microsoft.com/api/ogc/processes/v1
---
water-body-detection
---
{"aoi": "-118.985,38.432,-118.183,38.938", "bands": ["green", "nir08"], "epsg": "EPSG:4326", "item": {"class": "https://raw.githubusercontent.com/eoap/schemas/main/url.yaml#URL", "value": "https://planetarycomputer.microsoft.com/api/stac/v1/collections/landsat-c2-l2/items/LC08_L2SP_042033_20231007_02_T1"}}
Previous Next

Apache License, Version 2.0

Built with MkDocs using a theme provided by Read the Docs.
eoap/schemas « Previous Next »