Skip to content

Play with the FROST Geotech plugin

Hylke van der Schaaf edited this page Dec 15, 2023 · 12 revisions

The SensorThings API has very powerful query features that keep easy things easy, but still allow very complex requests. A good starting explanation on how to query the SensorThings API can be found at the Getting Data section on the FROST-Documentation website.

This page is about relevant queries you may do with the FROST Geotech plugin

Simple queries

Lists

The simplest queries are those that fetch a list of all entities of a type. For instance, getting a list of all the geotechTests (Mapped to Sensor in STA): 

https://[FrostGeotechServerAddress]/v1.1/Sensors

Or to get all borehole collars:

https://[FrostGeotechServerAddress]/v1.1/BhCollarThings

Single Entities

To get a single entity from a list, add (<id>) to the URL of the list. To get the geoTechTest (Sensor) with id 1:

https://[FrostGeotechServerAddress]/v1.1/Sensors(1)

Or to get the borehole collar with id 42:

https://[FrostGeotechServerAddress]/v1.1/BhCollarThings(42)

Related Lists

To get a list of entities related to a certain entity, one can navigate along relations. for instance, to get all Datastreams for Sensor (geoTechTest) with id 1:

https://[FrostGeotechServerAddress]/v1.1/Sensors(1)/Datastreams

Or to get the Trajectories related to borehole collar 1:

https://[FrostGeotechServerAddress]/v1.1/BhCollarThings(1)/BhTrajectoryThings

Or to get the Datastreams related to a Trajectory 1:

https://[FrostGeotechServerAddress]/v1.1/BhTrajectoryThings(1)/Datastreams

And from there, to get the Observations related to a Datastream 1:

https://[FrostGeotechServerAddress]/v1.1/Datastreams(1)/Observations

Filtering Lists

All lists can be filtered using the $filter parameter. To get a list of all the geotechTests that are of type CPT (sensorType https://data.geoscience.fr/ncl/Proc/86):

https://[FrostGeotechServerAddress]/v1.1/Sensors?$filter=sensortype eq 'https://data.geoscience.fr/ncl/Proc/86'

More complex queries

Get the results of the available DataStreams associated to my Geotechtest organised this way : (Depth, Result for property 1, Result for property 2, ...)

https://ogc-demo.k8s.ilt-dmz.iosb.fraunhofer.de/FROST-GeoTech/v1.1/BhTrajectoryThings(9)?
  $select=name&
  $expand=BhSamplings(
    $orderBy=atPosition;
    $select=atPosition,time;
    $expand=BhSamples(
      $top=1;
      $select=name;
      $expand=Observations(
        $top=3;
        $select=result,phenomenonTime;
        $expand=Datastream(
          $select=unitOfMeasurement;
          $expand=ObservedProperty(
            $select=name
          )
        )
      )
    )
  )

Get this same result in csv

is Currently not possible unfortunately, but Hylke has plans for it.

Get the CPT tests in this perimeter that match this lithology (Rock)

Given that BhTrajectoryThings(9) is the trajectory with the CPT test:

https://ogc-demo.k8s.ilt-dmz.iosb.fraunhofer.de/FROST-GeoTech/v1.1/BhTrajectoryThings(9)/BhSamplings?
  $filter=BhTrajectoryThing/BhCollarThing/RelatedBhCollarThings/BhTrajectoryThings/BhSamplings/BhSamples/Observations/result eq 'Rock'
    and atPosition gt BhTrajectoryThing/BhCollarThing/RelatedBhCollarThings/BhTrajectoryThings/BhSamplings/fromPosition 
    and atPosition lt BhTrajectoryThing/BhCollarThing/RelatedBhCollarThings/BhTrajectoryThings/BhSamplings/toPosition

Get the results of those same CPT tests

https://ogc-demo.k8s.ilt-dmz.iosb.fraunhofer.de/FROST-GeoTech/v1.1/BhTrajectoryThings(9)/BhSamplings?
  $filter=BhTrajectoryThing/BhCollarThing/RelatedBhCollarThings/BhTrajectoryThings/BhSamplings/BhSamples/Observations/result eq 'Rock'
    and atPosition gt BhTrajectoryThing/BhCollarThing/RelatedBhCollarThings/BhTrajectoryThings/BhSamplings/fromPosition 
    and atPosition lt BhTrajectoryThing/BhCollarThing/RelatedBhCollarThings/BhTrajectoryThings/BhSamplings/toPosition&
  $expand=BhSamples($expand=Observations)

Introduction

Geotech concepts

Book A concepts

Hole in the ground

For the activity of observation and its results

For the activity of sampling and preparation

Book B concepts

For Geological Modeling

For Hydrogeological Modeling

For Geotechnical Modeling

For Hazard Modeling

Book C concepts

ISO & OGC GeoTech Model

General considerations

ISO19148 and ISO19156

SensorThingsAPI datamodel

GeoSciML

GroundWaterML2

EPOS WP15

LandInfra & InfraGML

INSPIRE Theme III: Natural Risk Zone

Implementation guide, resources and examples

Exposing geotech investigation data with OGC SensorThings API

Vocabulary and codelist for geotech

Conclusions

Clone this wiki locally