O'Reilly logo

Programming Microsoft® SQL Server® 2012 by Leonard Lobel and Andrew Brust

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required