geojson-wkt
Installation
SKILL.md
WKT → GeoJSON (PostGIS)
Use this skill when your data includes geometries as WKT strings (e.g., "POINT(-87.6 41.8)", "LINESTRING(...)", "POLYGON(...)") and you want a GeoJSON FeatureCollection for map display.
This skill documents the canonical raw SQL pattern for building GeoJSON from WKT using PostGIS.
When to use
- You receive an array of objects like
{ id, wkt, ... } - You want GeoJSON directly from Postgres
- You want consistent property shaping and GeoJSON output
Input assumptions
- WKT is valid (or you’ll get PostGIS parse errors)
- The WKT may or may not include an SRID (this pattern assumes no SRID unless you add it)
- Output should be web-map friendly (commonly EPSG:4326)