Shapefile to WKT Converter
The shortest path from a legacy ESRI dataset to a row insert in a modern spatial database.
Common issues converting Shapefile to WKT
- DBF attribute data is dropped — WKT carries geometry only. If you need attributes alongside geometry, use the GeoParquet or FlatGeobuf targets instead, which round-trip both.
- Z values from PolygonZ / PolyLineZ shapefiles produce POLYGON Z / LINESTRING Z output. The optional M (measure) coordinate is dropped.
- Polygon ring orientation is normalised on parse (ESRI convention: outer CW, holes CCW). WKT output uses the OGC convention (outer CCW, holes CW) — semantically identical, visually identical, just different winding.
- The .prj is honoured for CRS detection. Output WKT has no SRID prefix by default; prepend `SRID=4326;` yourself if your downstream tool requires EWKT.
Frequently asked questions
Why doesn't my output have an SRID?
Plain OGC WKT doesn't carry one. PostGIS users typically wrap the WKT with ST_SetSRID(ST_GeomFromText(...), 4326) at INSERT time. For EWKT with embedded SRID, prepend `SRID=...;` to each line.
Are multipolygon shapefiles handled?
Yes — the converter groups outer rings + holes per the shapefile spec and emits MULTIPOLYGON with proper inner/outer ring nesting.
What if I just have the .shp without .dbf?
Geometry-only ZIPs work. The output is the same — WKT skips attributes regardless.
Output as one big file or one per feature?
One file, one WKT statement per line — the standard PostGIS bulk-load format.