#16: WKT and WKB Describe Shape, Not Location

Share

People export geometry as WKT, move it to another system, and wonder why it’s in the wrong place. WKT and WKB don’t encode location—only shape.

WKT (Well-Known Text) is a human-readable format for encoding geometry. POINT (10 20) is a point at coordinates 10, 20. POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0)) is a rectangle. WKT describes geometry type, vertex order, and structure. That’s all.

WKB (Well-Known Binary) encodes the same information as binary instead of text. Compact. Fast. Used internally by databases and file formats like GeoParquet and Shapefile. Most people never see it directly—databases read and write it.

Here’s what both formats do NOT include: CRS, units, or projection. POINT (10 20) gives you coordinates, but 10 and 20 what? Degrees? Meters? In what CRS? WKT doesn’t say. You need metadata—a separate CRS definition—to know if those coordinates are in Seattle, the Pacific Ocean, or space.

This is why geometry breaks when moving between systems. You export as WKT, lose the CRS, import into another system that assumes a different CRS. Same coordinates, different location.

Databases and modern formats handle this by storing CRS separately. GeoParquet includes CRS metadata. PostGIS columns have attached CRS. But raw WKT is just shape.

The rule: WKT and WKB encode only structure and coordinates. CRS must travel separately. Never export or import geometry without checking CRS context. If you get a WKT string, always ask “in what CRS?” before using it.

Whenever you’re ready, here are 4 ways I can help you grow in GIS & spatial data:

​Spatial Lab​ – My private community where GIS professionals, data engineers, and analysts connect, swap workflows, and build repeatable systems together.

​Modern GIS Accelerator​ – A guided program to help you break out of legacy GIS habits and learn modern, scalable workflows.

​Career Compass​ – A career-focused program designed to help GIS pros navigate the job market, sharpen their pitch, and find roles beyond traditional GIS paths.

​Sponsorship​: Interested in sponsoring this newsletter (or other content)? ​Learn more here​ and fill out the form to get in touch!

#15: A Feature Is Not Its Geometry

Prev

#17: Map Algebra Is Math on Grids, Not Drawing on Maps

Next
Comments
Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Get every update, in your inbox.
Get every update, in your inbox.
Get every update, in your inbox.
One tip, every day
Get every update, in your inbox.
Subscribe below and join 11,000+ others learning modern GIS.