Defining Space with Well-Known Text

Shapes are projected onto spatial models using vector objects—which are collections of points, lines, and polygons (closed shapes). Both the geometry and geography data types support the same Well-Known Text (WKT) markup language, which is a convention that expresses the vector objects that you define using a syntax governed by the OGC.

Table 9-1 shows some examples of WKT strings.

Table 9-1. examples of WKT Strings

WKT String

Description

POINT(6 10)

A single point at xy-coordinates 6, 10

POINT(-111.06687 45.01188)

A single point on the earth (longitude/latitude coordinates)

LINESTRING(3 4,10 50,20 25)

A two-part line, drawn between three points specified as xy-coordinates

POLYGON((

-75.17031 39.95601, -75.16786 ...

Get Programming Microsoft® SQL Server™ 2008 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.