Skip to content
sgrellet edited this page Oct 5, 2021 · 19 revisions

This wiki summarizes how to use the SensorThings API instances deployed / le wiki récapitule comment utiliser les instances SensorThings API déployées

specification OGC part 1 :

  • http://www.opengeospatial.org/standards/sensorthings
  • ‘Figure 2 Sensing Profile Core Entities’ gives you the model / vous donne le modèle
  • chapters 9.3 et 9.4 provide most of the operator for interaction / vous donnent la majorité des opérateurs pour l’interrogation Ex : ‘Table 9-1 Built-in Filter Operators’ for result operators / pour les comparateurs sur les résultats EX : ‘Table 9-2 Built-in Query Functions’ for spatial operators, date, string / pour les opérateurs spatiaux, date, string…

Figure 2 : Sensing Profile Core Entities V1.1

deployment

good how-to : https://datacoveeu.github.io/API4INSPIRE/sensorthingsapi/2_Deploy.html

Query samples / exemples de requêtes

A°/ good how-to

https://datacoveeu.github.io/API4INSPIRE/sensorthingsapi/3_GettingData.html

B°/ local examples

on http://sensorthings.brgm-rec.fr/SensorThingsGroundWater/v1.0/

all / tous les featuresOfInsterest

http://sensorthings.brgm-rec.fr/SensorThingsGroundWater/v1.0/FeaturesOfInterest just taking Piezometers / en ne filtrat que sur les Piezomètres (test on URI http://ressource.brgm-rec.fr/data/Piezometre/) http://sensorthings.brgm-rec.fr/SensorThingsGroundWater/v1.0/FeaturesOfInterest?$filter=startswith(name,%27http%3A%2F%2Fressource.brgm-rec.fr%2Fdata%2FPiezometre%2F%27)

all the observations of one featureOfInterest (with an order by) / toutes les observation d'un featureOfInterest (avec order by)

http://sensorthings.brgm-rec.fr/SensorThingsGroundWater/v1.0/FeaturesOfInterest(1255)/Observations?$orderby=resultTime
http://sensorthings.brgm-rec.fr/SensorThingsGroundWater/v1.0/FeaturesOfInterest(1255)/Observations?$orderby=phenomenonTime

order by asc VS desc

http://sensorthings.brgm-rec.fr/SensorThingsGroundWater/v1.0/FeaturesOfInterest(1255)/Observations?$skip=500&$orderby=phenomenonTime+asc

http://sensorthings.brgm-rec.fr/SensorThingsGroundWater/v1.0/FeaturesOfInterest(1255)/Observations?$skip=500&$orderby=phenomenonTime+desc

testing on result value / recherche sur la valeur du résultat

defining the amount of information returned in the response / définir la quantité d’information dans la réponse

http://sensorthings.brgm-rec.fr/SensorThingsFlood/v1.0/Locations?$filter=indexof(name,%27Zorn%27)%20ge%201

http://sensorthings.brgm-rec.fr/SensorThingsGroundWater/v1.0/Things(1219)/Datastreams?$expand=Observations,ObservedProperty

date filter

Spatial Filtering / Recherche spatiale

Testing on 'name' content / recherche sur une chaîne de caractères

Finding all things having observed a given property in the last

2 Month

https://sensorthings.brgm-rec.fr/SensorThingsGroundWater/v1.0/Things? $select=id,name,description,properties&$expand=Locations&$top=1000&$filter=Datastreams/ObservedProperties/id eq 1 and not Datastreams/phenomenonTime lt now() sub duration'P2M'

2 weeks

https://sensorthings.brgm-rec.fr/SensorThingsGroundWater/v1.0/Things? $select=id,name,description,properties&$expand=Locations&$top=1000&$filter=Datastreams/ObservedProperties/id eq 1 and not Datastreams/phenomenonTime lt now() sub duration'P2W'

8 days

https://sensorthings.brgm-rec.fr/SensorThingsGroundWater/v1.0/Things? $select=id,name,description,properties&$expand=Locations&$top=1000&$filter=Datastreams/ObservedProperties/id eq 1 and not Datastreams/phenomenonTime lt now() sub duration'P8D'

Testing on 'properties' (JSON_Object)

also valid for observation parameters http://sensorthings.brgm-rec.fr/SensorThingsGroundWater/v1.0/Sensors?$filter=properties/responsibleParty/organisationName%20eq%20%27Ifremer%20(Antoine%20Huguet)%27

DataArray response / réponse en mode DataArray

http://sensorthings.brgm-rec.fr/SensorThingsGroundWater/v1.0/Observations?%24filter=resultTime%20lt%202016-01-14T00:00:00Z&$resultFormat=dataArray