Traffic flow request in HERE API returns results outside of the proximity

与世无争的帅哥 提交于 2020-01-24 23:30:06

问题


I am trying to get traffic flow data for a 100m proximity in Thessaloniki Greece. Specifically I send the request below:

https://traffic.api.here.com/traffic/6.1/flow.json?prox=40.63373%2C22.94515%2C100&app_id=devportal-demo-20180625&app_code=9v2BkviRwi9Ot26kp2IysQ

The returned json object contains road segments far outside this area. In fact it seems that even if I change the proximity radius or it's center within the city, I always get the same object as a response which seems to be consisted of some main roads inside the city.

Any idea why this is happening? I mean if there were no data for my proximity I would expect maybe an empty object as a response.


回答1:


API is giving correct response however the problem is, that even if you can specify 1 or 100 meters as radius the service really support only the smallest resolution of 1 km. This is due to how the data is stored in the service, which is tile based.

and each such a request is then converted to tiles - which have a predefined size. So a 100 meters request can end up in a tile of size 1x1 km easily. That is why you get traffic outside of a smaller proximity.



来源:https://stackoverflow.com/questions/58893652/traffic-flow-request-in-here-api-returns-results-outside-of-the-proximity

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!