WKT 📝

WKT (Well-Known Text)

Open Beta
.wkt · text/plain

WKT là định dạng biểu diễn dạng văn bản cho các hình học, được dùng trong các cơ sở dữ liệu (PostGIS, SpatiaLite) và ứng dụng GIS. Đơn giản và dễ tích hợp.

Xuất WKT ngay ✨ Open Beta — miễn phí, không giới hạn

Tính năng chính

Định dạng văn bản
Chuẩn OGC
Dễ tích hợp cơ sở dữ liệu
Hỗ trợ mọi loại hình học

Giới thiệu về định dạng 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.

Chương trình nào mở được tệp WKT

Các chương trình và ứng dụng sau có thể mở, chỉnh sửa và làm việc với tệp WKT (Well-Known Text) (.wkt) được xuất từ OSM2CDR:

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

Format specifications

Ai sử dụng bản đồ WKT

🏗
Cơ sở dữ liệu (PostGIS)
Geometry is pasted into SQL directly through ST_GeomFromText — with no converters and no intermediate files.
💻
Lập trình
Convenient material for tests and debugging: the shape is visible to the eye right in the source.
📊
Phân tích GIS
Quick exchange of geometry between GIS tools, all of which understand WKT.
🎨
Tích hợp hệ thống
Passing coordinates to an adjacent system that accepts plain text rather than GIS format files.

Cách xuất WKT

1
Chọn khu vực
Vẽ một hình chữ nhật hoặc đa giác trên bản đồ tương tác tại osm2cdr.ru
2
Chọn WKT
Chọn WKT (Well-Known Text) từ danh sách 127 định dạng xuất khả dụng
3
Xuất
Nhấn Xuất và nhận tệp .wkt của bạn trong 1-5 phút
4
Tải xuống
Tải tệp WKT đã sẵn sàng và mở trong PostGIS

Cách mở tệp sau khi xuất

Bản đồ phổ biến ở định dạng WKT

Miễn phí

Nhận bản đồ xuất ở định dạng WKT (Well-Known Text)

Tải bản đồ WKT chuyên nghiệp từ OpenStreetMap. Tạo tức thì, bất kỳ khu vực nào.

Miễn phí / lần xuất
Xuất WKT ngay →

Câu hỏi thường gặp

WKT là gì?
Tôi có thể nhập WKT vào PostGIS không?
Are names and tags preserved?
How do I tell which layer is which?
Which coordinate system and what precision?

So sánh với các định dạng khác

Convert to WKT and back

Định dạng liên quan

Thường được xuất cùng nhau

Related Articles