简体   繁体   English

GAE搜索API中地理点的距离()函数精度

[英]distance() function accuracy for geopoints in GAE search API

Does anyone have any experience or know of any documentation regarding the accuracy of the distance() function for geopoints in GAE search API? 有没有人对GAE搜索API中的geopoints的distance()函数的准确性有任何经验或知道?

I have 2 lat / long geo points, 47 meters apart. 我有2个纬度/长的地理点,相距47米。 The distance is a fact as I have measured it. 距离是我测量的事实。 Google maps also confirms that to this accuracy. 谷歌地图也证实了这一准确性。

However when I use the distance() function in a search API context, with first point being the origin, the second point is already retuned by the search at 26 meters (< 26 meters). 但是,当我在搜索API上下文中使用distance()函数时,第一个点是原点,第二个点已经被搜索在26米(<26米)处重新调整。 I would expect < 47 or < 48. 我希望<47或<48。

Maybe the short distance is an issue. 也许短距离是一个问题。 However, I would expect 1, 2 maybe 5 meters error margin, not 20. If it is the case, then not very practical for "query all restaurants within a radius of 50 or 100 meters" 但是,我预计1,2或5米的误差范围,而不是20.如果是这样,那么“查询半径50或100米范围内的所有餐馆”都不太实用

A few things to investigate: 需要调查的一些事项:

  • how accurate are the coordinates you are passing to distance()? 你传递到距离()的坐标有多准确?
  • what is generating the points you are passing to distance()? 什么产生你传递到距离()的点?
  • are you truncating the points to some lower precision? 你是否将这些点截断到更低的精度?

One arc-second of latitude is about 31 meters, so if you want ± 5 meters accuracy, because errors accumulate, then each input needs to be ± 3.5 meters of its actual location, or ± 0.1 arc-seconds of accuracy. 纬度的一弧秒约为31米,因此如果您想要±5米的精度,由于误差累积,则每个输入需要距其实际位置±3.5米,或±0.1弧秒的精度。 In decimal, this is ± 0.00003 degrees. 十进制,这是±0.00003度。

If you're using GPS to supply the coordinates, this is within its capability, but not reliably. 如果您使用GPS提供坐标,这是在其能力范围内,但不可靠。 It can guarantee ± 4 meters accuracy 95% of the time, so the best you might expect is ± 6 meters accuracy for distance. 它可以在95%的时间内保证±4米的精度,因此您可能期望的最佳距离是±6米精度。

Are you doing your testing in the development environment? 您是否在开发环境中进行测试? Supposedly the distance() function isn't available in the development environment: https://developers.google.com/appengine/docs/python/search/devserver 据推测,开发环境中没有distance()函数: https//developers.google.com/appengine/docs/python/search/devserver

Maybe its available, but not reliable. 也许它可用,但不可靠。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM