Skip to main content
Version: Next

rbush

Description

GeoJSON implementation of RBush spatial index.

Parameters

NameTypeDescription
maxEntries?numberdefines the maximum number of entries in a tree node. 9 (used by default) is a reasonable choice for most applications. Higher value means faster insertion and slower search, and vice versa. (default 9)

Returns

    RBush GeoJSON RBush

Examples

var geojsonRbush = require("geojson-rbush").default;
var tree = geojsonRbush();

Installation

$ npm install @turf/geojson-rbush

import { rbush } from "@turf/geojson-rbush";
const result = rbush(...);
$ npm install @turf/turf

import * as turf from "@turf/turf";
const result = turf.rbush(...);