WKT CSV Viewer
GeoLab treats a CSV text column as geometry when a strong majority of sampled non-empty values look like supported WKT. It then converts the text with DuckDB Spatial for map rendering and SQL predicates.
- Recognition
- At least 80% of sampled values
- Sample
- Up to 32 non-empty values per text field
- Column name
- Any text column
- Editing
- View/query only
Recognized WKT families
The detector accepts POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, and GEOMETRYCOLLECTION text. Z, M, and ZM tokens may be present. The column does not need to be named wkt or geometry.
A consistent SRID=… prefix is reported as the source CRS, but GeoLab strips that prefix before ST_GeomFromText and does not automatically reproject the coordinates.
Minimal input
id,name,wkt
1,North Market,"POINT (-0.100 51.520)"
2,River Quarter,"POINT (-0.060 51.520)"
3,Outside,"POINT (-0.200 51.520)"What the viewer actually provides
- A map layer when the query result retains WKT or returns a DuckDB GEOMETRY column.
- A property preview for the selected layer and up to 200 result rows.
- SQL predicates and geometry functions through DuckDB Spatial.
- Point, line, polygon, multi-geometry, and GeometryCollection rendering paths.
Known boundaries
- POINT EMPTY and other EMPTY forms do not match the current detector because its WKT pattern expects coordinates in parentheses.
- A mixed text column with too many non-WKT values is rejected as a geometry source.
- The interface does not edit WKT text, repair geometry, or write changes back to CSV.
- An EWKT SRID is descriptive unless the query explicitly transforms coordinates.
Sources and scope
These links document the product behavior summarized above. GeoLab-specific claims are limited to the current public v0.1.0 implementation.
- GeoLab geometry detectorThe implemented WKT families, sampling threshold, and coordinate aliases.
- DuckDB Spatial functionsOfficial reference for geometry constructors, predicates, and measurements.
- OGC Simple FeaturesStandards context for Well-Known Text geometry representations.