Closed pvgenuchten closed 6 months ago
Other option here would be to enable a multiselect on the Entity type in the sensorthings data source manager
QGIS would $expand the query with the selected entity types (which would be the main type?)
The result would be a hierarchical object of the main type and its children, is QGIS able to visualise such a data structure in the attribute table?
The logic behind user selection of main and subtypes is that every sensorthings API is different, some have a focus on feature-of-interest, some on location.
In order to prevent loading the full database it is important to limit the result by filters, or else a max number ($top). Providing user friendly filter options may be challenging, because filters may apply at any level (observation/result > 0, location/geometry within map bounds, observedProperty/name = 'FE')
@pvgenuchten this is on it's way for 3.38 :+1:
Nice! Always available to test/share thoughts..
Thanks Paul for testing and providing this idea, feel free to add some more and spread the word :)
Feature description
Sensorthings adds to each type (sensor, location, datastream) a set of navigationlinks which enable linkage between the types, actually one needs to follow the link to retrieve the actual identifier of the linked entity, or use the $expand option on the query to expand the basic query with additional types.
Qgis currently does not include these navigation links in the attribute table, which makes it hard to link datastreams to their related location and observations
Some samples:
https://airquality-frost.k8s.ilt-dmz.iosb.fraunhofer.de/v1.1/Sensors(15424)
https://airquality-frost.k8s.ilt-dmz.iosb.fraunhofer.de/v1.1/Datastreams(19801)
Suggestion would be to include the navigationlinks as column(s) to the attribute table, either as a json string like the properties snippet, or as an array by link type
Additional context
Sensorthings spec
This would enable me to add locations, things, datastreams and observations to my project and link them using joins, location has the coordinates, observations contains the actual measured values. I can even use the (latest) value in observation to style the icon of the location.