简体   繁体   English

如何从服务器端的客户端计算到给定点的最接近坐标

[英]How to calculate the closest co-ordinates to a given point from a client on server side

I have a user current location and a radius which I send to server. 我有一个用户当前位置和发送到服务器的半径。 I want server to return only locations inside a given radius. 我希望服务器仅返回给定半径内的位置。 (I am not sure how many locations I will have in server's DB) (我不确定服务器的数据库中将有多少个位置)

Application written in Java for android platform and server written in Java. 用Java编写的适用于android平台的应用程序和用Java编写的服务器。

Edited: Spatial MySQL DB ,Found this very helpful after seeing the answer below. 编辑: Spatial MySQL DB ,看到下面的答案后发现这很有帮助。

使用Spatial数据库 ,他们可以处理此类请求。

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

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