这里地理编码API中的错误

时间:2018-11-04 05:37:19

标签: geocoding here-api proximityapi

使用Here地理编码api从给定位置(纬度,经度)获取LinkID。

示例:(37.399643,-121.953085);邻近距离= 50m;

https://reverse.geocoder.api.here.com/6.2/reversegeocode.json?prox=37.399643,-121.953085,50&mode=retrieveAddresses&locationAttributes=linkInfo&gen=9&app_id= {AppID}&app_code = {AppCode}

上面的查询工作完美。在位置返回适当的LinkID。见下文: enter image description here

现在,如果我们将接近半径从5m减小到5m-> API的响应就会跳到一个完全不同的位置。

https://reverse.geocoder.api.here.com/6.2/reversegeocode.json?prox=37.399643,-121.953085,5&mode=retrieveAddresses&locationAttributes=linkInfo&gen=9&app_id= {AppID}&app_code = {AppCode}

参见下文: enter image description here

此处返回的位置完全错误。突出显示的地点实际上距离正确的位置5-6英里。误差半径值<30m时似乎会发生此错误。

1 个答案:

答案 0 :(得分:0)

仅当街道几何形状在给定半径内时,反向Geocoder才会返回街道结果或街道上的地址。 否则,它会退回到区域级结果,并返回区域的中心,即邻近的中心点所在的位置。

示例:(37.399643,-121.953085);邻近距离= 22m

半径为22时,邻近区域仍包含街道几何形状。 反向地址解析器返回一个街道结果,即“ ReferenceId”:“ 1121660494”。 enter image description here

示例:(37.399643,-121.953085);邻近距离= 21m;

半径为21时-半径内没有一条街道。因此,Geocoder返回了城市中心–圣塔克拉拉(Santa Clara)上的链接。 enter image description here