diff --git a/CHANGELOG.md b/CHANGELOG.md index a22cce5..4adc508 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ ## Version History +### v15.1.0 + +- Add `toDriver` for postgis integration + ### v15.0.5 - Add npm ignore diff --git a/lib/postgis.ts b/lib/postgis.ts index d498438..4c70705 100644 --- a/lib/postgis.ts +++ b/lib/postgis.ts @@ -29,4 +29,7 @@ export const geometry = customType<{ geom.bbox = bbox(geom); return geom; }, + toDriver(value: Geometry): string { + return wkx.Geometry.parseGeoJSON(value).toWkt(); + } });