class wtss.coverage.Coverage(service, metadata=None)

A class that describes a coverage in WTSS.


For more information about coverage definition, please, refer to WTSS specification.

__init__(service, metadata=None)

Create a coverage object associated to a WTSS client.

  • service (wtss.wtss.WTSS) – The client to be used by the coverage object.

  • metadata (dict) – The coverage metadata.

property attributes

Return the list of coverage attributes.

property crs

Return the coordinate reference system metadata.

property description

Return the coverage description.

property dimensions

Return the coverage dimensions metadata.

property name

Return the coverage name.

property spatial_extent

Return the coverage spatial extent.

property spatial_resolution

Return the coverage spatial resolution metadata.

property timeline

Return the coverage timeline.


Retrieve the time series for a given location and time interval.

Keyword Arguments:
  • attributes (optional) – A string with attribute names separated by commas, or any sequence of strings. If omitted, the values for all coverage attributes are retrieved.

  • longitude (int/float) – A longitude value according to EPSG:4326.

  • latitude (int/float) – A latitude value according to EPSG:4326.

  • start_date (str, optional) – The begin of a time interval.

  • end_date (str, optional) – The begin of a time interval.


A time series object as a dictionary.

Return type:


  • HTTPError – If the server response indicates an error.

  • ValueError – If the response body is not a json document.

  • ImportError – If Maptplotlib or Numpy can no be imported.


Retrieves a time series for MODIS13Q1 data product:

>>> from wtss import *
>>> service = WTSS(WTSS_EXAMPLE_URL)
>>> coverage = service['MOD13Q1']
>>> ts = coverage.ts(attributes=('red', 'nir'),
...                  latitude=-12.0, longitude=-54.0,
...                  start_date='2001-01-01', end_date='2001-12-31')
[236.0, 289.0, ..., 494.0, 1349.0]