podaac / gibs-imagestat

Calculate statistics on GIBS hosted imagery
Apache License 2.0
1 stars 0 forks source link
development statistics tva

Initial Implementation Use Cases & Exchange Data Specification

1. Imagery Spatial Summary Statistics – single (current) Time Step.

Input Parameters (from Worldview UI passed to Imagery Analysis tool for execution):

For this use case “Spatial summary – Time Step” Imagery Analysis tool will extract values for each specified imagery dataset for just the single time over the spatial domain defined.  Imagery Analysis tool will then compute and return mean, variance, standard error and pixel count statistics, plus a frequency distribution of geophysical values for each specified imagery dataset again for just the single time for the spatial domain specified.

Output Data (passed from Imagery Analysis tool to Worldview -UI for display):

2. Imagery Spatial Summary Statistics – Time Range (summary over multiple time steps of imagery).

Input Parameters (from Worldview UI passed to Imagery Analysis tool for execution):

For this use case “Spatial summary – Time Range” Imagery Analysis tool will extract values for each specified imagery dataset for the spatial domain defined for the range of times.  Imagery Analysis tool will then compute and return a single set of mean, variance, standard error and pixel count statistics, plus a frequency distribution of geophysical values for each specified imagery dataset again across time for the spatial domain specified.

Output Data (passed from Imagery Analysis tool to Worldview -UI for display):

gibs-imagestat

The purpose of this application is to generate statistics from the GIBS imagery files. The API maps the GIBS layers to its corresponding color map and generates the source data values. The output JSON file is then used to generate statistics.

Parameters

The following is a list of accepted parameters and information about them.

timestamp - string

The date that information will be pulled from. When multiple dates are pulled it is used as the start date. This parameter is required. e.g. '2016-06-09T00:00:00Z'

end_timestamp - string

Can be ignored for a single date. Acts as an end date when data from multiple dates are pulled. - e.g. 2016-06-09T00:00:00Z

_type - string

Allows you to pick between three types of data pull. Use 'date' for a single date, 'range' for a summary of a range, 'series' for data from a sample of dates within a range. e.g. 'date'

steps - integer

This allows you to set the number of days selected within a given range or series. Use '1' for just the start and end date, '2' for start date, end date and middle date, etc.. e.g. '1'

layer - string

Layer to be pulled from gibs api. e.g. 'GHRSST_L4_MUR_Sea_Surface_Temperature'

colormap - string

Colormap to use to decipher layer. e.g. 'GHRSST_Sea_Surface_Temperature.xml',

_scale - integer

Currently unused.

bbox - string

Bounding box of latitude and longitude. For whole earth use '-90,-180,90,180'. e.g. '-90,-180,90,180'

bins - string

Number of bins to used in returned histogram. e.g. 10

Example calls with preview

Note the 'raw' field is also returned by the api but it not shown here for readability as it contains all the raw data from the days selected.

api 'date' request:

http://localhost:9000/get_stats?timestamp=2016-06-09T00:00:00Z&bins=10&format=json&layer=AIRS_L2_Cloud_Top_Height_Day&colormap=AIRS_Cloud_Top_Height.xml&bbox=-90,-180,90,180

preview:

api 'range' request:

http://localhost:9000/get_stats?_type=range&timestamp=2016-06-09T00:00:00Z&end_timestamp=2016-06-19T00:00:00Z&steps=5&bins=10&format=json&layer=GHRSST_L4_MUR_Sea_Surface_Temperature&colormap=GHRSST_Sea_Surface_Temperature.xml&bbox=-90,-180,90,180

preview:

api 'series' request:

http://localhost:9000/get_stats?_type=series&timestamp=2016-06-09T00:00:00Z&end_timestamp=2017-06-09T00:00:00Z&steps=12&bins=10&format=json&layer=GHRSST_L4_MUR_Sea_Surface_Temperature&colormap=GHRSST_Sea_Surface_Temperature.xml&bbox=-90,-180,90,180

preview: