GeoJSON vs WKT
WKT (Well-Known Text) is the OGC text format for geometry used by spatial databases. It stores only the geometry — no properties — with coordinates separated by spaces:
- Point
{"type":"Point","coordinates":[-0.1281,51.508]}→POINT (-0.1281 51.508) - LineString →
LINESTRING (x y, x y, …) - Polygon with a hole →
POLYGON ((outer…), (hole…)) - MultiPolygon →
MULTIPOLYGON (((…)), ((…))) - GeometryCollection →
GEOMETRYCOLLECTION (POINT (…), …)
Both use longitude first (x y). One feature converts to one WKT geometry; several features are combined into a GEOMETRYCOLLECTION. To get WKT for a single feature, select it and press Copy WKT in the panel.
WKT to GeoJSON
Paste WKT into Import (one geometry, or one per line). SRID=4326; prefixes (EWKT), Z coordinates and EMPTY geometries are understood. Then export GeoJSON.
Using WKT in SQL
- PostGIS:
ST_GeomFromText('POLYGON ((…))', 4326) - SQL Server:
geography::STGeomFromText('POLYGON ((…))', 4326) - MySQL:
ST_GeomFromText('POLYGON ((…))', 4326) - BigQuery:
ST_GEOGFROMTEXT('POLYGON ((…))')