You are trying the new MyGeodata Cloud. Send feedback Back to the previous version

Vector · Table & spreadsheet

WKT — Well-Known Text (.csv + WKT column)

OGC plain-text encoding of vector geometries, including curves, usually stored in a CSV or database column.

Type
Vector · Table & spreadsheet
Extension
.csv, .wkt, .txt
Converter
Read & write
Coordinate system
Any (EPSG, ESRI, custom)
Layers
Single

What is a WKT file?

Well-Known Text (WKT) is a text markup language for representing vector geometry. It is defined by the Open Geospatial Consortium in the Simple Features specification, which is also published as ISO 19125. Curve types such as circular strings, compound curves and curve polygons come from the related SQL/MM standard. A WKT string such as LINESTRING (30 10, 10 30, 40 40) describes a single geometry. For data exchange it is therefore usually stored in a column of a CSV file or a database table alongside attribute fields.

WKT is human-readable and supported by most spatial databases and GIS libraries, which makes it convenient for debugging, scripting and moving geometries between systems. Plain WKT does not include a coordinate reference system; the PostGIS extended form (EWKT) adds an SRID prefix. The text encoding produces larger files and slower parsing than binary alternatives such as WKB. A separate WKT syntax exists for describing coordinate reference systems.

CSV files with a WKT column are commonly exchanged between database administrators, GIS analysts and developers who need to move geometries through tools that only handle plain text. Because WKT carries no coordinate reference system, the CRS must be agreed on separately. Also check the delimiter, text encoding, quoting of geometry strings that contain commas, and the name of the geometry column.

Typical uses

  • Exporting spatial database tables to a portable text file.
  • Loading geometries into PostGIS, SpatiaLite or QGIS from a spreadsheet-like file.
  • Debugging and inspecting geometries in scripts or SQL queries.
  • Exchanging geometry data between systems that lack a shared binary format.
Files: Plain text geometry encodings; often embedded in CSV/DB fields.

Sample WKT files — free download

Small, real datasets of the island of Saint Helena (OpenStreetMap, Copernicus DEM, Sentinel-2). Download them, open them in your software, or convert them in one click.

Preview of the sample data: Saint Helena roads and paths st-helena-roads-wkt.csv

Roads and paths (WKT)

110 named roads, streets, tracks and paths (OSM segments merged by name) with class, surface, speed limit and length. CSV with geometry as WKT in column WKT.

  • st-helena-roads-wkt · LineString · 110
  • EPSG:4326
  • 113.4 kB
Attributes (8)
idIntegernameStringclassStringrefStringonewayStringmaxspeedIntegersurfaceStringlength_mReal
1Airport Access RoadtertiaryNonenoNonepaved13088.3
2Airport Access RoadtertiaryNoneyesNonepaved177.1
3Casons RoadtertiaryNonenoNoneNone6132.5
4China LanetertiaryNoneyesNoneNone34.1
5Commonwealth AvenuetertiaryNoneno48asphalt3035.7

© OpenStreetMap contributors, ODbL 1.0

Preview of the sample data: Saint Helena land cover st-helena-landcover-wkt.csv

Land cover (WKT)

190 land-cover polygons (forest, scrub, farmland, residential, water, …) from OpenStreetMap with area in hectares. CSV with geometry as WKT in column WKT.

  • st-helena-landcover-wkt · Polygon · 190
  • EPSG:4326
  • 130.8 kB
Attributes (6)
idIntegerlandcoverStringosm_classStringnameStringarea_haRealosm_idString
1beachbeachNone0.6241102771696
2beachbeachSandy Bay Beach0.557550627544
3farmlandfarmlandNone4.50235798087
4farmlandfarmlandNone4.10835798079
5farmlandfarmlandNone3.73535798064

© OpenStreetMap contributors, ODbL 1.0

Frequently asked questions

Plain WKT stores no coordinate reference system, so software cannot know which one applies. Assign the correct CRS when importing, and check the axis order, since some tools expect longitude first and others latitude first.

Ready to convert your data?

Drop the files and the Converter does the rest — no install, no account needed for your first conversions.