Metadata generation

Metadata is a set of information that describes actual data (in our case the outputs of a processing job) in order to make that data retrievable for further use and reprocessing. Metadata can be generated in two ways:

  • By using an automated generic process that extracts metadata automatically, the recast process, or
  • Manually with more specific knowledge of the product contents and purpose.

A mixed approach by which the data is recast and then manually refined is also possible.

Using the recast service

Recasting is the process of automatically extracting metadata from output files of processing jobs or uploaded data in order to make them searchable and retrievable for users or other applications and further processing. It also performs an analysis and publication of the data in order to ensure correct visualization on the platform.

This is done by the recast web service (compliant with the OGC WPS standard) at the following URL:

It requires the following input parameters:

  • repoKey: The name of the repository.
    • e.g. eo-samples
  • folderPath: The path to the folder (relative to the repository root) containing the files to be processed.
    • e.g. data-publication-sample/data-publication-sample.tif
  • mode: The recasting mode, one of the values none, basic or extended.
    • Set it to extended in order to create also a map overlay (if possible) to be visualised in the GeoBrowser map tool.
  • _T2Username: The name of the Terradue platform user performing the recast operation (requires reading access to the repository containing the products).
  • _T2ApiKey: The corresponding Terradue platform API key. You can get it from your account profile on

Using the web service with Python is very simple; below is the relevant code snippet to show the basic usage:

# Set WPS server information
wps_url = ""
wps_process_id = "analyzeResults"

# Define parameters

repo_name = '...'         # the name of the repository on the Terradue storage containing the data to be analysed
folder_path = '...'       # the folder within that repository to be analysed
username = '...'          # Ellip username (see above)
api_key = '...'           # corresponding API key

wps_inputs = [
    ('repoKey', repo_name),
    ('folderPath', folder_path),
    ('mode', 'extended'),
    ('_T2Username', username),
    ('_T2ApiKey', api_key)

# Get WPS instance
wps = WebProcessingService(wps_url)

# Invoke recast process
wps_execution = wps.execute(wps_process_id,
                            output = [('result_osd', True)]

# Poll job status until job finishes (takes a few seconds)
monitorExecution(wps_execution, sleepSecs=10)

The following Jupyter notebook demonstrates how to use Python code to generate a metadata file for a product via the recast service:

Publish metadata on the Terradue catalog (up to step 2).

Alternative: Fully manual metadata generation

The metadata we need to generate is an ATOM feed containing entries for individual products. A product often consist of several files (if not packaged as a zipped archive), and those files are enclosure links within the same entry.

<feed xmlns="" xmlns:dc="" xmlns:eop="">
    <title type="text">data-publication-sample</title>
    <summary type="html">data-publication-sample</summary>
    <link rel="enclosure" type="image/tiff" title="Product GeoTiff" length="31624950" href=""/>
    <license xmlns=""></license>
    <georss:polygon xmlns:georss="">40.604756 13.587901 41.234180 13.737746 41.077912 14.856833 40.448583 14.695978 40.604756 13.587901</georss:polygon>

    <eop:EarthObservation xmlns:gml="" xmlns:om="">

The <eop:EarthObservation> node contains the most important information, and there can also be specialised subtypes for different types of data (e.g. RADAR or optical products). Below is an example for SAR metadata:

<sar:EarthObservation xmlns:eop="" xmlns:gml="" xmlns:om="" xmlns:sar="">
  <phenomenonTime xmlns="">
  <procedure xmlns="">
          <eop:description>Sample Instrument</eop:description>
  <featureOfInterest xmlns="">
                  <gml:posList count="5">40.604756 13.587901 41.234180 13.737746 41.077912 14.856833 40.448583 14.695978 40.604756 13.587901</gml:posList>
  <result xmlns="">
            <ServiceReference xmlns:p11="" xmlns:p10="" xmlns="" p10:type="simple" p11:href="">
            <ServiceReference xmlns:p11="" xmlns:p10="" xmlns="" p10:type="simple" p11:href="" p11:title="simple">
          <eop:unitOfMeasure uom="N/A, deg, deg, m, cm/yr, N/A, N/A, N/A, N/A, cm"/>
          <eop:processingCenter>Sample processing centre</eop:processingCenter>
          <eop:method>Sample method</eop:method>
          <eop:processorName>Sample processor</eop:processorName>


Vendor-specific information for which there are no standard elements in the metadata schema has to go into the <vendorSpecific> node within the <EarthObservationMetadata> element (see at the bottom of content above).