New Spatial Data Types
Applies: SQL Server 2008 (Katmai) CTP November 2007, SQL Server 2008
Enterprise Edition
SQL Server 2008 will be the first version of SQL Server to support spatial data
and spatial operations natively. SQL Server 2008 introduces the geometry and the
geography data types for storing spatial data. Geometry is a planar spatial data
type, while geography represents data in a round-earth coordinate system
(ellipsoidal) like latitude and longitude coordinates. Both data types are
implemented as .NET CLR (Common Language Runtime) data types in Microsoft SQL
Server 2008.
The geometry data type is based on the
OGC (Open Geospatial
Consortium) standards and supports the standard methods on geometry
instances. Meanwhile, the geography data type uses coordinate system known as
WGS 84 which is used by most GPS systems.
The geometry and geography data types support the following seven instantiable
spatial data objects: Point, MultiPoint, LineString, MultiLineString, Polygon,
MultiPolygon and GeometryCollection.
Microsoft SQL Server 2008 will introduce approximately 70 methods or functions
to support operations with these two new data types.
The benefits of these new spatial data types are:
|
Spatial data types will allow to build location-enabled
applications and services. So expect to see many interesting location-aware
products in the near future using SQL Server spatial data types. |
|
Both spatial data types will benefit from the new spatial
indexes providing high-performance queries. |
|
Extensibility through geospatial services such as
Microsoft Virtual Earth. |
The following example defines a point using the geography data type with
coordinates of (18.25, 69.40) representing latitude and longitude for the SDQ
Airport at Santo Domingo, Dominican Republic.
Finally, another example, this time using the geometry data type to
represent a polygon.
References.
Microsoft SQL Server 2008 Spatial Data Types
http://www.microsoft.com/sql/2008/technologies/spatial.mspx
The Data Plaftorm Insider
http://blogs.technet.com/dataplatforminsider/archive/2007/11/30/my-favorite-sql-server-2008-feature.aspx
SQL Server 2008 Books Online
|