Search

Tuesday, May 31, 2011

Spatial Data Types


MSSQL 2008 introduced Geography and Geometry data types for storing and manipulating geodetic data.

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 data type is used to store flat map data like points, lines, and shapes. Geography data type takes account of the curvature of the Earth in addition. Both data types provide the ability to perform spatial operations on geography instances. Geography and Geometry are likely to be supported in MSSQL 2008 Express versions.

These spatial types enable users to perform SQL queries and operations on spatial data within SQL Server 2008 R2 directly. You can also index those columns that store spatial data types. 

Geography data type has functions which support parsing back from the known geo formats supported by the OGC (Open Geospatial Consortium) like text formats, binary representations, GML (Geography Markup Language - XML for geo data).

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 approx 70 methods or functions to support operations with these two new data types. Some supported functions include STArea(), STIntersects(), STUnion() for polygons and STDistance() for points.

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.

Spatial datatype, methods and indexes will be supported equally on all SQL Server editions (Express, Workgroup, Standard and Enterprise) at no extra charge. That means anyone who wants to use the SQL Server 2008 Spatial can download the free Express version and start working with spatial databases. Express will still have its limitations as it does now but you have to believe that this puts a huge damper on middleware producers that are targeting .NET developers

1 comment:

  1. Usually I do not read post on blogs, but I would like to say that this write-up very forced me to try and do it! Your writing style has been surprised me. Great work admin.Keep update more blog.
    SQL Server Training in Chennai

    ReplyDelete