Working with geography

All of the methods we’ve covered for the geometry type work just the same for the geography type. The only real difference from our perspective is that we must use longitude and latitude values. Internally, as explained, SQL Server automatically compensates for the earth’s curvature when performing calculations against our geography data. In the rest of our discussion of geospatial support in SQL Server 2008, we’ll show applied use of the geography data type.

Another subtle but important difference to be aware of is that geography points must be defined in a counterclockwise fashion. You can load geometry points in either clockwise or counterclockwise order, but attempting to load a geography shape in clockwise order will ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.