AnsweredAssumed Answered

INI file for covjson object format

Question asked by Omar_Zurita on May 7, 2020
Latest reply on May 25, 2020 by Omar_Zurita

Hello,

We are trying to generate an INI file for a customer running the OSI PI system which is going to retrieve data (json objects) from our database via call to the API. The structure of our json object is called covjson, which is an industry standard format used in the GIS community among others. I am unable to make any progress in the section which "stores the events", in my opinion it requires some array indexing, that could be easily accomplished if this was done in a SW platform like python, but I don't know if it can be communicated to the PI system through the INI syntax.

 

Below is short sample of the json object, if it's not obvious, values for the time stamp are in "domain\axes\t[]"events would be stored as TimeStamp ("t") & one associated value (e.g. Chlorophyll) would be found at a different section ("ranges\CHL-A\values[]). The main questions is, how to write the INI so it can link the time stamps to values for the different "parameters" found in the "ranges" key.

 

Any help is greatly appreciated. Thank you

 

{
   "type":"Coverage",
   "domain":{
      "type":"Domain",
      "domainType":"PointSeries",
      "axes":{
         "x":{
            "values":[
               -122.248            
            ]
         },
         "y":{
            "values":[
               44.72
            ]
         },
         "t":{
            "values":[
               "20200426T120007Z",
               "20200426T120012Z",
               "20200426T120017Z",
               "20200426T120022Z",
               "20200426T120027Z",
               "20200426T120032Z",
               "20200426T120037Z",
               "20200426T120042Z",
               "20200426T120047Z",
               "20200426T120052Z"
            ]
         }
      },
      "referencing":[
         {
            "coordinates":[
               "x",
               "y"
            ],
            "system":{
               "type":"GeographicCRS",
               "id":"http://www.opengis.net/def/crs/OGC/1.3/CRS84"
            }
         },
         {
            "coordinates":[
               "t"
            ],
            "system":{
               "type":"TemporalRS",
               "calendar":"Gregorian"
            }
         }
      ]
   },
   "parameters":{
      "CHL-A":{
         "type":"Parameter",
         "description":{
            "en":"The measured chlorophyll-a concentration estimated with Gybe Sensor"
         },
         "unit":{
            "symbol":"ug/L"
         },
         "observedProperty":{
            "id":"http://vocab.nerc.ac.uk/standard_name/sea_water_salinity/",
            "label":{
               "en":"Chlorophyll-a Concentration"
            }
         }
      },
      "TUR-D":{
         "type":"Parameter",
         "description":{
            "en":"The turbidity (FNU) estimated with the Gybe Sensor"
         },
         "unit":{
            "label":{
               "en":"FNU"
            },
            "symbol":{
               "value":"Cel",
               "type":"http://www.opengis.net/def/uom/UCUM/"
            }
         },
         "observedProperty":{
            "id":"http://vocab.nerc.ac.uk/standard_name/",
            "label":{
               "en":"Turbidity (FNU)"
            }
         }
      }
   },
   "ranges":{
      "CHL-A":{
         "type":"NdArray",
         "dataType":"float",
         "axisNames":[
            "t"
         ],
         "shape":[
            10
         ],
         "values":[
            3.97943827e+01,
            8.36703180e+01,
            1.08724582e+02,
            1.22249000e+02,
            9.02004133e+01,
            1.95839639e+02,
            8.36661779e+01,
            8.42314042e+01,
            9.76563050e+01,
            1.22249000e+02
         ]
      },
      "TUR-D":{
         "type":"NdArray",
         "dataType":"float",
         "axisNames":[
            "t"
         ],
         "shape":[
            10
         ],
         "values":[
            1.59092748e+00,
            1.54927470e+00,
            1.49581838e+00,
            1.47939500e+00,
            1.52364578e+00,
            1.49568662e+00,
            1.50158534e+00,
            1.49920548e+00,
            1.45641780e+00,
            1.50926177e+00
         ]
      }
   }
}

Outcomes