首页 > 数据库技术 > 详细

SQL-geography && Spatial result

时间:2015-03-22 20:46:50      阅读:374      评论:0      收藏:0      [点我收藏+]

说起geography(地理)这个类型,我感觉好陌生,以前真的没有见过,今天在查询某个Address表的时候,却发现了新大陆——Spatial result(空间的结果)。

(1)表的结构

技术分享

(2)查询显示的结果

技术分享

(3)Spatial result

技术分享

(4)为了验证我的猜想,我把地图调用出来了。搜索了bothell这个地方。

技术分享

大致区域吻合了。

为了具体了解这个类型,我进官网查看了一下。

Spatial Data (SQL Server)

大致的意思如下:

空间数据表示关于几何对象的物理位置和形状的信息。这些对象可以是点位置或更复杂的对象,如国家,道路,或湖泊。

SQL Server的支持两种空间数据类型:几何数据类型(geometry)和地理数据类型(geography)。

几何类型数据表示在欧几里得(平面)坐标系。

地理类型代表在一个圆形地球数据的坐标系。

这两种数据类型实现为SQL Server的.NET公共语言运行时(CLR)数据类型。

英文如下:

Spatial data represents information about the physical location and shape of geometric objects. These objects can be point locations or more complex objects such as countries, roads, or lakes.

SQL Server supports two spatial data types: the geometry data type and the geography data type.

The geometry type represents data in a Euclidean (flat) coordinate system.

The geography type represents data in a round-earth coordinate system.

Both data types are implemented as .NET common language runtime (CLR) data types in SQL Server.

官网链接如下:

https://msdn.microsoft.com/en-us/library/bb933790%28v=sql.110%29.aspx

技术分享

SQL-geography && Spatial result

原文:http://www.cnblogs.com/zi-xing/p/4357850.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!