Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Returns a hierarchical subtree of locations whose root is defined by the input filter. In this case the only valid input filter is locationCode. In Oceans 2.0 Instruments and Variables are organized by Location so that users can easily drill down by place name or mobile platform name to find the instruments or properties they are interested in. 


Parameter

Type

Description

Example

Optional


filtersstruct or array

A comma separated list of one or more filter criteria, used to return an exclusive set of location elements from the ONC locations endpoint.

  • A list of filter/value pairs in the following format struct('<filter_1>','<value_1>','<filter_2>','<value_2>',...) or {'<filter_1>','<value_1>','<filter_2>','<value_2>',...}.
  • If excluded, all locations are returned.
  • Valid filters: locationCode
  • See locations Discovery Service for more information on filter usage.
struct('locationCode','BACAX')

or

{'locationCode','BACAX'}


Returns

A hierarchy of location objects.

Code Block
       locationName: 'Axis '
           children: null
              depth: 984.3076
        description: 'Depth: 985 m Latitude: 48.3167 Longitude: -126.0501 Type: Stationary platform Description: Canyon axis: benthic processes, biodiversity, sediment dynamics.'
      hasDeviceData: 'true'
       locationCode: 'BACAX'
    hasPropertyData: 'true'


Property

Type

Description

Example
location[]listA list of location structures.
location[].locationNamestringThe full name of the location.
locationName: "Axis (POD 1)"
location[].children[]listA list of location structures that are the children of this location structure.children: null
location[].depthdoubleThe average depth of the deployments.
depth75
location[].descriptionstringThe description of the location.
description: "Depth: 985 m Latitude: 48.3167 Longitude: -126.0501 Type: Stationary platform 
               Description: Canyon axis: benthic processes, biodiversity, sediment dynamics."
location[].hasDeviceDatastringIndicates that data products can be requrested using a device category for the location.
hasDeviceData: "true"
location[].locationCodestringA code that unquely identifies a location.
locationCode: "BACAX"
location[].hasPropertyDatastringIndicates that data products can be requested using property code for the location.
hasPropertyData: "true"


Code Block
languagepy
titleExample - Print locations at Barkley Upper South Slope
linenumberstrue
collapsetrue
o = onc('YOUR_TOKEN_HERE');

locations = o.getLocationHierarchy({'locationCode','BACUS'});
if isfield( locations, 'children' )
    for i = 1 : numel( locations.children )
        locations.children(i)
    end
end

...

Property
Type
Description
downloadResultslistA cell array of download results struct objects.
downloadResults{}.urlstringThe URL used to make the download request.
downloadResults{}.messagemessageslistA cell array of the messages that were returned from the dataProductDelivery download method when it was polled.
downloadResults{}.statusstring

The status of the download process at the request. Possible values are:

  • "running" - The data product request is running on the Task server.
  • "complete" - The data product request Task has completed and file has been downloaded or URL has been returned.
  • "error" - An error, preventing the task execution or download from completing successfully, has occurred.
downloadResults{}.sizefloatThe actual size of the file in bytes.
downloadResults{}.filestringThe full path of the file that was downloaded.
downloadResults{}.indexstringThe index of the file downloaded. The index can either be a number 1-* or "meta" for the data product metadata file.
downloadResults{}.downloadedbooleanIndicates whether the file was downloaded. If the filter downloadResultsOnly=True is used, the data product is not downloaded and the value will be False.

...