{"_id":"@acrossthecloud/dbgeo","_rev":"1-06d1eaf369060dc03329afe0e5afa2de","name":"@acrossthecloud/dbgeo","dist-tags":{"latest":"1.2.0"},"versions":{"1.2.0":{"name":"@acrossthecloud/dbgeo","version":"1.2.0","description":"A Node.js module for converting database queries to GeoJSON and TopoJSON","scripts":{"test":"node test/test.js"},"keywords":["TopoJSON","GeoJSON","PostGIS","MySQL","Postgres","PostgreSQL","WKT","WKB","MariaDB","dbgeo","geometry","GIS","mysql2geojson","postgeo"],"main":"./dbgeo","repository":{"type":"git","url":"git+https://github.com/AcrossTheCloud/dbgeo.git"},"author":{"name":"John J Czaplewski"},"license":"CC0","dependencies":{"geojson-precision":"^1.0.0","topojson-server":"~3.0.1","wkx":"~0.4.8"},"devDependencies":{"@mapbox/geojsonhint":"^3.0.0","async":"~3.1.0","pg":"^7.12.1"},"gitHead":"7ec96441c5b7c4fcedec6ff1516f5baaf4217a32","bugs":{"url":"https://github.com/AcrossTheCloud/dbgeo/issues"},"homepage":"https://github.com/AcrossTheCloud/dbgeo#readme","_id":"@acrossthecloud/dbgeo@1.2.0","_nodeVersion":"12.11.1","_npmVersion":"6.11.3","dist":{"integrity":"sha512-bCnVgjM0nDpQERXWjhqJi/0vccFJ8bhxw4e33GUvYx+ElNLZZzVMx5okPnJWaKAWWdTASQ8dhTJ2sOIRcmsy2w==","shasum":"d065b110f0537163af3320fbf28eacb67809e83b","tarball":"https://registry.npmjs.org/@acrossthecloud/dbgeo/-/dbgeo-1.2.0.tgz","fileCount":10,"unpackedSize":20670,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdmp4ECRA9TVsSAnZWagAA/BkP/jQM0UZsPZyTqZW4KeTD\nHDJH04YC+ZQTI7Wfe9eNtkjwmdBVnSOKQo+ZabQZObdUZMy6tU48N5HosvzE\n/guG/R3G5n8NKSZYCPLjT0TaH7jaJnwdHbUtNL9AZxX3zothC1Tw/kKI5Lyt\nIyiapKkHEKF+H3dOzmRXgLmAY/BVLbYqTSSAst17KtuRJ1aN0CP8l3mzxAkd\nfEsbfg+FcfdR4YZYuEbJ7P4ZGSu1xZAOGDKS2Q73EtSeI5GsbLnJdrOZ9TF3\nu5hT0dj1YkTh1HSGSXmJfUxQG4Spg09T9S3J9xpN12ZL0yoe3CJ9EFkjrxvD\nXuQg3oN3du77Y4gitRouAMnO92noNmwtODoPh81WV8le13WoRIms+N6U1wkD\nik1PrmZljZQdVfrhhJ+1xwuEu7osWFdbmqmVE0YjK3XAlkOw42DCT527oGt0\nMRhGaFT3QlbPWR/75GHZiQW4vcxmEQAJOFQaCXokR5+sAtnDNF/F5ixJdyZT\nTz0vd10YxNih13eAR5RUT/v6iIDeDkXL6SOTw1NHkoR6fAJIVoKHwv/ENHAm\noBEm8oSI4DBR16v8JNkGNXyMhqvCambo6Z3OAfe8b4OhIpakzw+m/5TYeYDW\nSddib11DtoJXyQvGZulthMB6R1fCRDkxwpuX4ySGjKvEGTzyYX4zf9qENiIM\nbsnm\r\n=sdch\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUqolcyiac8PH9BZSrCC0EmrE/1qIfMQQwU4yJ/eCx+QIhAL+gGliNQsJ4DYSGaC0YBnPnXrxSf4Q1yzNXu5XurEyf"}]},"maintainers":[{"name":"matthewberryman","email":"matthew@acrossthecloud.net"}],"_npmUser":{"name":"matthewberryman","email":"matthew@acrossthecloud.net"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dbgeo_1.2.0_1570414083948_0.8979708530113426"},"_hasShrinkwrap":false}},"time":{"created":"2019-10-07T02:08:03.774Z","1.2.0":"2019-10-07T02:08:04.111Z","modified":"2022-04-04T11:16:28.990Z"},"maintainers":[{"name":"matthewberryman","email":"matthew@acrossthecloud.net"}],"description":"A Node.js module for converting database queries to GeoJSON and TopoJSON","homepage":"https://github.com/AcrossTheCloud/dbgeo#readme","keywords":["TopoJSON","GeoJSON","PostGIS","MySQL","Postgres","PostgreSQL","WKT","WKB","MariaDB","dbgeo","geometry","GIS","mysql2geojson","postgeo"],"repository":{"type":"git","url":"git+https://github.com/AcrossTheCloud/dbgeo.git"},"author":{"name":"John J Czaplewski"},"bugs":{"url":"https://github.com/AcrossTheCloud/dbgeo/issues"},"license":"CC0","readme":"# dbgeo\n\nConvert database query results to GeoJSON or TopoJSON. Inspired by [Bryan McBride's](https://github.com/bmcbride) [PHP-Database-GeoJSON](https://github.com/bmcbride/PHP-Database-GeoJSON). Works with your database of choice - ideally paired with [node-mysql](https://github.com/felixge/node-mysql), [node-postgres](https://github.com/brianc/node-postgres), or [mongodb](https://github.com/mongodb/node-mongodb-native). It is a more flexible version of [postgeo](https://github.com/jczaplew/postgeo) and [mysql2geojson](https://github.com/jczaplew/mysql2geojson) (*both deprecated*).\n\n###### Installation\n````\nnpm install dbgeo\n````\n\n###### Example Usage\n````javascript\nvar dbgeo = require('dbgeo')\n\n// Query a database...\n\ndbgeo.parse(data, {\n  outputFormat: 'geojson'\n}, function(error, result) {\n  // This will log a valid GeoJSON FeatureCollection\n  console.log(result)  \n});\n\n````\n\nSee ````test/test.js```` for more examples.\n\n\n## API\n\n### .parse(data, options, callback)\n\n##### data (***required***)  \nAn array of objects, usually results from a database query.\n\n##### options (*optional*)\nConfiguration object that can contain the following keys:\n\n| argument |  description  | values  |  default value  |\n|----------|---------------|---------|-----------------|\n| `geometryType`  |  Format of input geometry | wkb, wkt, geojson, ll  | wkb  |\n| `geometryColumn`|  Name of column that contains geometry. If input geometry type is \"ll\", this is an array in the format ````['longitude', 'latitude']```` | *Any string*  | geom  |\n| `outputFormat`  | Desired output format  | geojson, topojson  | geojson  |\n| `precision`     | Trim the coordinate precision of the output to a given number of digits using [geojson-precision](https://github.com/jczaplew/geojson-precision) | *Any integer* | `null` (will not trim precision) |\n| `quantization` | Value for quantization process, typically specified as powers of ten, see [topojson.quantize](https://github.com/topojson/topojson-client/blob/master/README.md#quantize) | *Any integer greater than one* | `null` (no quantization) |\n\n\n##### callback (***required***)\nA function with two parameters: an error, and a result object.\n\nExamples can be found in ````test/test.js````.\n\n### .defaults{}\nThe default options for ````.parse()````. You can set these before using ````.parse()```` if you plan to use the same options continuously.\n\n## License\nCC0\n","readmeFilename":"README.md"}