gost / server

GOST - Go implementation of OGC SensorThings API
MIT License
61 stars 19 forks source link

Add option to get result values in array #42

Closed tomvantilburg closed 7 years ago

tomvantilburg commented 8 years ago

For very large datasets it would be nice to have a smaller overhead in the key-value pairs. Therefore I propose to add a format that sents the data as 1D arrays. I have added an example to give the idea but any other solution that gets rid of redundant 'keys' is also fine.

Current situation:

{
   "count": 200,
   "@iot.nextLink": "gost.geodan.nl/v1.0/Datastreams(8)/Observations/?$top=200&$skip=200",
   "value": [
      {
         "phenomenonTime": "2016-07-06T18:21:39.000Z",
         "result": 25.6
      },
      {
         "phenomenonTime": "2016-07-06T18:12:14.000Z",
         "result": 25.6
      },...

example desired situation:

{
   "count": 200,
   "@iot.nextLink": "gost.geodan.nl/v1.0/Datastreams(8)/Observations/?$top=200&$skip=200$format=condense",
  "values":{
      "phenomenonTime": ["2016-07-06T18:21:39.000Z","2016-07-06T18:12:14.000Z",...],
      "result":[25.6,25.6,...]
  }
bertt commented 7 years ago

looks like SensorThings Data Array Extensions? Format is a little different. https://en.wikipedia.org/wiki/SensorThings_API#Data_Array_Extensions

note: The data array extension is not implemented (yet)

bertt commented 7 years ago

new issue for implementing data array extension: https://github.com/Geodan/gost/issues/75

bertt commented 7 years ago

closing because https://github.com/Geodan/gost/issues/75