{"_id":"bookshelf-postgis","_rev":"9-45470c8d57f256f14cd91b08235aa95c","name":"bookshelf-postgis","description":"Bookshelf plugin for parsing & serializing PostGIS columns","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"bookshelf-postgis","version":"0.1.0","description":"Bookshelf plugin for parsing & serializing PostGIS columns","author":{"name":"Josh Swan","email":"josh@sportifik.com"},"license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/joshswan/bookshelf-postgis.git"},"bugs":{"url":"https://github.com/joshswan/bookshelf-postgis/issues"},"keywords":["bookshelf","plugin","postgis","postgres","geometry","geography"],"files":["index.js","LICENSE","README.md"],"scripts":{"lint":"eslint index.js"},"peerDependencies":{"bookshelf":"^0.10.2"},"dependencies":{"knex":"^0.12.6","wkx":"^0.4.1"},"devDependencies":{"eslint":"^3.14.1","eslint-config-airbnb-base":"^11.0.1","eslint-plugin-import":"^2.2.0"},"gitHead":"10843b41fc7ed458ba3319be59defe44ddcd2660","homepage":"https://github.com/joshswan/bookshelf-postgis#readme","_id":"bookshelf-postgis@0.1.0","_shasum":"d3ce119ad8d049b96f407bdade22b44c83c12f87","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"joshswan","email":"josh@sportifik.com"},"dist":{"shasum":"d3ce119ad8d049b96f407bdade22b44c83c12f87","tarball":"https://registry.npmjs.org/bookshelf-postgis/-/bookshelf-postgis-0.1.0.tgz","integrity":"sha512-brV8ctB11lJ0ATPVH19ImjwxSWusQZk9PyQws8XZKcYNQB80Vrd/++H3EKzsYbb4DPtL6alN4e85gE9TTWx9LA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdMjVux1xuxIcIb8rQKRPe0M1ZEIcZxJqu2ZaqQ7KFBQIhAMZtdO2DStwptLCsM5BlA54dA8IUZB6VJMy5PcoJqwU3"}]},"maintainers":[{"name":"joshswan","email":"josh@sportifik.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/bookshelf-postgis-0.1.0.tgz_1486613134808_0.5634631714783609"},"directories":{}},"0.1.1":{"name":"bookshelf-postgis","version":"0.1.1","description":"Bookshelf plugin for parsing & serializing PostGIS columns","author":{"name":"Josh Swan","email":"josh@sportifik.com"},"license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/joshswan/bookshelf-postgis.git"},"bugs":{"url":"https://github.com/joshswan/bookshelf-postgis/issues"},"keywords":["bookshelf","plugin","postgis","postgres","geometry","geography"],"files":["index.js","LICENSE","README.md"],"scripts":{"lint":"eslint index.js"},"peerDependencies":{"bookshelf":"^0.10.2"},"dependencies":{"knex":"^0.12.6","wkx":"^0.4.1"},"devDependencies":{"eslint":"^3.14.1","eslint-config-airbnb-base":"^11.0.1","eslint-plugin-import":"^2.2.0"},"gitHead":"7fab7b12a2eb338b331c2801bf309df36e0176a2","homepage":"https://github.com/joshswan/bookshelf-postgis#readme","_id":"bookshelf-postgis@0.1.1","_shasum":"1e0c70f9af59914b07c3cdb1f8bc92a8adf5a067","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"joshswan","email":"josh@sportifik.com"},"dist":{"shasum":"1e0c70f9af59914b07c3cdb1f8bc92a8adf5a067","tarball":"https://registry.npmjs.org/bookshelf-postgis/-/bookshelf-postgis-0.1.1.tgz","integrity":"sha512-a0cvRwSYaZLnXZ49zgeW2xVseNbeoS7Pvvate7kI4juP2i+gSeQd8i3S5Z144ZTsJ/YYtCo9bhBqqxvbv3qKIA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfIvWA/0wJwkK8nU6S/bEggk3jObz5rskkpB4lrQD1XQIgKl5anxJWqUEL6tHFNrT91Df5CX0kyHIkQ16GDJM2m6M="}]},"maintainers":[{"name":"joshswan","email":"josh@sportifik.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/bookshelf-postgis-0.1.1.tgz_1486613611093_0.8188617401756346"},"directories":{}},"0.2.0":{"name":"bookshelf-postgis","version":"0.2.0","description":"Bookshelf plugin for parsing & serializing PostGIS columns","author":{"name":"Josh Swan","email":"josh@sportifik.com"},"license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/joshswan/bookshelf-postgis.git"},"bugs":{"url":"https://github.com/joshswan/bookshelf-postgis/issues"},"keywords":["bookshelf","plugin","postgis","postgres","geometry","geography"],"files":["index.js","LICENSE","README.md"],"scripts":{"lint":"eslint index.js"},"peerDependencies":{"bookshelf":"^0.10.2"},"dependencies":{"knex":"^0.12.6","lodash":"^4.17.4","wkx":"^0.4.1"},"devDependencies":{"eslint":"^3.14.1","eslint-config-airbnb-base":"^11.0.1","eslint-plugin-import":"^2.2.0"},"gitHead":"edb0f2dd2836f18bcd3bac36d44eeb827e70522e","homepage":"https://github.com/joshswan/bookshelf-postgis#readme","_id":"bookshelf-postgis@0.2.0","_shasum":"27ea542cf3a4769e090f905de63abfe4059ff12b","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"joshswan","email":"josh@sportifik.com"},"dist":{"shasum":"27ea542cf3a4769e090f905de63abfe4059ff12b","tarball":"https://registry.npmjs.org/bookshelf-postgis/-/bookshelf-postgis-0.2.0.tgz","integrity":"sha512-AnlYGQ8kpq8Tl62kSTCOStdgkXrpmNgQiMLj/W5kP6uH6xXZD4ZsYQ3ibFZaLgQ0Qd19JOYOBayH1uv5Es7f7w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgktzNcMX+3iPEUcKee9LtDvkw22iegi+VPUbJ6X46NQIgeAgJs4of3JVZOiuPP5nPVEg1fDYZQ/XVylvtV8bU62Q="}]},"maintainers":[{"name":"joshswan","email":"josh@sportifik.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/bookshelf-postgis-0.2.0.tgz_1487748341889_0.3576399206649512"},"directories":{}},"0.2.1":{"name":"bookshelf-postgis","version":"0.2.1","description":"Bookshelf plugin for parsing & serializing PostGIS columns","author":{"name":"Josh Swan","email":"josh@sportifik.com"},"license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/joshswan/bookshelf-postgis.git"},"bugs":{"url":"https://github.com/joshswan/bookshelf-postgis/issues"},"keywords":["bookshelf","plugin","postgis","postgres","geometry","geography"],"files":["index.js","LICENSE","README.md"],"scripts":{"lint":"eslint index.js"},"peerDependencies":{"bookshelf":"^0.10.2"},"dependencies":{"knex":"^0.12.6","lodash":"^4.17.4","wkx":"^0.4.1"},"devDependencies":{"eslint":"^3.14.1","eslint-config-airbnb-base":"^11.0.1","eslint-plugin-import":"^2.2.0"},"gitHead":"77c385c75f34b9d57ca4e35397a7ef20f592cb21","homepage":"https://github.com/joshswan/bookshelf-postgis#readme","_id":"bookshelf-postgis@0.2.1","_shasum":"055f4b87718773db4c7e6d3e68eb16f8fc3e544a","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.9.5","_npmUser":{"name":"joshswan","email":"josh@sportifik.com"},"dist":{"shasum":"055f4b87718773db4c7e6d3e68eb16f8fc3e544a","tarball":"https://registry.npmjs.org/bookshelf-postgis/-/bookshelf-postgis-0.2.1.tgz","integrity":"sha512-Bq30JlPJng00x/CeBoBvJXf/7Cgy93+HuuIcg3Nky8aVN7d/LJuSFdj4pm3QaIpmRoNrvZXDvjmSycxQTCRJwA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICSH/ClkMRBiOXQp2ChnZGe63UB6DRcWag5Z632JWNrpAiAVr7bvRWU6afT2LeSOFdGN4oISMG2dLGYRTw+C235UMQ=="}]},"maintainers":[{"name":"joshswan","email":"josh@sportifik.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/bookshelf-postgis-0.2.1.tgz_1487757525877_0.4544803013559431"},"directories":{}},"0.2.2":{"name":"bookshelf-postgis","version":"0.2.2","description":"Bookshelf plugin for parsing & serializing PostGIS columns","author":{"name":"Josh Swan","email":"josh@sportifik.com"},"license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/joshswan/bookshelf-postgis.git"},"bugs":{"url":"https://github.com/joshswan/bookshelf-postgis/issues"},"keywords":["bookshelf","plugin","postgis","postgres","geometry","geography"],"files":["index.js","LICENSE","README.md"],"scripts":{"lint":"eslint index.js"},"peerDependencies":{"bookshelf":"^0.10.3"},"dependencies":{"lodash":"^4.17.4","wkx":"^0.4.1"},"devDependencies":{"eslint":"^3.14.1","eslint-config-airbnb-base":"^11.0.1","eslint-plugin-import":"^2.2.0"},"gitHead":"419169ea0991f0d8e4c37306b6382f0602750a80","homepage":"https://github.com/joshswan/bookshelf-postgis#readme","_id":"bookshelf-postgis@0.2.2","_shasum":"dfb6272cc539f75dccb74ff485fed2bbb076b6d6","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"joshswan","email":"josh@sportifik.com"},"dist":{"shasum":"dfb6272cc539f75dccb74ff485fed2bbb076b6d6","tarball":"https://registry.npmjs.org/bookshelf-postgis/-/bookshelf-postgis-0.2.2.tgz","integrity":"sha512-Wum7pls+a1c4Vp6b1kcifueyK2D0XAK+HLeWCEGk6bczdwy7FCzutjwA+uPh3g4SnwoWt2Vyv/3Ydp6H/RUnHA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfh6QrSV6b8PixcFyewo7kNHadyxNUUqrWiNA3ehyUDgIga6i4TFVJ7Ms4WhI9/DMjSfwZMQ5LdHwOB8GBnT/yC9s="}]},"maintainers":[{"name":"joshswan","email":"josh@sportifik.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/bookshelf-postgis-0.2.2.tgz_1494696219136_0.9722636693622917"},"directories":{}},"0.3.0":{"name":"bookshelf-postgis","version":"0.3.0","description":"Bookshelf plugin for parsing & serializing PostGIS columns","author":{"name":"Josh Swan","email":"josh@sportifik.com"},"license":"MIT","main":"index.js","repository":{"type":"git","url":"git+https://github.com/joshswan/bookshelf-postgis.git"},"bugs":{"url":"https://github.com/joshswan/bookshelf-postgis/issues"},"keywords":["bookshelf","plugin","postgis","postgres","geometry","geography"],"files":["index.js","LICENSE","README.md"],"scripts":{"lint":"eslint index.js"},"peerDependencies":{"bookshelf":"^0.12.1"},"dependencies":{"lodash":"^4.17.5","wkx":"^0.4.4"},"devDependencies":{"eslint":"^4.18.2","eslint-config-airbnb-base":"^12.1.0","eslint-plugin-import":"^2.9.0"},"gitHead":"914e5cd27a1de34bbbee181c8b34969ed76673fa","homepage":"https://github.com/joshswan/bookshelf-postgis#readme","_id":"bookshelf-postgis@0.3.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"joshswan","email":"josh@belyvly.com"},"dist":{"integrity":"sha512-EnOpJ7v78lnAWVhDgSmxS2+PxhxG5ZgEF5DQev/36gvNpDoKMUodv5xzr/oTkiw432F646r8U66X+4Yrec0sLA==","shasum":"14fbbea79738efdc2deaec59b74dbe802337afeb","tarball":"https://registry.npmjs.org/bookshelf-postgis/-/bookshelf-postgis-0.3.0.tgz","fileCount":4,"unpackedSize":6095,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLNz4DqMqbP5bTA3njoLSV3MAl1YgBKeTcA7eSp9b1XQIgGzIqgMPYHE3ua12YStsFTYpMijz+SznELzHqz++MYM0="}]},"maintainers":[{"name":"joshswan","email":"josh@sportifik.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bookshelf-postgis_0.3.0_1520620703767_0.42624891030848966"},"_hasShrinkwrap":false}},"readme":"# bookshelf-postgis\n[![NPM Version][npm-image]][npm-url] [![Build Status][build-image]][build-url] [![Dependency Status][depstat-image]][depstat-url] [![Dev Dependency Status][devdepstat-image]][devdepstat-url]\n\nBookshelf 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.\n\n***NOTE:*** Geography columns must already be WGS 84 lon lat (SRID:4326)!\n\n## Installation\n\n```javascript\nnpm install bookshelf-postgis --save\n```\n\n## Usage\n\nApply the plugin:\n```javascript\nconst postgis = require('bookshelf-postgis');\n\nbookshelf.plugin(postgis);\n```\n\nAnd add `geography` or `geometry` columns to your model:\n```javascript\nconst User = bookshelf.Model.extend({\n  tableName: 'users',\n  geography: {\n    location: ['lon', 'lat'],\n    // Use dot notation to specify deeper nesting\n    geo: ['address.lon', 'address.lat'],\n    geo2: ['location[0]', 'location[1]'],\n  },\n  geometry: ['geometry']\n});\n```\n\n[build-url]: https://travis-ci.org/joshswan/bookshelf-postgis\n[build-image]: https://travis-ci.org/joshswan/bookshelf-postgis.svg?branch=master\n[depstat-url]: https://david-dm.org/joshswan/bookshelf-postgis\n[depstat-image]: https://david-dm.org/joshswan/bookshelf-postgis.svg\n[devdepstat-url]: https://david-dm.org/joshswan/bookshelf-postgis#info=devDependencies\n[devdepstat-image]: https://david-dm.org/joshswan/bookshelf-postgis/dev-status.svg\n[npm-url]: https://www.npmjs.com/package/bookshelf-postgis\n[npm-image]: https://badge.fury.io/js/bookshelf-postgis.svg\n","maintainers":[{"name":"joshswan","email":"josh@sportifik.com"}],"time":{"modified":"2022-06-13T04:55:50.570Z","created":"2017-02-09T04:05:35.046Z","0.1.0":"2017-02-09T04:05:35.046Z","0.1.1":"2017-02-09T04:13:32.894Z","0.2.0":"2017-02-22T07:25:43.750Z","0.2.1":"2017-02-22T09:58:47.517Z","0.2.2":"2017-05-13T17:23:39.420Z","0.3.0":"2018-03-09T18:38:23.858Z"},"homepage":"https://github.com/joshswan/bookshelf-postgis#readme","keywords":["bookshelf","plugin","postgis","postgres","geometry","geography"],"repository":{"type":"git","url":"git+https://github.com/joshswan/bookshelf-postgis.git"},"author":{"name":"Josh Swan","email":"josh@sportifik.com"},"bugs":{"url":"https://github.com/joshswan/bookshelf-postgis/issues"},"license":"MIT","readmeFilename":"README.md"}