在SQL Server数据库中保存地理位置 [英] Save geolocation in SQL Server Database

查看:205
本文介绍了在SQL Server数据库中保存地理位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了移动设备当前的地理位置(long./lat。),我将这个地理位置在线存储在sql server 2008或2012数据库中。我如何检查我是否已经保存了这个位置(可能在半径100米内)?

如果我已经有位置,我就不会保存它。

稍后我将在bing map上显示所有位置。

I got mobile my current geolocation (long./lat.) , i will store this geolocation online in a sql server 2008 or 2012 Database. How can i check that i not already have this location (maybe in an radius of 100 meter) saved ?
If i have already the location , i don''t save it.
Later i will show all locations on a bing map.

推荐答案

实际上这很容易。您正在使用sql server 2008,此数据库支持地理数据类型。使用此数据类型,您可以轻松查询您要求的数据(半径为100米等)



地理数据类型入门 [ ^ ]
It''s actually quite easy to do this. You are using sql server 2008 and this database supports the geography data type. Using this datatype you can easily query data like you ask for (radius of 100 meter etc)

Getting Started with the geography Data Type[^]


此网站上有一篇文章:



搜索词,cp空间地理上的文章(勾号)



[ ^ ]
There is an article here on this site:

Search term, cp Article(tick) on "spatial geo"

[^]


这篇关于在SQL Server数据库中保存地理位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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