RBush is a high-performance JavaScript library for 2D spatial indexing of points and rectangles. It's based on an optimized R-tree data structure with bulk insertion support. Spatial index is a special data structure for points and rectangles that allows you to perform queries like "all items within this bounding box" very efficiently (e.g. hundreds of times faster than looping over all items). It's most commonly used in maps and data visualizations. The demos contain visualization of trees generated from 50k bulk-loaded random points. Open web console to see benchmarks; click on buttons to insert or remove items; click to perform search under the cursor. An optional argument to RBush defines 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.

Features

  • RBush removes objects by reference
  • RBush assumes the format of data points to be an object with minX, minY, maxX and maxY properties
  • Bulk-Inserting Data
  • Bulk insertion is usually ~2-3 times faster than inserting items one by one
  • Importing and exporting as JSON allows you to use RBush on both the server (using Node.js) and the browser combined
  • Non-recursive R-tree insertion with overlap minimizing split routine from R*-tree

Project Samples

Project Activity

See All Activity >

Categories

Algorithms

License

MIT License

Follow RBush

RBush Web Site

Other Useful Business Software
Enterprise-grade ITSM, for every business Icon
Enterprise-grade ITSM, for every business

Give your IT, operations, and business teams the ability to deliver exceptional services—without the complexity.

Freshservice is an intuitive, AI-powered platform that helps IT, operations, and business teams deliver exceptional service without the usual complexity. Automate repetitive tasks, resolve issues faster, and provide seamless support across the organization. From managing incidents and assets to driving smarter decisions, Freshservice makes it easy to stay efficient and scale with confidence.
Try it Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of RBush!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Algorithms

Registered

2022-02-24