Namespace: PouchDBGeospatial

PouchDBGeospatial

The object exposed by the geospatial plugin API. All methods return promises.

Members


<static> tree :GeospatialTree

Geospatial R-Tree.
Type:

Methods


add(geojson [, options])

Add GeoJSON to the database. Uses put method if GeoJSON has _id property otherwise uses post.
Parameters:
Name Type Argument Description
geojson GeoJSON GeoJSON to add.
options Options <optional>
PouchDB put/post options.
Returns:
Promise with db put/post response.
Type
Promise

contains(geojson)

Find all GeoJSON containing the query GeoJSON.
Parameters:
Name Type Description
geojson GeoJSON Query GeoJSON.
Returns:
Promise with array of document IDs.
Type
Promise

coveredby(geojson)

Find all GeoJSON coveredby the query GeoJSON.
Parameters:
Name Type Description
geojson GeoJSON Query GeoJSON.
Returns:
Promise with array of document IDs.
Type
Promise

covers(geojson)

Find all GeoJSON covering the query GeoJSON.
Parameters:
Name Type Description
geojson GeoJSON Query GeoJSON.
Returns:
Promise with array of document IDs.
Type
Promise

crosses(geojson)

Find all GeoJSON crossing the query GeoJSON.
Parameters:
Name Type Description
geojson GeoJSON Query GeoJSON.
Returns:
Promise with array of document IDs.
Type
Promise

disjoint(geojson)

Find all GeoJSON disjoint from the query GeoJSON.
Parameters:
Name Type Description
geojson GeoJSON Query GeoJSON.
Returns:
Promise with array of document IDs.
Type
Promise

equals(geojson)

Find all GeoJSON that equal the query GeoJSON.
Parameters:
Name Type Description
geojson GeoJSON Query GeoJSON.
Returns:
Promise with array of document IDs.
Type
Promise

intersects(geojson)

Find all GeoJSON intersecting the query GeoJSON.
Parameters:
Name Type Description
geojson GeoJSON Query GeoJSON.
Returns:
Promise with array of document IDs.
Type
Promise

load(geojsons [, options])

Bulk add array of GeoJSON to the database. Uses put method if GeoJSON has _id property otherwise uses post.
Parameters:
Name Type Argument Description
geojsons Array.<GeoJSON> GeoJSONs to add.
options Options <optional>
PouchDB put/post options.
Returns:
Promise with db put/post response.
Type
Promise

overlaps(geojson)

Find all GeoJSON overlapping the query GeoJSON.
Parameters:
Name Type Description
geojson GeoJSON Query GeoJSON.
Returns:
Promise with array of document IDs.
Type
Promise

remove(id)

Remove GeoJSON from the database.
Parameters:
Name Type Description
id String GeoJSON document ID to remove.
Returns:
Promise with db remove response.
Type
Promise

touches(geojson)

Find all GeoJSON touching the query GeoJSON.
Parameters:
Name Type Description
geojson GeoJSON Query GeoJSON.
Returns:
Promise with array of document IDs.
Type
Promise

within(geojson)

Find all GeoJSON within the query GeoJSON.
Parameters:
Name Type Description
geojson GeoJSON Query GeoJSON.
Returns:
Promise with array of document IDs.
Type
Promise