一直在努力将 TMC 位置代码映射到 GPS 坐标,以获取来自 Here API 的交通流数据
https://developer.here.com/documentation/location-library/dev_guide/docs/location-referencing-tmc.html
我可以在这里看到它可能是可能的来自 Java - 有谁知道直接(API 密钥,而不是应用程序代码)API URL?互联网上似乎找不到澳大利亚的 TMC 表。
或者,有谁知道为什么在指定形状位置参数时,它在流 API 上没有那么多结果?
Been struggling to map TMC location codes to GPS coordinates for traffic flow data from the Here API
https://developer.here.com/documentation/location-library/dev_guide/docs/location-referencing-tmc.html
I can see here it might be possible from Java - does anyone know the direct (API key, not app code) API URL? The TMC tables for Australia do not seem to be available on the internet.
Alternatively does anyone know why when specifying shape location params instead, it doesn't have nearly as many results on the flow API?
发布评论
评论(1)
如何获取澳大利亚的 TMC 表可在此处 https://demo.support.here.com/pde/layer?region=AUS&release=latest&url_root=pde.api.here.com&layer=LINK_TMC_FC3
请搜索所有 LINK_TMC 层 FC1 -FC5 上 https://demo. support.here.com/pde/layers?region=AUS&release=latest&url_root=pde.api.here.com
在这里您可以找到 TMC 代码的描述: 以逗号分隔的 TMC 点位置列表,指向此链接所引导的病房。格式:
国家标识符(1 个字母)、位置表编号 (1...99)、TMC 路径方向 (+-PN)、点位置编号 (1...65535)、链路上的行驶方向(F=来自参考节点,T =到参考节点)
示例:D1+10863F
如何获取沿路线的 LINK_TMC 图块,请查看此示例:https://demo.support.here.com/examples/v3.1/map_attributes_along_route
示例请求获取按走廊的交通流量悉尼半径 100m:
获取形状:https://data.traffic.hereapi.com/v7/flow?in=corridor:BG1zvzgC-83sgJNBjI7BjDTzFTvCTvCAjD4hB7BkSvC4X7BkS3Dok BnBgP7B4X7B8QAoGjIgrC_E84BTwHTgKnBsTTsOjIA_EAnGTjrBnGriBrEjS7B_JT7LTvgB_E7uBnGvR7BvvBrE_TjDvH7BzF7BnGvCjNrEjIvCvH7BzFn B3DT_ET3NvC_iB7GrdzF_ET_J7BzKvC7LvCnLvCnGnB7GnBrET3InBzFTnGTnGTjInBjInB_J7B7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7BzFT_ETjInBzFT_JnB3InBvHnBnGnB7GnBnLvCvR3DzZzFjX_EjSrE3czFrOjDjS3D36BzKzFT_EnBvHvC_E7BrEnBrEnB3I7B7GnBvWjDnLnBrO7 B7V3DjSvCnGT_JnB_ETjIA7GUzFUnGA7LA3NTzPvCzK7BrJ7B3I7BjI7BzPjDnLvCzFnB3I7BnQrE_YnG3cvHzPrEvMjDvb7GriBrJna7GzP3DzFTzFAjI UzK8GrJkIrJ4I7LsJrO8L_JwHjcsTUwCT4D7BwCvCoBjD7BnBvC7VgU_sBokBvWwRnf7Q7G3DvHrEztB_Y3N3I7BT74Brd_EjDrEvC3D7BjDnBjDnB3DT3 DA_JsJjDkDjD4DjDsErE8G7BsO7BkNTgFnB4IjD8VnBsJnBwHTkDnB4DkhB4SmNzG;r=100&apikey=***&locationReferencing=tmc
您可以看到两者(形状和形状) tmc)上面的url(不要忘记设置你的apikey)此时响应106流量位置。
FlexiblePolyline 中的路线: https://github.com/heremaps/flexible-polyline
请使用路线v8 API(https://developer.here.com/documentation/routing-api/dev_guide/index.html)以 FlexPolyline 格式获取路线形状。
Playground路线计算:https://demo.routing.ext.here.com/
一些解码/编码灵活折线的工具 https://demo.support.here.com/examples/v3.1/spatial_tools
How to get a TMC tables for Australia is available here https://demo.support.here.com/pde/layer?region=AUS&release=latest&url_root=pde.api.here.com&layer=LINK_TMC_FC3
Search please all LINK_TMC layers FC1-FC5 on https://demo.support.here.com/pde/layers?region=AUS&release=latest&url_root=pde.api.here.com
There you find the description of TMC code: Comma separated list of TMC point locations, to wards whom this link leads. Format:
Country Identifier (1 letter), Location Table Number (1...99), TMC Path Direrction (+-PN), Point Location Number (1...65535), driving direction on link (F=from reference node, T=to reference node)
Example: D1+10863F
How to get LINK_TMC tiles along a route please look at this example: https://demo.support.here.com/examples/v3.1/map_attributes_along_route
Example requests get traffic flow by corridor with radius 100m in Sydney:
get shapes: https://data.traffic.hereapi.com/v7/flow?in=corridor:BG1zvzgC-83sgJNBjI7Bj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dzF_ET_J7BzKvC7LvCnLvCnGnB7GnBrET3InBzFTnGTnGTjInBjInB_J7B7GnBvHnB3I7B7GnB7GnBnGTnGTvHTvHAvHUnGUvWTvRAzFA_EAnGAvHA7GAjNU3IUzFA_EAzPoBrJAvMTjITvHTzFT_JnB_JnBrO7B3wBzF_JnB7LnB7L7B7GTrOT7GTrJTnLnBrET3I7BrET7GnBzUrE3I7BvMvC7L7BzFT_ETjInBzFT_JnB3InBvHnBnGnB7GnBnLvCvR3DzZzFjX_EjSrE3czFrOjDjS3D36BzKzFT_EnBvHvC_E7BrEnBrEnB3I7B7GnBvWjDnLnBrO7B7V3DjSvCnGT_JnB_ETjIA7GUzFUnGA7LA3NTzPvCzK7BrJ7B3I7BjI7BzPjDnLvCzFnB3I7BnQrE_YnG3cvHzPrEvMjDvb7GriBrJna7GzP3DzFTzFAjIUzK8GrJkIrJ4I7LsJrO8L_JwHjcsTUwCT4D7BwCvCoBjD7BnBvC7VgU_sBokBvWwRnf7Q7G3DvHrEztB_Y3N3I7BT74Brd_EjDrEvC3D7BjDnBjDnB3DT3DA_JsJjDkDjD4DjDsErE8G7BsO7BkNTgFnB4IjD8VnBsJnBwHTkDnB4DkhB4SmNzG;r=100&apikey=***&locationReferencing=tmc
you can see for both(shape & tmc) above urls(don't forget to set your apikey) response 106 traffic location at this moment.
Route in FlexiblePolyline: https://github.com/heremaps/flexible-polyline
Please use Route v8 API(https://developer.here.com/documentation/routing-api/dev_guide/index.html) to get route shape in FlexiblePolyline format.
Playground route calculation: https://demo.routing.ext.here.com/
Some tools to decode/encode flexible polyline https://demo.support.here.com/examples/v3.1/spatial_tools