WKT Standard – Where to Find Well-Known Text References and Specifications

standardswell-known-text

I had a little confusion about the representation of a geometry as well-known-text (WKT). I was searching for the WKT Specs to search for the exact representation, but I did not find the Standard. Is there a standards document or reference for WKT? where can I find it?

Best Answer

Well known text for geometry is defined in OGC 01-103r4 (amongst other places). Section 7 of that document provides the syntax. There is also a list of SQL functions relating to those in Part 2 of the Simple Features spec (also an OGC product).

The ISO documents are just a more expensive way to get much the same thing.

There are useful extensions such as the Extended WKT (EWKT) that is defined by PostGIS and supported by various other tools such as SpatiaLite, and provides the SRS, which you probably want.

Update: As pointed out in a comment, there is also WKT representation for Coordinate Reference Systems: OGC 18-010r7. However these two WKT forms are using similar syntax to describe different things - one is for a geometry (e.g. a linestring), and the other for a CRS (e.g. for a geometric or temporal datum).