Generated by GPT-5-mini| Well-Known Text | |
|---|---|
| Name | Well-Known Text |
| Acronym | WKT |
| Introduced | 1992 |
| Developer | Open Geospatial Consortium; International Organization for Standardization |
| File extension | .wkt |
| Type | Textual geometry interchange format |
Well-Known Text is a text markup language for representing geometric objects such as points, linestrings, polygons, and coordinate reference system definitions. It is specified by standards from the Open Geospatial Consortium and the International Organization for Standardization, and is widely implemented across geospatial software ecosystems including PostGIS, ArcGIS, QGIS, GeoServer, and GDAL. The format is used in applications ranging from cadastral mapping and planetary science to navigation systems and environmental modeling, interoperating with standards like Simple Features and file formats such as GeoJSON and Shapefile.
WKT encodes geometric primitives with a concise, human-readable syntax enabling exchange among systems such as PostGIS, Spatialite, Oracle Spatial, Microsoft SQL Server, and Esri ArcGIS products. It coexists with related standards including Well-Known Binary, Coordinate Reference System (CRS), EPSG, ISO 19111, and OGC Simple Features Specification. Major uses appear in projects led by institutions like NASA, European Space Agency, United States Geological Survey, National Aeronautics and Space Administration, and enterprises such as Google, Apple, Esri, and Microsoft for geoprocessing pipelines and spatial indexing.
WKT originated from the Open Geospatial Consortium and early spatial database implementations in the 1990s, influenced by work at research centers and vendors including University of California, Berkeley, Esri, Oracle Corporation, and Refractions Research. Key standardization milestones involved the ISO/TC 211 committee and the publication of ISO 19125 and ISO 19162 derivatives. Subsequent revisions addressed coordinate reference system representation, leading to interoperable profiles used by bodies like the European Petroleum Survey Group (now EPSG Geodetic Parameter Dataset), the FGDC, and national mapping agencies such as the Ordnance Survey and the United States Geological Survey.
WKT grammar specifies tokens for geometry types—POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, and GEOMETRYCOLLECTION—and the nested parentheses and coordinate tuples that define vertices. CRS specifications in extended WKT versions use AUTHORITY, DATUM, PROJECTION, and SPHEROID tokens interoperable with EPSG codes, PROJ definitions, and the WGS 84 datum. Parsers in libraries such as GEOS, Proj.4, OGR, Shapely, and Fiona implement lexical analysis and syntactic validation in accordance with OGC and ISO grammars, while toolchains in PostGIS, ArcGIS, and QGIS provide serialization and deserialization routines.
WKT supports explicit coordinate reference system description, enabling transformation between geographic and projected systems like WGS 84, NAD83, ETRS89, Mercator, Lambert Conformal Conic, and Transverse Mercator. Standardized parameters reference authority codes from EPSG or datasets managed by organizations such as OGC, ISO, European Space Agency, and national agencies like the Ordnance Survey and National Geospatial-Intelligence Agency. Interoperability depends on consistent interpretation of ellipsoids (e.g., GRS 80, WGS 72), datums (e.g., NAD27), and transformation pipelines implemented in PROJ and spatial databases.
WKT is implemented in spatial databases (PostGIS, Oracle Spatial, SQL Server), GIS desktop applications (ArcGIS, QGIS), server platforms (GeoServer, MapServer), and programming libraries (GEOS, GDAL/OGR, Shapely, Fiona, PyProj). It is exchanged in web services adhering to Web Feature Service and Web Map Service specifications, embedded in standards like CityGML, GML, and used by organizations including NASA, European Space Agency, USGS, Esri, Google, and Apple for map rendering, routing, and spatial analysis. Vendors and projects such as Refractions Research, Boundless Spatial, CartoDB, and Mapbox use WKT for import/export, testing, and API payloads.
Common WKT literals include examples like: - POINT(30 10) - LINESTRING(30 10, 10 30, 40 40) - POLYGON((30 10, 40 40, 20 40, 10 20, 30 10)) Stamped CRS examples reference EPSG codes such as "SRID=4326;POINT(-71.060316 48.432044)" used in PostGIS and Microsoft SQL Server integrations. Extended WKT includes detailed CRS blocks referencing authorities like EPSG, OGC, and ISO and employing ellipsoids such as WGS 84 or GRS 80 for precise geodetic usage in projects led by NOAA, USGS, and national mapping agencies.
Critiques of WKT center on ambiguities across versions, inconsistent CRS handling between OGC and ISO profiles, and interoperability issues among implementations such as PostGIS, Oracle Spatial, ArcGIS, QGIS, and GDAL/OGR. Alternatives like GeoJSON, Protobuf (Google), and WKB are preferred for certain web and binary use cases by organizations including Google, Mapbox, and Esri. Standards bodies (OGC, ISO/TC 211) and projects like PROJ and GDAL continue to evolve parsing and canonicalization to mitigate discrepancies affecting national agencies like the Ordnance Survey, USGS, and the National Geospatial-Intelligence Agency.
Category:Geographic information systems