将数据集导入 ContextBroker

Import dataset into the ContextBroker

我目前有 2 个大型数据集(大约 200GB),我想将它们存储到 ContextBroker 中以便对其执行数据分析。到目前为止,我已经能够设置 ContextBrokerMongoDB。我还安装了带有 ONCHANGE 订阅的 Cygnus,以便保留来自 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}}  
]}

一种可能性是在 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 中的 "Special Attribute Types")。我建议包括时区,以获得更高的精度(例如 2015-11-16T00:45:29.016Z)。

  • UTM-WG84 使用 geo:point,这是为实体指定点位置的 NGSIv2 标准方法(参见 NSGIv2 specification document 中的 "Geospatial properties of entities")。