将数据集导入ContextBroker

时间:2016-11-30 08:42:08

标签: fiware fiware-orion fiware-cygnus

我目前有2个大型数据集(大约200GB),我想存储到ContextBroker中以便对其进行数据分析。到目前为止,我已经能够使用ContextBroker设置MongoDB。我还安装了Cygnus订阅ONCHANGE,以便保留ContextBroker的数据。是否可以使用CKAN将我的外部数据集存储到FIWARE平台中,还是必须使用其他内容?

Edit1 :这些数据集是一组json个文件,其中包含具有一系列事件且timestampedgeo-located的对象。

Edit2 :根据要求提供的一小部分数据,我指的是:

{"track":[  
{"time":"2015-11-16T00:45:29.016","midpoint":{"x":70.66,"y":188.90},"realworld":{"x":-7.49,"y":22.96},"RDCoordinate":{"x":161582.09,"y":383031.34},"UTM-WGS84":{"Latitude":51.4363489,"Longitude":5.4818640}},
{"time":"2015-11-16T00:45:29.022","midpoint":{"x":66.85,"y":189.61},"realworld":{"x":-7.53,"y":22.92},"RDCoordinate":{"x":161582.16,"y":383031.34},"UTM-WGS84":{"Latitude":51.4363489,"Longitude":5.4818649}},
{"time":"2015-11-16T00:45:29.029","midpoint":{"x":61.66,"y":189.92},"realworld":{"x":-7.60,"y":22.90},"RDCoordinate":{"x":161582.22,"y":383031.31},"UTM-WGS84":{"Latitude":51.4363486,"Longitude":5.4818658}},
{"time":"2015-11-16T00:45:29.082","midpoint":{"x":56.16,"y":190.47},"realworld":{"x":-7.66,"y":22.87},"RDCoordinate":{"x":161582.28,"y":383031.28},"UTM-WGS84":{"Latitude":51.4363483,"Longitude":5.4818667}},
{"time":"2015-11-16T00:45:29.090","midpoint":{"x":50.74,"y":191.64},"realworld":{"x":-7.71,"y":22.80},"RDCoordinate":{"x":161582.38,"y":383031.28},"UTM-WGS84":{"Latitude":51.4363483,"Longitude":5.4818681}},
{"time":"2015-11-16T00:45:29.112","midpoint":{"x":45.58,"y":192.07},"realworld":{"x":-7.78,"y":22.78},"RDCoordinate":{"x":161582.44,"y":383031.25},"UTM-WGS84":{"Latitude":51.4363480,"Longitude":5.4818690}},
{"time":"2015-11-16T00:45:29.151","midpoint":{"x":41.80,"y":193.42},"realworld":{"x":-7.80,"y":22.69},"RDCoordinate":{"x":161582.52,"y":383031.31},"UTM-WGS84":{"Latitude":51.4363486,"Longitude":5.4818701}},
{"time":"2015-11-16T00:45:29.197","midpoint":{"x":36.27,"y":194.43},"realworld":{"x":-7.86,"y":22.63},"RDCoordinate":{"x":161582.59,"y":383031.31},"UTM-WGS84":{"Latitude":51.4363486,"Longitude":5.4818712}}  
]}

1 个答案:

答案 0 :(得分:0)

可能性是在Orion Conext Broker中以下列方式将每个项目建模为Event类型的实体:

{
    "id": "Item1",
    "type": "Event",
    "time": {
        "value": "2015-11-16T00:45:29.016",
        "type": "DateTime"
    },
    "midpoint": {
        "value": {
            "x": 70.66,
            "y": 188.90
        },
        "type": "Object"
    },
    "realworld": {
        "value": {
            "x": -7.49,
            "y": 22.96
        },
        "type": "Object"
    },
    "RDCoordinate": {
        "value": {
            "x": 161582.09,
            "y": 383031.34
        },
        "type": "Object"
    },
    "UTM-WGS84": {
        "value": "51.4363489, 5.4818640",
        "type": "geo:point"
    }
}

(以上内容可用作创建该实体的POST /v2/entities操作的有效负载。)

在此模型中,timemidpointrealworldRDCoordinateUTM-WG84是实体属性。请注意timeUTM-WG84的特殊属性类型:

  • time使用DateTime,这是指定日期的NGSIv2标准方式(请参阅NSGIv2 specification document中的“特殊属性类型”)。我建议加入时区,以便有更高的精确度(例如2015-11-16T00:45:29.016Z)。

  • UTM-WG84使用geo:point,这是NGSIv2为实体指定点位置的标准方式(请参阅NSGIv2 specification document中的“实体的地理空间属性”)。