HERE API中的交通流请求返回邻近范围之外的结果 [英] Traffic flow request in HERE API returns results outside of the proximity

查看:53
本文介绍了HERE API中的交通流请求返回邻近范围之外的结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取希腊萨洛尼卡100m附近的交通流量数据.具体来说,我将请求发送到以下位置:

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

返回的json对象包含此区域之外的路段.实际上,即使更改接近半径或它在城市内的中心,似乎也总是得到与响应相同的对象,该响应似乎由城市内的一些主要道路组成.

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.

推荐答案

API给出了正确的响应,但是问题是,即使您可以将半径指定为1或100米,该服务实际上仅支持最小分辨率1 km .这是由于数据是如何存储在基于图块的服务中的.

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.

,然后将每个这样的请求转换为具有预定义大小的图块.因此,一个100米的请求可以轻松地以1x1 km大小的磁贴结束.这就是为什么您将流量吸引到较小的范围之外的原因.

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.

这篇关于HERE API中的交通流请求返回邻近范围之外的结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆