计算GPS坐标半径 [英] Calculating gps coordinate radius

查看:307
本文介绍了计算GPS坐标半径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的坐标:

lat:45.815005
lon:15.978501



和i有MySQL表格,经纬度和坐标存储为float



我需要的是获得500米左右的所有坐标吗?

所以基本上我的问题是将X米添加到我的坐标位置

另外:如何分隔坐标45.815005(45 | 81 | 50 | 05?所以我可以将它们存储在mysql中使用索引进行更快的搜索? 解决方案

MySQL支持 空间扩展 (引用) em>:


MySQL支持对
的空间扩展,支持地理要素的生成,存储和
分析。

使用这些坐标,而不是以自己的方式存储坐标,可能会有所帮助, ulations。


I have this coordinates:

lat: 45.815005 lon: 15.978501

and i have mysql table with lat and lon coordinates stored as float

what i need is to get all coordinate in 500 meters around me?

so basicly my problem is to add X meters to my coordinate location

Also: how can i separate coordinate 45.815005 (45 | 81 | 50 | 05 ???) so i can store them in mysql using indexes for quicker search?

解决方案

MySQL supports a spatial extension (quoting) :

MySQL supports spatial extensions to enable the generation, storage, and analysis of geographic features.

Using those, instead of storing coordinates your own way, might help, when it comes to geographical manipulations.

这篇关于计算GPS坐标半径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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