Spatial plugin from PouchDB extracted and supporting N dimentional coordinates.
Switch branches/tags
cleanup greenkeeper/browserify-14.5.0 greenkeeper/browserify-15.0.0 greenkeeper/browserify-15.1.0 greenkeeper/browserify-15.2.0 greenkeeper/browserify-16.0.0 greenkeeper/browserify-16.1.0 greenkeeper/browserify-16.1.1 greenkeeper/browserify-16.2.0 greenkeeper/browserify-16.2.1 greenkeeper/browserify-16.2.2 greenkeeper/browserify-16.2.3 greenkeeper/browserify-pin-14.4.0 greenkeeper/chai-4.0.0 greenkeeper/chai-4.1.0 greenkeeper/chai-4.1.1 greenkeeper/chai-4.1.2 greenkeeper/create-hash-1.1.3 greenkeeper/create-hash-1.2.0 greenkeeper/create-hash-pin-1.1.2 greenkeeper/lie-3.2.0 greenkeeper/lie-3.3.0 greenkeeper/lie-pin-3.1.1 greenkeeper/memdown-1.2.5 greenkeeper/memdown-1.2.6 greenkeeper/memdown-1.2.7 greenkeeper/memdown-1.3.0 greenkeeper/memdown-1.3.1 greenkeeper/memdown-1.4.0 greenkeeper/memdown-1.4.1 greenkeeper/memdown-2.0.0 greenkeeper/memdown-3.0.0 greenkeeper/memdown-pin-1.2.4 greenkeeper/mocha-3.3.0 greenkeeper/mocha-3.4.0 greenkeeper/mocha-3.4.1 greenkeeper/mocha-3.4.2 greenkeeper/mocha-3.5.0 greenkeeper/mocha-3.5.1 greenkeeper/mocha-3.5.2 greenkeeper/mocha-3.5.3 greenkeeper/mocha-4.0.0 greenkeeper/mocha-4.0.1 greenkeeper/mocha-4.1.0 greenkeeper/mocha-5.0.0 greenkeeper/mocha-5.0.1 greenkeeper/mocha-5.0.2 greenkeeper/mocha-5.0.3 greenkeeper/mocha-5.0.4 greenkeeper/mocha-5.0.5 greenkeeper/mocha-5.1.0 greenkeeper/mocha-5.1.1 greenkeeper/mocha-5.2.0 greenkeeper/mocha-pin-3.2.0 greenkeeper/monorepo.pouchdb-7.0.0 greenkeeper/pouchdb-6.3.0 greenkeeper/pouchdb-6.3.1 greenkeeper/pouchdb-6.3.2 greenkeeper/pouchdb-6.3.3 greenkeeper/pouchdb-6.3.4 greenkeeper/pouchdb-6.4.0 greenkeeper/pouchdb-6.4.1 greenkeeper/pouchdb-6.4.2 greenkeeper/pouchdb-6.4.3 greenkeeper/pouchdb-pin-6.2.0 master rtree
Nothing to show
Clone or download
calvinmetcalf Merge pull request #17 from pouchdb/greenkeeper/initial
Update dependencies to enable Greenkeeper 🌴
Latest commit ffb8ab2 Mar 13, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist update lie Sep 13, 2016
test update deps and test Sep 6, 2016
.gitignore coverage Nov 22, 2013
.travis.yml newer node Feb 8, 2016
LICENSE first Nov 21, 2013
create-view.js temp views are actually temp Feb 8, 2016
index.js temp views are actually temp Feb 8, 2016
package.json chore(package): update dependencies Mar 7, 2017
readme.md docs(readme): add Greenkeeper badge Mar 7, 2017
store.js temp views are actually temp Feb 8, 2016
upsert.js coverage Dec 10, 2014

readme.md

Spatial Pouch Build Status

Greenkeeper badge

Spatial plugin from PouchDB extracted and supporting N dimensional coordinates.

Originally by @vmx with contribution by @daleharvey and @calvinmetcalf.

Test with npm test coverage report with npm test --coverage, build with npm run build.

API

PouchDB.plugin(require('geopouch'));

db.spatial(function (doc) {emit(doc.geometry);}, [xmin, ymin, xmax, ymax], options, callback);

db.spatial('ddoc/functionName', [xmin, ymin, xmax, ymax], options, callback);

db.spatial('ddoc/functionName', [[xmin, ymin], [xmax, ymax]], options, callback);

db.spatial('ddoc/functionName', [[xmin, ymin, zmin], [xmax, ymax, zmax]], options, callback);

db.spatial('ddoc/functionName', [xmin, ymin, zmin], [xmax, ymax, zmax], options, callback);

db.spatial('ddoc/functionName', [xmin, ymin, xmax, ymax], options).then(function (result) {}, function (err) {});

you may either give a function or a path to a ddoc, bounding boxes may be given in one of 3 formats

  • single array with 4 numbers, these are interpreted as [xmin, ymin, xmax, ymax]
  • single array with 2 arrays in it these are interpreted as [[mins], [maxs]]
  • 2 arrays with numbers in them, first one is interpreted as mins, second one as maxes

If the callback is omited then a promise is returned.

Options are optional and valid options are include_docs and stale