Geo attributes support

Hi everyone ! I’m actualy try to enhance the Warp10 datasource plugin.
In this one, a datasource query give us a structure like this:

{
  "c": "metricName",
  "l": {},
  "a": {},
  "v": [
    [
      1495010641774124, // Timestamp
      48.39451496489346, // Latitude
      -4.546853061765432, // Longitude
      0, // Altitude
      10 // Value
    ],
    [
      1495010641764238,
      47.39451498258859,
      -4.546853061765432,
      0,
      20
    ]
  ]
}

What is the best way to match Grafana Query return parameter, if we want to take care of the geo attributes ?

Thanks !

Can you provide some more detail?

Time series data is a timestamp and a value in principle. What do you want to do with the geo attributes? The Worldmap Panel is an example of how to take coordinates and translate them into groupings. It uses the Elasticsearch geohash aggregation to group values into a grid cell.

Worldmap Panel use some magic hack to handle external geo data.

I agree, TimeSerie is a timestamp and value set
but I speak about Query datapoints geoposition (a lattitude and a longitude for each datapoints of each Query)

Grafana datasource plugins already used a datapoints model like Warp10 one, an array of timestamp + value :

[
  {
    "target":"upper_75",
    "datapoints":[
      [622,1450754160000],
      [365,1450754220000]
    ]
  }
]

So my question is : is grafana ready to handle datapoints of type :
[ TS, VALUE ]
and
[ TS, LAT, LONG, ALT, VALUE ]

? :slight_smile:

Well, I wouldn’t describe the code as magic. All it does is take the data from different databases (time series, table and geohashes) and transforms them into the format Grafana expects. This is the function that handles geohash values from ElasticSearch. It returns the following in the response:

locationLatitude: decodedGeohash.latitude,
locationLongitude: decodedGeohash.longitude,

But that can only be used in the WorldMap Panel which can render coordinates as circles on a map, other panels would not be able to handle that data.

What are you expecting Grafana to do with [ TS, LAT, LONG, ALT, VALUE ]? For example, what would the Graph Panel do with Latitude, Longitude and Altitude?