Namespace: GeospatialTree

GeospatialTree

Geospatial R-Tree.

Methods


add(geojson, id)

Add GeoJSON to the R-Tree.
Parameters:
Name Type Description
geojson GeoJSON GeoJSON to add.
id String GeoJSON database document ID.
Returns:
Promise with id and bbox added {id, bbox}.
Type
Promise

load(data)

Add array of GeoJSONs to the R-Tree.
Parameters:
Name Type Description
data Array.<TreeBulkData> Array of id and GeoJSON to add.
Returns:
Promise array of id and bounding boxes loaded {id, bbox}.
Type
Promise

query(geojson)

Find all GeoJSON that collide with query GeoJSON.
Parameters:
Name Type Description
geojson GeoJSON Query GeoJSON with polygon features.
Returns:
Promise with array objects with id and bbox properties.
Type
Promise

remove(doc)

Remove document from the R-Tree.
Parameters:
Name Type Description
doc Object {id, geojson}.
Returns:
Promise of doc removed {id, bbox}.
Type
Promise