bookshelf-postgis0.3.0 • Public • Published
Bookshelf plugin for PostGIS to automatically parse and serialize geometry/geography columns on fetch and save, respectively. Geography columns are parsed to specified attributes (e.g.
[lon, lat] results in a
lon and a
lat attribute on the model), and geometry columns are parsed to GeoJSON.
NOTE: Geography columns must already be WGS 84 lon lat (SRID:4326)!
npm install bookshelf-postgis --save
Apply the plugin:
const postgis = ;bookshelf;
geometry columns to your model:
const User = bookshelfModel;