Essential Input Parameters¶
Essential Input Parameters refers to the 2.4.1. Essential Input Parameters paragraph of the 2.4. Inputs chapter of the Common Workflow Language User Guide
1. Parsing¶
In this sample we'll show the access from a remote public URL.
In [1]:
Copied!
from cwl_loader import load_cwl_from_location
from cwl2ogc import BaseCWLtypes2OGCConverter
cwl_document = load_cwl_from_location('https://raw.githubusercontent.com/eoap/cwl2ogc/refs/heads/develop/tests/artifacts/cwl-types/inp.cwl')
cwl_converter = BaseCWLtypes2OGCConverter(cwl_document)
from cwl_loader import load_cwl_from_location
from cwl2ogc import BaseCWLtypes2OGCConverter
cwl_document = load_cwl_from_location('https://raw.githubusercontent.com/eoap/cwl2ogc/refs/heads/develop/tests/artifacts/cwl-types/inp.cwl')
cwl_converter = BaseCWLtypes2OGCConverter(cwl_document)
2025-11-06 22:55:00.834 | DEBUG | cwl_loader:load_cwl_from_location:228 - Loading CWL document from https://raw.githubusercontent.com/eoap/cwl2ogc/refs/heads/develop/tests/artifacts/cwl-types/inp.cwl...
2025-11-06 22:55:00.987 | DEBUG | cwl_loader:_load_cwl_from_stream:231 - Reading stream from https://raw.githubusercontent.com/eoap/cwl2ogc/refs/heads/develop/tests/artifacts/cwl-types/inp.cwl...
2025-11-06 22:55:00.996 | DEBUG | cwl_loader:load_cwl_from_stream:203 - CWL data of type <class 'ruamel.yaml.comments.CommentedMap'> successfully loaded from stream
2025-11-06 22:55:00.997 | DEBUG | cwl_loader:load_cwl_from_yaml:143 - No needs to update the Raw CWL document since it targets already the v1.2
2025-11-06 22:55:00.997 | DEBUG | cwl_loader:load_cwl_from_yaml:145 - Parsing the raw CWL document to the CWL Utils DOM...
2025-11-06 22:55:01.204 | DEBUG | cwl_loader:load_cwl_from_yaml:158 - Raw CWL document successfully parsed to the CWL Utils DOM!
2025-11-06 22:55:01.204 | DEBUG | cwl_loader:load_cwl_from_yaml:160 - Dereferencing the steps[].run...
2025-11-06 22:55:01.205 | DEBUG | cwl_loader:load_cwl_from_yaml:167 - steps[].run successfully dereferenced! Dereferencing the FQNs...
2025-11-06 22:55:01.205 | DEBUG | cwl_loader:load_cwl_from_yaml:171 - CWL document successfully dereferenced! Now verifying steps[].run integrity...
2025-11-06 22:55:01.206 | DEBUG | cwl_loader:load_cwl_from_yaml:175 - All steps[].run link are resolvable!
2025-11-06 22:55:01.207 | DEBUG | cwl_loader:load_cwl_from_yaml:178 - Sorting Process instances by dependencies....
2025-11-06 22:55:01.208 | DEBUG | cwl_loader:load_cwl_from_yaml:180 - Sorting process is over.
2025-11-06 22:55:01.208 | DEBUG | cwl_loader:_load_cwl_from_stream:240 - Stream from https://raw.githubusercontent.com/eoap/cwl2ogc/refs/heads/develop/tests/artifacts/cwl-types/inp.cwl successfully load!
2. Inputs conversion¶
Once the document is parsed, invoke the cwl2ogc APIs to convert the CWL inputs to the OGC JSON format:
In [2]:
Copied!
import sys
cwl_converter.dump_inputs(stream=sys.stdout, pretty_print=True)
import sys
cwl_converter.dump_inputs(stream=sys.stdout, pretty_print=True)
{
"example_flag": {
"schema": {
"type": "boolean"
},
"metadata": [
{
"title": "cwl:type",
"value": "boolean"
}
],
"minOccurs": 1,
"maxOccurs": 1,
"valuePassing": "byValue",
"title": "example_flag label",
"description": "example_flag doc"
},
"example_string": {
"schema": {
"type": "string"
},
"metadata": [
{
"title": "cwl:type",
"value": "string"
}
],
"minOccurs": 1,
"maxOccurs": 1,
"valuePassing": "byValue",
"title": "example_string label",
"description": "example_string doc"
},
"example_int": {
"schema": {
"type": "integer",
"format": "int32"
},
"metadata": [
{
"title": "cwl:type",
"value": "int"
}
],
"minOccurs": 1,
"maxOccurs": 1,
"valuePassing": "byValue",
"title": "example_int label",
"description": "example_int doc"
},
"example_file": {
"schema": {
"nullable": true,
"oneOf": [
{
"type": "string",
"format": "uri"
},
{
"title": "STAC Item",
"description": "This object represents the metadata for an item in a SpatioTemporal Asset Catalog.",
"$id": "https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/item.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": [
"assets",
"geometry",
"id",
"links",
"properties",
"stac_version",
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Feature"
]
},
"properties": {
"title": "Basic Descriptive Fields",
"$id": "https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/basics.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"title": {
"title": "Item Title",
"description": "A human-readable title describing the Item.",
"type": "string"
},
"description": {
"title": "Item Description",
"description": "Detailed multi-line description to fully explain the Item.",
"type": "string"
},
"constellation": {
"title": "Constellation",
"type": "string"
},
"created": {
"title": "Creation Time",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"datetime": {
"title": "Date and Time",
"description": "The searchable date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": [
"string",
"null"
],
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"end_datetime": {
"title": "End Date and Time",
"description": "The searchable end date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"gsd": {
"title": "Ground Sample Distance",
"type": "number",
"exclusiveMinimum": 0
},
"instruments": {
"title": "Instruments",
"type": "array",
"items": {
"type": "string"
}
},
"license": {
"type": "string",
"pattern": "^[\\w\\-\\.\\+]+$"
},
"mission": {
"title": "Mission",
"type": "string"
},
"platform": {
"title": "Platform",
"type": "string"
},
"providers": {
"title": "Providers",
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"description": {
"title": "Organization description",
"type": "string"
},
"name": {
"title": "Organization name",
"type": "string",
"minLength": 1
},
"roles": {
"title": "Organization roles",
"type": "array",
"items": {
"type": "string",
"enum": [
"producer",
"licensor",
"processor",
"host"
]
}
},
"url": {
"title": "Organization homepage",
"type": "string",
"format": "iri"
}
}
}
},
"start_datetime": {
"title": "Start Date and Time",
"description": "The searchable start date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"updated": {
"title": "Last Update Time",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
}
},
"anyOf": [
{
"required": [
"datetime"
],
"properties": {
"datetime": {
"not": {
"anyOf": [
{
"type": "null"
}
]
}
}
}
},
{
"required": [
"datetime",
"start_datetime",
"end_datetime"
]
}
],
"dependencies": {
"end_datetime": {
"required": [
"start_datetime"
]
},
"start_datetime": {
"required": [
"end_datetime"
]
}
},
"oneOf": [
{
"type": "null"
},
{
"type": "object"
}
]
},
"assets": {
"title": "Asset links",
"description": "Links to assets",
"type": "object",
"additionalProperties": {
"title": "Basic Descriptive Fields",
"$id": "https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/basics.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": [
"href"
],
"properties": {
"title": {
"title": "Asset title",
"description": "A human-readable title describing the Item.",
"type": "string"
},
"description": {
"title": "Asset description",
"description": "Detailed multi-line description to fully explain the Item.",
"type": "string"
},
"type": {
"title": "Asset type",
"type": "string"
},
"constellation": {
"title": "Constellation",
"type": "string"
},
"created": {
"title": "Creation Time",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"datetime": {
"title": "Date and Time",
"description": "The searchable date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": [
"string",
"null"
],
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"end_datetime": {
"title": "End Date and Time",
"description": "The searchable end date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"gsd": {
"title": "Ground Sample Distance",
"type": "number",
"exclusiveMinimum": 0
},
"href": {
"title": "Asset reference",
"type": "string",
"format": "iri-reference",
"minLength": 1
},
"instruments": {
"title": "Instruments",
"type": "array",
"items": {
"type": "string"
}
},
"license": {
"type": "string",
"pattern": "^[\\w\\-\\.\\+]+$"
},
"mission": {
"title": "Mission",
"type": "string"
},
"platform": {
"title": "Platform",
"type": "string"
},
"providers": {
"title": "Providers",
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"description": {
"title": "Organization description",
"type": "string"
},
"name": {
"title": "Organization name",
"type": "string",
"minLength": 1
},
"roles": {
"title": "Organization roles",
"type": "array",
"items": {
"type": "string",
"enum": [
"producer",
"licensor",
"processor",
"host"
]
}
},
"url": {
"title": "Organization homepage",
"type": "string",
"format": "iri"
}
}
}
},
"roles": {
"title": "Asset roles",
"type": "array",
"items": {
"type": "string"
}
},
"start_datetime": {
"title": "Start Date and Time",
"description": "The searchable start date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"updated": {
"title": "Last Update Time",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
}
},
"dependencies": {
"end_datetime": {
"required": [
"start_datetime"
]
},
"start_datetime": {
"required": [
"end_datetime"
]
}
}
}
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"geometry": {
"oneOf": [
{
"type": "null"
},
{
"title": "GeoJSON Point",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Point"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
}
}
},
{
"title": "GeoJSON LineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"LineString"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 2
}
}
},
{
"title": "GeoJSON Polygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Polygon"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 4
}
}
}
},
{
"title": "GeoJSON MultiPoint",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPoint"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
}
}
}
},
{
"title": "GeoJSON MultiLineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiLineString"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 2
}
}
}
},
{
"title": "GeoJSON MultiPolygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPolygon"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 4
}
}
}
}
},
{
"title": "GeoJSON GeometryCollection",
"type": "object",
"required": [
"type",
"geometries"
],
"properties": {
"type": {
"type": "string",
"enum": [
"GeometryCollection"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"geometries": {
"type": "array",
"items": {
"oneOf": [
{
"title": "GeoJSON Point",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Point"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
}
}
},
{
"title": "GeoJSON LineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"LineString"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 2
}
}
},
{
"title": "GeoJSON Polygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Polygon"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 4
}
}
}
},
{
"title": "GeoJSON MultiPoint",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPoint"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
}
}
}
},
{
"title": "GeoJSON MultiLineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiLineString"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 2
}
}
}
},
{
"title": "GeoJSON MultiPolygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPolygon"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 4
}
}
}
}
}
]
}
}
}
}
]
},
"id": {
"title": "Provider ID",
"description": "Provider item ID",
"type": "string",
"minLength": 1,
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
"links": {
"title": "Item links",
"description": "Links to item relations",
"type": "array",
"items": {
"type": "object",
"required": [
"rel",
"href"
],
"properties": {
"title": {
"title": "Link title",
"type": "string"
},
"type": {
"title": "Link type",
"type": "string"
},
"href": {
"title": "Link reference",
"type": "string",
"format": "iri-reference",
"minLength": 1
},
"rel": {
"title": "Link relation type",
"type": "string",
"minLength": 1
}
}
}
},
"stac_extensions": {
"title": "STAC extensions",
"type": "array",
"items": {
"title": "Reference to a JSON Schema",
"type": "string",
"format": "iri"
},
"uniqueItems": true
},
"stac_version": {
"title": "STAC version",
"type": "string",
"const": "1.0.0"
}
},
"definitions": {
"asset": {
"title": "Basic Descriptive Fields",
"$id": "https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/basics.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": [
"href"
],
"properties": {
"title": {
"title": "Asset title",
"description": "A human-readable title describing the Item.",
"type": "string"
},
"description": {
"title": "Asset description",
"description": "Detailed multi-line description to fully explain the Item.",
"type": "string"
},
"type": {
"title": "Asset type",
"type": "string"
},
"constellation": {
"title": "Constellation",
"type": "string"
},
"created": {
"title": "Creation Time",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"datetime": {
"title": "Date and Time",
"description": "The searchable date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": [
"string",
"null"
],
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"end_datetime": {
"title": "End Date and Time",
"description": "The searchable end date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"gsd": {
"title": "Ground Sample Distance",
"type": "number",
"exclusiveMinimum": 0
},
"href": {
"title": "Asset reference",
"type": "string",
"format": "iri-reference",
"minLength": 1
},
"instruments": {
"title": "Instruments",
"type": "array",
"items": {
"type": "string"
}
},
"license": {
"type": "string",
"pattern": "^[\\w\\-\\.\\+]+$"
},
"mission": {
"title": "Mission",
"type": "string"
},
"platform": {
"title": "Platform",
"type": "string"
},
"providers": {
"title": "Providers",
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"description": {
"title": "Organization description",
"type": "string"
},
"name": {
"title": "Organization name",
"type": "string",
"minLength": 1
},
"roles": {
"title": "Organization roles",
"type": "array",
"items": {
"type": "string",
"enum": [
"producer",
"licensor",
"processor",
"host"
]
}
},
"url": {
"title": "Organization homepage",
"type": "string",
"format": "iri"
}
}
}
},
"roles": {
"title": "Asset roles",
"type": "array",
"items": {
"type": "string"
}
},
"start_datetime": {
"title": "Start Date and Time",
"description": "The searchable start date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"updated": {
"title": "Last Update Time",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
}
},
"dependencies": {
"end_datetime": {
"required": [
"start_datetime"
]
},
"start_datetime": {
"required": [
"end_datetime"
]
}
}
},
"assets": {
"title": "Asset links",
"description": "Links to assets",
"type": "object",
"additionalProperties": {
"title": "Basic Descriptive Fields",
"$id": "https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/basics.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": [
"href"
],
"properties": {
"title": {
"title": "Asset title",
"description": "A human-readable title describing the Item.",
"type": "string"
},
"description": {
"title": "Asset description",
"description": "Detailed multi-line description to fully explain the Item.",
"type": "string"
},
"type": {
"title": "Asset type",
"type": "string"
},
"constellation": {
"title": "Constellation",
"type": "string"
},
"created": {
"title": "Creation Time",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"datetime": {
"title": "Date and Time",
"description": "The searchable date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": [
"string",
"null"
],
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"end_datetime": {
"title": "End Date and Time",
"description": "The searchable end date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"gsd": {
"title": "Ground Sample Distance",
"type": "number",
"exclusiveMinimum": 0
},
"href": {
"title": "Asset reference",
"type": "string",
"format": "iri-reference",
"minLength": 1
},
"instruments": {
"title": "Instruments",
"type": "array",
"items": {
"type": "string"
}
},
"license": {
"type": "string",
"pattern": "^[\\w\\-\\.\\+]+$"
},
"mission": {
"title": "Mission",
"type": "string"
},
"platform": {
"title": "Platform",
"type": "string"
},
"providers": {
"title": "Providers",
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"description": {
"title": "Organization description",
"type": "string"
},
"name": {
"title": "Organization name",
"type": "string",
"minLength": 1
},
"roles": {
"title": "Organization roles",
"type": "array",
"items": {
"type": "string",
"enum": [
"producer",
"licensor",
"processor",
"host"
]
}
},
"url": {
"title": "Organization homepage",
"type": "string",
"format": "iri"
}
}
}
},
"roles": {
"title": "Asset roles",
"type": "array",
"items": {
"type": "string"
}
},
"start_datetime": {
"title": "Start Date and Time",
"description": "The searchable start date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"updated": {
"title": "Last Update Time",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
}
},
"dependencies": {
"end_datetime": {
"required": [
"start_datetime"
]
},
"start_datetime": {
"required": [
"end_datetime"
]
}
}
}
},
"common_metadata": {
"title": "Basic Descriptive Fields",
"$id": "https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/basics.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"title": {
"title": "Item Title",
"description": "A human-readable title describing the Item.",
"type": "string"
},
"description": {
"title": "Item Description",
"description": "Detailed multi-line description to fully explain the Item.",
"type": "string"
},
"constellation": {
"title": "Constellation",
"type": "string"
},
"created": {
"title": "Creation Time",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"datetime": {
"title": "Date and Time",
"description": "The searchable date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": [
"string",
"null"
],
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"end_datetime": {
"title": "End Date and Time",
"description": "The searchable end date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"gsd": {
"title": "Ground Sample Distance",
"type": "number",
"exclusiveMinimum": 0
},
"instruments": {
"title": "Instruments",
"type": "array",
"items": {
"type": "string"
}
},
"license": {
"type": "string",
"pattern": "^[\\w\\-\\.\\+]+$"
},
"mission": {
"title": "Mission",
"type": "string"
},
"platform": {
"title": "Platform",
"type": "string"
},
"providers": {
"title": "Providers",
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"description": {
"title": "Organization description",
"type": "string"
},
"name": {
"title": "Organization name",
"type": "string",
"minLength": 1
},
"roles": {
"title": "Organization roles",
"type": "array",
"items": {
"type": "string",
"enum": [
"producer",
"licensor",
"processor",
"host"
]
}
},
"url": {
"title": "Organization homepage",
"type": "string",
"format": "iri"
}
}
}
},
"start_datetime": {
"title": "Start Date and Time",
"description": "The searchable start date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"updated": {
"title": "Last Update Time",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
}
},
"dependencies": {
"end_datetime": {
"required": [
"start_datetime"
]
},
"start_datetime": {
"required": [
"end_datetime"
]
}
}
},
"core": {
"title": "GeoJSON Feature",
"$id": "https://geojson.org/schema/Feature.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": [
"assets",
"geometry",
"id",
"links",
"properties",
"stac_version",
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Feature"
]
},
"properties": {
"title": "Basic Descriptive Fields",
"$id": "https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/basics.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"title": {
"title": "Item Title",
"description": "A human-readable title describing the Item.",
"type": "string"
},
"description": {
"title": "Item Description",
"description": "Detailed multi-line description to fully explain the Item.",
"type": "string"
},
"constellation": {
"title": "Constellation",
"type": "string"
},
"created": {
"title": "Creation Time",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"datetime": {
"title": "Date and Time",
"description": "The searchable date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": [
"string",
"null"
],
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"end_datetime": {
"title": "End Date and Time",
"description": "The searchable end date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"gsd": {
"title": "Ground Sample Distance",
"type": "number",
"exclusiveMinimum": 0
},
"instruments": {
"title": "Instruments",
"type": "array",
"items": {
"type": "string"
}
},
"license": {
"type": "string",
"pattern": "^[\\w\\-\\.\\+]+$"
},
"mission": {
"title": "Mission",
"type": "string"
},
"platform": {
"title": "Platform",
"type": "string"
},
"providers": {
"title": "Providers",
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"description": {
"title": "Organization description",
"type": "string"
},
"name": {
"title": "Organization name",
"type": "string",
"minLength": 1
},
"roles": {
"title": "Organization roles",
"type": "array",
"items": {
"type": "string",
"enum": [
"producer",
"licensor",
"processor",
"host"
]
}
},
"url": {
"title": "Organization homepage",
"type": "string",
"format": "iri"
}
}
}
},
"start_datetime": {
"title": "Start Date and Time",
"description": "The searchable start date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"updated": {
"title": "Last Update Time",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
}
},
"anyOf": [
{
"required": [
"datetime"
],
"properties": {
"datetime": {
"not": {
"anyOf": [
{
"type": "null"
}
]
}
}
}
},
{
"required": [
"datetime",
"start_datetime",
"end_datetime"
]
}
],
"dependencies": {
"end_datetime": {
"required": [
"start_datetime"
]
},
"start_datetime": {
"required": [
"end_datetime"
]
}
},
"oneOf": [
{
"type": "null"
},
{
"type": "object"
}
]
},
"assets": {
"title": "Asset links",
"description": "Links to assets",
"type": "object",
"additionalProperties": {
"title": "Basic Descriptive Fields",
"$id": "https://schemas.stacspec.org/v1.0.0/item-spec/json-schema/basics.json#",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": [
"href"
],
"properties": {
"title": {
"title": "Asset title",
"description": "A human-readable title describing the Item.",
"type": "string"
},
"description": {
"title": "Asset description",
"description": "Detailed multi-line description to fully explain the Item.",
"type": "string"
},
"type": {
"title": "Asset type",
"type": "string"
},
"constellation": {
"title": "Constellation",
"type": "string"
},
"created": {
"title": "Creation Time",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"datetime": {
"title": "Date and Time",
"description": "The searchable date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": [
"string",
"null"
],
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"end_datetime": {
"title": "End Date and Time",
"description": "The searchable end date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"gsd": {
"title": "Ground Sample Distance",
"type": "number",
"exclusiveMinimum": 0
},
"href": {
"title": "Asset reference",
"type": "string",
"format": "iri-reference",
"minLength": 1
},
"instruments": {
"title": "Instruments",
"type": "array",
"items": {
"type": "string"
}
},
"license": {
"type": "string",
"pattern": "^[\\w\\-\\.\\+]+$"
},
"mission": {
"title": "Mission",
"type": "string"
},
"platform": {
"title": "Platform",
"type": "string"
},
"providers": {
"title": "Providers",
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"description": {
"title": "Organization description",
"type": "string"
},
"name": {
"title": "Organization name",
"type": "string",
"minLength": 1
},
"roles": {
"title": "Organization roles",
"type": "array",
"items": {
"type": "string",
"enum": [
"producer",
"licensor",
"processor",
"host"
]
}
},
"url": {
"title": "Organization homepage",
"type": "string",
"format": "iri"
}
}
}
},
"roles": {
"title": "Asset roles",
"type": "array",
"items": {
"type": "string"
}
},
"start_datetime": {
"title": "Start Date and Time",
"description": "The searchable start date/time of the assets, in UTC (Formatted in RFC 3339) ",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
},
"updated": {
"title": "Last Update Time",
"type": "string",
"format": "date-time",
"pattern": "(\\+00:00|Z)$"
}
},
"dependencies": {
"end_datetime": {
"required": [
"start_datetime"
]
},
"start_datetime": {
"required": [
"end_datetime"
]
}
}
}
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"geometry": {
"oneOf": [
{
"type": "null"
},
{
"title": "GeoJSON Point",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Point"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
}
}
},
{
"title": "GeoJSON LineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"LineString"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 2
}
}
},
{
"title": "GeoJSON Polygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Polygon"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 4
}
}
}
},
{
"title": "GeoJSON MultiPoint",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPoint"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
}
}
}
},
{
"title": "GeoJSON MultiLineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiLineString"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 2
}
}
}
},
{
"title": "GeoJSON MultiPolygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPolygon"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 4
}
}
}
}
},
{
"title": "GeoJSON GeometryCollection",
"type": "object",
"required": [
"type",
"geometries"
],
"properties": {
"type": {
"type": "string",
"enum": [
"GeometryCollection"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"geometries": {
"type": "array",
"items": {
"oneOf": [
{
"title": "GeoJSON Point",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Point"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
}
}
},
{
"title": "GeoJSON LineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"LineString"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 2
}
}
},
{
"title": "GeoJSON Polygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Polygon"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 4
}
}
}
},
{
"title": "GeoJSON MultiPoint",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPoint"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
}
}
}
},
{
"title": "GeoJSON MultiLineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiLineString"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 2
}
}
}
},
{
"title": "GeoJSON MultiPolygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPolygon"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 4
}
}
}
}
}
]
}
}
}
}
]
},
"id": {
"title": "Provider ID",
"description": "Provider item ID",
"type": "string",
"minLength": 1,
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
]
},
"links": {
"title": "Item links",
"description": "Links to item relations",
"type": "array",
"items": {
"type": "object",
"required": [
"rel",
"href"
],
"properties": {
"title": {
"title": "Link title",
"type": "string"
},
"type": {
"title": "Link type",
"type": "string"
},
"href": {
"title": "Link reference",
"type": "string",
"format": "iri-reference",
"minLength": 1
},
"rel": {
"title": "Link relation type",
"type": "string",
"minLength": 1
}
}
}
},
"stac_extensions": {
"title": "STAC extensions",
"type": "array",
"items": {
"title": "Reference to a JSON Schema",
"type": "string",
"format": "iri"
},
"uniqueItems": true
},
"stac_version": {
"title": "STAC version",
"type": "string",
"const": "1.0.0"
}
},
"else": {
"properties": {
"collection": {
"not": {}
}
}
},
"if": {
"properties": {
"links": {
"contains": {
"required": [
"rel"
],
"properties": {
"rel": {
"const": "collection"
}
}
}
}
}
},
"oneOf": [
{
"type": "object",
"required": [
"geometry",
"bbox"
],
"properties": {
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"oneOf": [
{
"maxItems": 4,
"minItems": 4
},
{
"maxItems": 6,
"minItems": 6
}
]
},
"geometry": {
"title": "GeoJSON Geometry",
"$id": "https://geojson.org/schema/Geometry.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"oneOf": [
{
"title": "GeoJSON Point",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Point"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
}
}
},
{
"title": "GeoJSON LineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"LineString"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 2
}
}
},
{
"title": "GeoJSON Polygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Polygon"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 4
}
}
}
},
{
"title": "GeoJSON MultiPoint",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPoint"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
}
}
}
},
{
"title": "GeoJSON MultiLineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiLineString"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 2
}
}
}
},
{
"title": "GeoJSON MultiPolygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPolygon"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 4
}
}
}
}
}
]
}
}
},
{
"type": "object",
"required": [
"geometry"
],
"properties": {
"bbox": {
"not": {
"anyOf": [
{}
]
}
},
"geometry": {
"type": "null"
}
}
}
],
"then": {
"required": [
"collection"
],
"properties": {
"collection": {
"title": "Collection ID",
"description": "The ID of the STAC Collection this Item references to.",
"type": "string",
"minLength": 1
}
}
}
},
"link": {
"type": "object",
"required": [
"rel",
"href"
],
"properties": {
"title": {
"title": "Link title",
"type": "string"
},
"type": {
"title": "Link type",
"type": "string"
},
"href": {
"title": "Link reference",
"type": "string",
"format": "iri-reference",
"minLength": 1
},
"rel": {
"title": "Link relation type",
"type": "string",
"minLength": 1
}
}
}
},
"else": {
"properties": {
"collection": {
"not": {}
}
}
},
"if": {
"properties": {
"links": {
"contains": {
"required": [
"rel"
],
"properties": {
"rel": {
"const": "collection"
}
}
}
}
}
},
"oneOf": [
{
"type": "object",
"required": [
"geometry",
"bbox"
],
"properties": {
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"oneOf": [
{
"maxItems": 4,
"minItems": 4
},
{
"maxItems": 6,
"minItems": 6
}
]
},
"geometry": {
"title": "GeoJSON Geometry",
"$id": "https://geojson.org/schema/Geometry.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"oneOf": [
{
"title": "GeoJSON Point",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Point"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
}
}
},
{
"title": "GeoJSON LineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"LineString"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 2
}
}
},
{
"title": "GeoJSON Polygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"Polygon"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 4
}
}
}
},
{
"title": "GeoJSON MultiPoint",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPoint"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
}
}
}
},
{
"title": "GeoJSON MultiLineString",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiLineString"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 2
}
}
}
},
{
"title": "GeoJSON MultiPolygon",
"type": "object",
"required": [
"type",
"coordinates"
],
"properties": {
"type": {
"type": "string",
"enum": [
"MultiPolygon"
]
},
"bbox": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 4
},
"coordinates": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2
},
"minItems": 4
}
}
}
}
}
]
}
}
},
{
"type": "object",
"required": [
"geometry"
],
"properties": {
"bbox": {
"not": {
"anyOf": [
{}
]
}
},
"geometry": {
"type": "null"
}
}
}
],
"then": {
"required": [
"collection"
],
"properties": {
"collection": {
"title": "Collection ID",
"description": "The ID of the STAC Collection this Item references to.",
"type": "string",
"minLength": 1
}
}
}
}
]
},
"metadata": [
{
"title": "cwl:type",
"value": "[ null, File ]"
}
],
"minOccurs": 0,
"maxOccurs": 1,
"valuePassing": "byValue",
"title": "example_file label",
"description": "example_file doc"
},
"example_enum": {
"schema": {
"type": "string",
"enum": [
"auto",
"fasta",
"fastq",
"fasta.gz",
"fastq.gz"
],
"default": "auto"
},
"metadata": [
{
"title": "cwl:type",
"value": "enum[ auto, fasta, fastq, fasta.gz, fastq.gz ]"
}
],
"minOccurs": 1,
"maxOccurs": 1,
"valuePassing": "byValue",
"title": "example_enum label",
"description": "example_enum doc"
}
}
3. Outputs conversion¶
Users can reuse the BaseCWLtypes2OGCConverter instance to convert the CWL outputs to the OGC JSON format:
In [3]:
Copied!
cwl_converter.dump_outputs(stream=sys.stdout, pretty_print=True)
cwl_converter.dump_outputs(stream=sys.stdout, pretty_print=True)
{}