This tool allows you to add sensor information received from a Context Broker into an ArcGIS Online or ArcGIS Server account.
To install Fiware-ArcGIS you just need to execute the following commands:
$ git clone git@github.com:esri-es/fiware_arcgis.git
$ cd fiware_arcgis
$ npm install
$ node fiware_arcgis.js
With these commands we launched the server and waits until we receive any requests from the Context Broker to process the information and add it to ArcGIS Online / Server.
Let's review the configuration file (config.json):
{
"debug": false,
"port": 4003,
"username": "<your user>",
"password": "<your password>",
"root_url": "www.arcgis.com",
"services_url": "services1.arcgis.com",
"account_id": "<your account id>",
"sensors":{
"traffic" : {
"serviceName": "Traffic sensors",
"route": "/santander_traffic",
"fields": [
["TimeInstant", "esriFieldTypeDate"],
["id", "esriFieldTypeString"],
["Latitud", "esriFieldTypeDouble"],
["Longitud", "esriFieldTypeDouble"],
["average_speed", "esriFieldTypeDouble"],
["median_speed", "esriFieldTypeDouble"],
["occupancy", "esriFieldTypeDouble"],
["trafficIntensity", "esriFieldTypeDouble"]
]
},
"lux" : {
"serviceName": "Lux sensors",
"route": "/santander_lux",
"fields": [
["TimeInstant", "esriFieldTypeDate"],
["id", "esriFieldTypeString"],
["Latitud", "esriFieldTypeDouble"],
["Longitud", "esriFieldTypeDouble"],
["temperature", "esriFieldTypeDouble"],
["luminousFlux", "esriFieldTypeDouble"],
["batteryCharge", "esriFieldTypeDouble"],
["acceleration", "esriFieldTypeDouble"]
]
},
"sound" : {
"serviceName": "Sound sensors",
"route": "/santander_sound",
"fields": [
["TimeInstant", "esriFieldTypeDate"],
["id", "esriFieldTypeString"],
["Latitud", "esriFieldTypeDouble"],
["Longitud", "esriFieldTypeDouble"],
["sound", "esriFieldTypeDouble"],
["batteryCharge", "esriFieldTypeDouble"]
]
},
"soundacc" : {
"serviceName": "Soundacc sensors",
"route": "/santander_soundacc",
"fields": [
["TimeInstant", "esriFieldTypeDate"],
["id", "esriFieldTypeString"],
["Latitud", "esriFieldTypeDouble"],
["Longitud", "esriFieldTypeDouble"],
["sound", "esriFieldTypeDouble"],
["batteryCharge", "esriFieldTypeDouble"],
["acceleration", "esriFieldTypeDouble"]
]
},
"bus" : {
"serviceName": "Bus sensors",
"route": "/santander_bus",
"fields": [
["TimeInstant", "esriFieldTypeDate"],
["TimeInstantModified", "esriFieldTypeDate"],
["id", "esriFieldTypeString"],
["index", "esriFieldTypeString"],
["line", "esriFieldTypeString"],
["position", "esriFieldTypeString"],
["service", "esriFieldTypeDouble"],
["speed", "esriFieldTypeDouble"],
["status", "esriFieldTypeDouble"],
["vehicle", "esriFieldTypeDouble"]
]
}
}
}
Let's see the configurations variables:
The next image shows where you will find the services_url and account_id values in ArcGIS Online: