有没有一种方法可以在HERE交通流结果中直接获取永久链接ID?

时间:2019-09-03 14:15:21

标签: here-api

我想使用交通流量数据通过拥堵因子之类的交通信息来增强路线。

推荐的方法似乎是获取一条路线,下载该路线的所有功能类别和区域的TMC磁贴,以及将路线链接与交通流数据中的TMC代码进行匹配,例如参见How to use HERE Maps to develop custom routing algorithms?

但是,交通流文档(TrafficML_RealTime_Specification_v3.2.2.docx)在“流项说明”中提到了标记“ SHP / LID”以包含链接ID,这可以简化整个过程:

SHP/LID:
LinkID associated with the SHP reference. The linkID will be in
driving direction order; “F” represents travel direction FROM
reference node, “T” represents travel direction TO reference
node (For example, 123456789T or 987654321F).

在我的API调用中,我明确请求形状(responseattributes = sh)并接收它们,但是没有提供“ LID”字段。

https://traffic.api.here.com/traffic/6.2/flow.json?corridor=52.5396895,12.9778897;52.5394964,12.9782331;52.5390244,12.9769778;52.539078,12.976774;52.5392067,12.9762483;52.5395072,12.9750788;52.5396144,12.974714;52.5397754,12.974124;52.5400114,12.9732764;52.5405693,12.9723108;52.5409126,12.9719353;52.5415349,12.97068;52.5416744,12.9694784;52.5404727,12.9654121;52.5387347,12.9640496;52.5384343,12.9646397;52.5380695,12.9651332;52.5379193,12.965219;52.5370181,12.9656482;52.5359452,12.9659379;52.5349581,12.9661417;52.5339067,12.9663348;1000&responseattributes=sh,fc&app_id=xxx&app_code=yyy

{
  "RWS": [
    {
      "RW": [
        {
          "FIS": [
            {
              "FI": [
                {
                  "TMC": {
                    "PC": 10213,
                    "DE": "Berlin-Spandau",
                    "QD": "+",
                    "LE": 4.18578
                  },
                  "SHP": [
                    {
                      "value": [
                        "52.55838,12.96583 52.55761,12.96545 52.55705,12.9652 52.55641,12.96494 52.55588,12.96473 52.55577,12.96468 "
                      ],
                      "FC": 1
                    },
                    {
                      "value": [
                        "52.55577,12.96468 52.55566,12.96464 "
                      ],
                      "FC": 1
                    },
...
                    {
                      "value": [
                        "52.55935,12.96635 52.55838,12.96583 "
                      ],
                      "FC": 1
                    }
                  ],
                  "CF": [
                    {
                      "TY": "TR",
                      "SP": 120,
                      "SU": 121.78,
                      "FF": 105,
                      "JF": 0,
                      "CN": 0.99
                    }
                  ]
                },

是否可以使用流数据接收永久ID?

1 个答案:

答案 0 :(得分:0)

有类似的问题和解决方案。

请在下面看看。

Why does not the TMC from traffic data match with the TMC from PDE layers LINK_TMC_FC?