...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
o = onc('YOUR_TOKEN_HERE'); locations = o.getLocations({'deviceCategoryCode','ADCP2MHZ'}); for i=1:numel(locations) disp(locations(i)); end |
getLocationHierarchy()
No Format |
---|
getLocationHierarchy(filters) |
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 | |||
filters | struct 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.
| 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[] | list | A list of location structures. | |
location[].locationName | string | The full name of the location. | locationName: "Axis (POD 1)" |
location[].depth | double | The average depth of the deployments. |
|
location[].description | string | The 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[].hasDeviceData | string | Indicates that data products can be requrested using a device category for the location. | hasDeviceData: "true" |
location[].locationCode | string | A code that unquely identifies a location. | locationCode: "BACAX" |
location[].hasPropertyData | string | Indicates that data products can be requested using property code for the location. | hasPropertyData: "true" |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
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
|
getDevices()
No Format |
---|
getDevices(filters) |
...