地理围栏...位置在围栏内吗?
我正在编写一个服务器端java应用程序,它从android设备获取位置更新。该设备正在沿着路线行驶,我希望能够确定它是否已到达其位置。 显而易见的解决方案是定义一个地理围栏...Android 设备的当前位置在该围栏内,然后它已到达其位置。
我的问题是这是否可以在服务器端java中完成。我知道可能有一些方法可以在客户端使用谷歌地图 API 来做到这一点,但这对我来说是不可能的。 是否有任何库可以提供此功能?
提前致谢
B
I'm writing a server side java application that takes location updates from an android device. The device is traveling along a route and I want to be able to determine if it had arrived at its location.
The obvious solution is to define a geo-fence...of the current location of the android device is within this fence then it has arrived at its location.
My question is whether this is possible to do in serverside java. I know there are probably ways to do it with google maps API on the client side but that's not possible for me.
Are there any libraries out there that will provide this functionality?
Thanks in advance
B
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实上,这些答案大部分都没有解决问题。地理围栏是一个规则的 n 边形,最初的问题并不是要确定到围栏内某个点的距离(即我是否接近纬度/经度),而是确定它们是否位于几何图形框中。
为此,最好的答案是执行以下操作:
http://www.codeproject.com/Articles/62482/A-Simple-Geo-Fencing-Using-Polygon-Method
Actually, most of these answers don't solve the problem. A geofence is a regular n-gon and the original question isn't trying to determine the distance to a point within the fence (i.e. am I close to a lat/lon) but rather whether or not they are within a box of geometry.
For that, the best answer is to do the following:
http://www.codeproject.com/Articles/62482/A-Simple-Geo-Fencing-Using-Polygon-Method