SqlServer-geography && Spatial result

本文介绍了SQL Server中两种空间数据类型:几何数据类型(geometry)和地理数据类型(geography)。通过实例展示了如何使用这些类型来存储和查询地理位置信息,并提供了官方文档链接以供进一步学习。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

说起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

转载于:https://www.cnblogs.com/zi-xing/p/4357850.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值