NGSI datamodel to PoI operator は、FIWARE Data Models に従ったエンティティを Map ウィジェットに表示するために、エンティティをフォーマットするオペレータです。このため、エンティティに座標を含む属性を含める必要があります。また、このオペレータは、FIWARE Data Models に従っていないエンティティの場合、正しく動作しない可能性があります。このような場合、NGSI Entity2poi operator を使用してください。
ワイヤリング
 
入力データ

| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | {   "id": "airqualityobserved_1",   "type": "AirQualityObserved",   "CO": 365.748071499,   "CO_Level": "high",   "NO": 51.465215153,   "NO2": 67.382005495,   "NOx": 2.524494603,   "SO2": 15.619419412,   "address": {     "streetAddress": "streetname",     "addressLocality": "Antwerpen",     "addressCountry": "BE"   },   "airQualityIndex": 9.013966484,   "airQualityLevel": "good",   "dateObserved": "2019-08-10T07:45:25.00Z",   "location": {     "type": "Point",     "coordinates": [       4.432838,       51.257595     ]   },   "precipitation": 56,   "refPointOfInterest": "28079004-Pza.deEspanya",   "relativeHumidity": 0.401051481,   "reliability": 0.301225884,   "source": "http://random.data.from.quantumleap",   "temperature": -11.89573117,   "windDirection": 162.320200841,   "windSpeed": 0.154625896 } | 
出力データ

| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | [   {     "id": "airqualityobserved_1",     "icon": {       "anchor": [         0.5,         1       ],       "scale": 0.4,       "src": "https://wirecloud12.lab.e-suda.info/showcase/media/CoNWeT/ngsi-datamodel2poi/3.0.8/images/airquality/low.png"     },     "tooltip": "airqualityobserved_1",     "data": {       "id": "airqualityobserved_1",       "type": "AirQualityObserved",       "CO": 365.748071499,       "CO_Level": "high",       "NO": 51.465215153,       "NO2": 67.382005495,       "NOx": 2.524494603,       "SO2": 15.619419412,       "address": {         "streetAddress": "streetname",         "addressLocality": "Antwerpen",         "addressCountry": "BE"       },       "airQualityIndex": 9.013966484,       "airQualityLevel": "good",       "dateObserved": "2019-08-10T07:45:25.00Z",       "location": {         "type": "Point",         "coordinates": [           4.432838,           51.257595         ]       },       "precipitation": 56,       "refPointOfInterest": "28079004-Pza.deEspanya",       "relativeHumidity": 0.401051481,       "reliability": 0.301225884,       "source": "http://random.data.from.quantumleap",       "temperature": -11.89573117,       "windDirection": 162.320200841,       "windSpeed": 0.154625896     },     "title": "airqualityobserved_1",     "infoWindow": "<div><p><b><i class=\"fa fa-fw fa-address-card-o\"/> Address: </b><br/>streetname<br/>Antwerpen<br/>BE</p><p><b><i class=\"fa fa-fw fa-clock-o\"/> Date: </b> 2019年8月10日午後4時45分 土</p><p><b><i class=\"fa fa-fw fa-feed\"/> Source: </b> http://random.data.from.quantumleap</p><p><b><i class=\"fa fa-fw fa-list-ul\"/> Measures</b>:</p><ul>  <li><b>CO</b>: 365.75</li>  <li><b>NO</b>: 51.47</li>  <li><b>NO2</b>: 67.38</li>  <li><b>NOx</b>: 2.52</li>  <li><b>SO2</b>: 15.62</li></ul></div>",     "currentLocation": {       "system": "WGS84",       "lng": 4.432838,       "lat": 51.257595     },     "location": {       "type": "Point",       "coordinates": [         4.432838,         51.257595       ]     },     "style": {       "fill": "rgba(187, 207, 76, 0.3)",       "stroke": "rgba(187, 207, 76, 0.9)"     }   } ] | 
OpenLayers Map とのワイヤリング例
ワイヤリング
 
入力例
 
出力例
 
サンプルデータ
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #!/bin/sh curl "http://orion/v2/op/update?options=keyValues" -D - -sS \ -H 'Content-Type: application/json' \ -H 'Fiware-Service: wirecloud' \ -H 'Fiware-ServicePath: /data' \ -d @- <<EOF {   "actionType": "append",   "entities": [     {       "id": "airqualityobserved_1",       "type": "AirQualityObserved",       "CO": 365.748071499,       "CO_Level": "high",       "NO": 51.465215153,       "NO2": 67.382005495,       "NOx": 2.524494603,       "SO2": 15.619419412,       "address": {         "streetAddress": "streetname",         "addressLocality": "Antwerpen",         "addressCountry": "BE"       },       "airQualityIndex": 9.013966484,       "airQualityLevel": "good",       "dateObserved": "2019-08-10T07:45:25.00Z",       "location": {         "type": "Point",         "coordinates": [           4.432838,           51.257595         ]       },       "precipitation": 56,       "refPointOfInterest": "28079004-Pza.deEspanya",       "relativeHumidity": 0.401051481,       "reliability": 0.301225884,       "source": "http://random.data.from.quantumleap",       "temperature": -11.89573117,       "windDirection": 162.320200841,       "windSpeed": 0.154625896     }   ] } EOF | 
関連情報
- ソースコード: https://github.com/wirecloud-fiware/ngsi-datamodel2poi-operator
- ダウンロード: CoNWeT_ngsi-datamodel2poi_3.0.7.wgt

WireCloud widget and operatorWireCloud では、ウィジェットとオペレータと呼ばれる機能部品を組み合わせることで、Web アプリケーションやダッシュボードを作成...

 
											 
							
							
							
															 
							
							
							
															 
							
							
							
															 
										
					 
									


