Table of Contents
...
SensorThings Entity | Description | Example: NMBGMR Aquifer Monitoring Well | |||
---|---|---|---|---|---|
Metadata | Location | A unique coordinate or area on the surface of the earth | Location in latitude and longitude or UTM easting and Northing (UTM Zone 13, NAD83) | Street Address (possibly with associated latitude and longitude). (e.g. 3960 PRINCE ST) | Location in easting and northing (UTM NAD83 in meters) |
Thing | Some real-world thing with which one or more Sensors are associated | Well Point ID WL-0150 | Sample Pt RT236I | Point of Diversion POD Number A 00008 AS | |
Datastream | A collection of Observations about an ObservedProperty produced by a Sensor associated with a Thing | Time series, Hydrograph | Sample Results | Meter Readings (Quarterly) | |
Datastream/observationType | The type of observation, codified in the Observations and Measurements data standard. Types include Categorical (defined text), Count (integer), Measurement (continuous number), Observation (free text), and TruthObservation (True/False) | Measurement | Categorical or TruthObservation | Measurement | |
Datastream/unitOfMeasurement | A three-item definition of the unit of measurement, including its name, symbol, and link to the definition (preferably to one provided in an established ontology such as http://unitsofmeasure.org/ucum.html or http://qudt.org/) | feet (e.g. http://qudt.org/vocab/unit/FT) | TCR Result | Acre-Feet (e.g. http://qudt.org/vocab/unit/AC-FT) | |
Sensor | The procedure used to provide a Datastream. Can be a particular data recording device model, or a defined procedure followed by a human observer. If applicable, a specific instance (e.g. a sensor model and serial number) | Steel-tape measurement; Continuous acoustic sounder | 9223B-PA (https://www.standardmethods.org/doi/10.2105/SMWW.2882.194) | MCCROMETER Diversion Meter-Meter Number 17147 | |
ObservedProperty | The raw or processed phenomenon (quantitative or qualitative) being measured for the Datastream. Preferably including a link to a definition provided by an established ontology or controlled vocabulary such as the ODM2 Controlled Vocabularies or http://qudt.org/) | Depth to Water Below Ground Surface (BGS) | Analyte (e.g. Coliform (TCR) (3100)) | Mtr Amount | |
OPTIONAL: FeatureOfInterest | The real-world feature that the Observations are about. This may be different from the Thing on which the Sensor is mounted. Can include a JSON-formatted point location or a polygon or collections thereof. | Formation (e.g. https://maps.nmt.edu/maps/data/hydrograph/formation_lu) | Public Water System (head office location or service area boundary) (e.g. Albuquerque Water System PWSID NM3510701) | Water Right (set of relevant points of diversion) | |
Data | Observation | A single measurement value including the result, time values, and other metadata. Information on the ObservedProperty that was measured by what Sensor is provided by the Datastream these observations are in. Features of Interest are linked for each observation as well. Observations are linked to (collected in) Datastreams | Depth Measurement | Sample (e.g. 763391) | Meter Reading |
Observation/result | The actual measured value, with valid values defined in observationType and units defined in unitsOfMeasurement, both provided by Datastream | Depth (e.g. 337.08) | Sample Result (P (Positive/ Coliform found) A (Negative/ Coliform not found)) | Mtr Amount (e.g. 107.948) | |
Observation/phenomenonTime | The date+time (or interval) in ISO 8601 format (YYYY-MM-DDT:HH:MM:SS-Z) when the observation occured | 2019-01-31 00:00:00 | MP (Monitoring Period) (e.g. 01-01-2020 to 01-31-2020) | 1/20/2017-04/05/2017 (Quarterly period for which volume was measured) | |
OPTIONAL: Observation/resultTime | The date+time that the result was generated. May be the same as phenomenonTime | Date (e.g 01-06-2020) | 04/05/2017 (date of meter reading) | ||
OPTIONAL: Observation/validTime | The date+time interval during which the Observation can be used (often used for provisional values that are replaced by QA/QC’d observations) | ||||
OPTIONAL: Observation/resultQuality | A description of the result Quality. Will vary according to agency practice. Can use ODM2 controlled vocabulary for data quality types as a guide. | Precision (e.g. “within two hundredths of a foot”) |
...
Adding the paramaeter ?$resultFormat=CSV returns the same information as tabular data, and adding ?$resultFormat=GeoJSON returns the same information as a GeoJSON file that can be used in GIS applications such as ESRI ArcGIS or QGIS or to create custom web maps. STA is a very full-featured API that enables complex, multi-parameter queries. Full detail can be found at the OGC API specification document or the interactive documentation.
For example, this query requests all Observations about Total Dissovled Dissolved Solids (TDS) about a particular Feature of Interest (Well) between August 14 and August 16 2014, https://st.newmexicowaterdata.org/FROST-Server/v1.1/Observations?$filter=FeatureOfInterest/id eq '32' and Datastream/ObservedProperty/name eq 'TDS' and phenomenonTime gt 2014-08-14T00:00:00.000Z and phenomenonTime lt 2014-08-16T00:00:00.000Z&$expand=Datastream
...
While the API is useful for creating web applications for any given agency’s data, it is most integral to the NMWDI purpose of data integration. If multiple agencies' data is available via the same API standard, then this reduces the burden on data users to access data from each agency. Consider the complex query above. We can modify it slightly by changing the first part of the URL from https://st.newmexicowaterdata.org/FROST-Server/v1.1 to https://nm.ngwmn.internetofwater.dev/api/v1.1 The latter URL points to an entirely different API written in a different programming language on a separate database stewarded by a different organization, in . In this case the data is a copy of the New Mexico part of the National Groundwater Monitoring Network being served by the Internet of Water at Duke University. By changing this first part, as well as changing ‘TDS’ to ‘Water Level Below Ground Surface’, and expanding the date range from to include everything between 2019 and 2020, we contruct this query: https://nm.ngwmn.internetofwater.dev/api/v1.1/Observations?$filter=FeatureOfInterest/id eq '32' and Datastream/ObservedProperty/name eq 'Water Level Below Ground Surface' and phenomenonTime gt 2019-01-01T00:00:00.000Z and phenomenonTime lt 2020-01-01T00:00:00.000Z&$expand=Datastream
...
Code Block | ||
---|---|---|
| ||
{ "value" : [ { "phenomenonTime" : "2019-08-21T14:26:00.000Z", "resultTime" : "2019-08-21T14:26:00.000Z", "result" : 4722, "Datastream@iot.navigationLink" : "https://nm.ngwmn.internetofwater.dev/api/v1.1/Observations(95866)/Datastream", "Datastream" : { "name" : "Depth Below Surface", "description" : "Estimated depth to water table below ground surface", "observationType" : "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "observedArea" : { "type" : "Point", "coordinates" : [ -106.885, 34.352 ] }, "phenomenonTime" : "1975-07-08T12:00:00.000Z/2020-02-27T16:40:00.000Z", "resultTime" : "1975-07-08T12:00:00.000Z/2020-02-27T16:40:00.000Z", "unitOfMeasurement" : { "name" : "feet", "symbol" : "ft", "definition" : "http://www.qudt.org/qudt/owl/1.0.0/unit/Instances.html#Foot" }, "@iot.id" : 63, "@iot.selfLink" : "https://nm.ngwmn.internetofwater.dev/api/v1.1/Datastreams(63)" }, "FeatureOfInterest@iot.navigationLink" : "https://nm.ngwmn.internetofwater.dev/api/v1.1/Observations(95866)/FeatureOfInterest", "@iot.id" : 95866, "@iot.selfLink" : "https://nm.ngwmn.internetofwater.dev/api/v1.1/Observations(95866)" }, { "phenomenonTime" : "2019-03-04T16:05:00.000Z", "resultTime" : "2019-03-04T16:05:00.000Z", "result" : 4722, "Datastream@iot.navigationLink" : "https://nm.ngwmn.internetofwater.dev/api/v1.1/Observations(95864)/Datastream", "Datastream" : { "name" : "Depth Below Surface", "description" : "Estimated depth to water table below ground surface", "observationType" : "http://www.opengis.net/def/observationType/OGC-OM/2.0/OM_Measurement", "observedArea" : { "type" : "Point", "coordinates" : [ -106.885, 34.352 ] }, "phenomenonTime" : "1975-07-08T12:00:00.000Z/2020-02-27T16:40:00.000Z", "resultTime" : "1975-07-08T12:00:00.000Z/2020-02-27T16:40:00.000Z", "unitOfMeasurement" : { "name" : "feet", "symbol" : "ft", "definition" : "http://www.qudt.org/qudt/owl/1.0.0/unit/Instances.html#Foot" }, "@iot.id" : 63, "@iot.selfLink" : "https://nm.ngwmn.internetofwater.dev/api/v1.1/Datastreams(63)" }, |
Since these entirely different data sources provide their data using the same API standard, they can be integrated seamlessly into one data discovery, visualization and delivery system, as does the demonstration application.