WKT can represent the following distinct geometric objects: •
Point, MultiPoint •
LineString, MultiLineString •
Polygon, MultiPolygon,
Triangle •
PolyhedralSurface • TIN (
Triangulated irregular network) • GeometryCollection Coordinates for geometries may be 2D (
x,
y),
3D (
x,
y,
z), 4D (
x,
y,
z,
m) with an
m value that is part of a
linear referencing system or 2D with an
m value (
x,
y,
m). Three-dimensional geometries are designated by a "Z" after the geometry type and geometries with a
linear referencing system have an "M" after the geometry type. Empty geometries that contain no coordinates can be specified by using the symbol EMPTY after the type name. WKT geometries are used throughout OGC specifications and are present in applications that implement these specifications. For example,
PostGIS contains functions that can convert geometries to and from a WKT representation, making them human readable. The OGC standard definition requires a polygon to be topologically closed. It also states that if the exterior linear ring of a polygon is defined in a counterclockwise direction, then it will be seen from the "top". Any interior linear rings should be defined in opposite fashion compared to the exterior ring, in this case, clockwise. The following are some other examples of geometric WKT strings: (Note: Each item below is an individual geometry.) GEOMETRYCOLLECTION(POINT(4 6),LINESTRING(4 6,7 10)) POINT ZM (1 1 5 60) POINT M (1 1 80) POINT EMPTY MULTIPOLYGON EMPTY TRIANGLE((0 0 0,0 1 0,1 1 0,0 0 0)) TIN (((0 0 0, 0 0 1, 0 1 0, 0 0 0)), ((0 0 0, 0 1 0, 1 1 0, 0 0 0))) POLYHEDRALSURFACE Z ( PATCHES ((0 0 0, 0 1 0, 1 1 0, 1 0 0, 0 0 0)), ((0 0 0, 0 1 0, 0 1 1, 0 0 1, 0 0 0)), ((0 0 0, 1 0 0, 1 0 1, 0 0 1, 0 0 0)), ((1 1 1, 1 0 1, 0 0 1, 0 1 1, 1 1 1)), ((1 1 1, 1 0 1, 1 0 0, 1 1 0, 1 1 1)), ((1 1 1, 1 1 0, 0 1 0, 0 1 1, 1 1 1)) ) ==Well-known binary==