Representing Spatial Data

The Open Geospatial Consortium, Inc. (OGC) is a nonprofit, international, voluntary consensus standards organization that is leading the development of standards for geospatial and location-based services. The OGC defines different ways to represent geospatial information as bytes of data that can then be interpreted by the GEOMETRY or GEOGRAPHY types as being POINTS, LINESTRINGS, and so on. SQL Server 2008 supports three such formats:

• Well-Known Text (WKT)

• Well-Known Binary (WKB)

• Geography Markup Language (GML)

For the purposes of this chapter, we stick to WKT examples because they are both concise and somewhat readable. The syntax of WKT is not too difficult to understand, so let’s look at some examples:

• ...

Get Microsoft® SQL Server 2008 R2 Unleashed 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.