Spatial Data Types

The geometry and geography data types are system CLR types, which means they are implemented by the .NET CLR internally by SQL Server. The geometry data type is provided to store and process spatial data using the planar model, whereas its counterpart geography supports the geodetic model.

One nice thing about the two spatial types is that most methods are supported and work the same for both types. So if you’re working with the geodetic model, you’ll be using longitude and latitude coordinates with the geography data type. For the planar model, you’ll be using x- and y-coordinates with the geometry data type. But in either case, you’ll then use many of the same methods for dealing with your spatial entities.

Working with geometry ...

Get Programming Microsoft® SQL Server® 2012 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.