WKT 📝

WKT (Well-Known Text)

Open Beta
.wkt · text/plain

WKT 是一种几何的文本表示格式,用于数据库(PostGIS、SpatiaLite)和 GIS 应用。简单且易于集成。

立即导出 WKT ✨ Open Beta — 免费无限制

主要特点

文本格式
OGC 标准
便于集成到数据库
支持所有几何类型

关于 WKT 格式

WKT (Well-Known Text) is the textual encoding of geometry from the OGC standard: POINT(37.6177 55.7558), LINESTRING(...), POLYGON((...)). It is understood by every spatial database and library — PostGIS, SpatiaLite, Shapely, JTS, GEOS — and it can be read by eye, which makes the format indispensable while debugging.

The export is taken when geometry is needed as text: to paste into an SQL query, to put into a test, to pass coordinates to someone else's system, to take a quick look at what came out of the selected area at all.

The output is a single text file in UTF-8. At the top are comments with the bounding box of the area and the coordinate system, then it goes layer by layer: a line like "-- layer: roads" with one geometry per line underneath it. Coordinates are in WGS84 (EPSG:4326) with six decimal places — that is about ten centimeters on the ground.

One important thing: WKT stores shapes only. There are no names, types or other OpenStreetMap tags in the file — if you need attributes, take GeoJSON, GeoPackage or a CSV with a WKT column.

打开 WKT 文件的程序

以下程序可以打开、编辑和处理从 OSM2CDR 导出的 WKT (Well-Known Text)(.wkt)文件:

💻PostGIS 💻SpatiaLite 🌎QGIS 💻Shapely (Python) 💻JTS (Java) 💻GEOS

格式规格

谁在使用 WKT 地图

🏗
数据库(PostGIS)
Geometry is pasted into SQL directly through ST_GeomFromText — with no converters and no intermediate files.
💻
编程开发
Convenient material for tests and debugging: the shape is visible to the eye right in the source.
📊
GIS 分析
Quick exchange of geometry between GIS tools, all of which understand WKT.
🎨
系统集成
Passing coordinates to an adjacent system that accepts plain text rather than GIS format files.

如何导出 WKT

1
选择区域
在 osm2cdr 的交互式地图上绘制矩形或多边形
2
选择 WKT
从 127 种可用导出格式中选择 WKT (Well-Known Text)
3
导出
点击导出,1–5 分钟内收到您的 .wkt 文件
4
下载
下载完成的 WKT 文件并在 PostGIS 中打开

导出后如何打开

WKT 格式的热门地图

Free

导出 WKT (Well-Known Text) 地图

从 OpenStreetMap 下载专业的 WKT 地图。即时生成,任意区域。

免费 / 导出
立即导出 WKT →

常见问题

什么是 WKT?
我能把 WKT 导入 PostGIS 吗?
Are names and tags preserved?
How do I tell which layer is which?
Which coordinate system and what precision?

与其他格式比较

相关格式

经常一起导出

Related Articles