Welcome to TERN Knowledge Base

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Example API searches for specific parameters

This section shows some examples of API search queries for datasets with specific parameters. There are many more parameters that can be searched, please refer to the TERN vocabularies for a full list of parameters. Each entry has its own unique URI that can be used as a search value.


Region

Search query for all the data collected at sites located within a specific region.

Example 1 - Data collected in the Bioregion of Cape York Peninsula

"region": [
  "http://linked.data.gov.au/dataset/bioregion/CYP"
]

Example 2 - Data collected in Queensland

"region": [
      "http://linked.data.gov.au/dataset/asgs2016/stateorterritory/3"
    ]

Example 3 - Data collected either in Tasmania or in Cape York Peninsula

"region": [
      "http://linked.data.gov.au/dataset/asgs2016/stateorterritory/6",
      "http://linked.data.gov.au/dataset/bioregion/CYP"
    ]

Dataset

Search query to return all data contained within a specific dataset.

Example 1 - Refine to data from “Tern Surveillance Monitoring” or “Williams Wet Tropics Vertebrates” datasets

"dataset": [
  "http://linked.data.gov.au/dataset/ausplots",
  "http://linked.data.gov.au/dataset/wet-tropics-vertebrate"
]

Site

Retrieve site specific data for one or more ecological monitoring sites.

Example 1 - Retrieve all the data from Tern Surveillance Monitoring site nsabbs0001

"site_id": [
  "http://linked.data.gov.au/dataset/ausplots/site-nsabbs0001"
]

Site Visit

Retrieve site visit data from one or more ecological monitoring sites.

Example 1 - Retrieve all the data from Tern Surveillance Monitoring sitevisit

"site_visit_id": [
  "http://linked.data.gov.au/dataset/ausplots/sv-58580"
]

Feature of Interest

EcoPlots observations are categorised in Feature of Interest (FOI). Please see the FOI vocabularies for more detail.

Example - Retrieve all the data from “Landform” feature of interest

"feature_type": [
  "http://linked.data.gov.au/def/tern-cv/2cf3ed29-440e-4a50-9bbc-5aab30df9fcd"
]

Parameter (observable property)

Each observation in EcoPlots is measuring an observable property (or parameter). Please see the Parameter vocabularies for more detail.

Example - Get all the data from Crown cover parameter.

"observed_property": [
  "http://linked.data.gov.au/def/tern-cv/83ac0278-51cd-4d1a-8e05-7c1fc68cf020"
]

Temporal extent (date)

In addition to all the vocabularised facets, you can filter data based on a temporal resolution.

"date_from": "2006-01-01",
"date_to": "2021-07-30"

Spatial extent

Need to explain how this works and how to do this.

Statial queries in EcoPlots allows three different formats: GeoJSON, Well-Known Text (WKT) and Bounding Box. The spatial query will do an “intersect” between the given geometry and the geometry of the data.

# WKT examples:
"spatial": "POINT (-77.03653 38.897676)"
"spatial": "LINESTRING (-77.03653 38.897676, -77.009051 38.889939)"
"spatial": "POLYGON ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0))"
"spatial": "MULTIPOINT (102.0 2.0, 103.0 2.0)"
"spatial": "MULTILINESTRING ((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0), (100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8))"
"spatial": "MULTIPOLYGON (((102.0 2.0, 103.0 2.0, 103.0 3.0, 102.0 3.0, 102.0 2.0)), ((100.0 0.0, 101.0 0.0, 101.0 1.0, 100.0 1.0, 100.0 0.0), (100.2 0.2, 100.8 0.2, 100.8 0.8, 100.2 0.8, 100.2 0.2)))"
# GEOJSON examples:
"spatial": {
    "type" : "Point",
    "coordinates" : [-77.03653, 38.897676]
}

"spatial": {
    "type" : "LineString",
    "coordinates" : [[-77.03653, 38.897676], [-77.009051, 38.889939]]
}
  
"spatial": {
    "type" : "Polygon",
    "coordinates" : [
      [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
    ]
}
  
"spatial": {
    "type" : "MultiPolygon",
    "coordinates" : [
      [ [[102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0]] ],
      [ [[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]],
        [[100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2]] ]
    ]
}
  
"spatial": {
    "type": "MultiPoint",
    "coordinates": [
        [
            139.213700000,
            -34.358210000
        ],
        [
            150,
            -35
        ]
    ]
}
# Bounding Box (BBOX) example
"spatial": [139.2, -34.35, 140.0, -35.00]

  • No labels