A 2D immutable R-tree with STR packing for ultra-fast nearest and intersection queries in plane and spherical coordinates.
RTree2D is a 2D immutable R-tree library for ultra-fast spatial queries, including nearest neighbor and intersection searches. It efficiently indexes millions of entries using STR packing and supports both plane and spherical Earth coordinates, solving performance challenges in geospatial and data-intensive applications.
Scala developers building high-performance spatial applications, such as geospatial analytics, real-time mapping, or any system requiring efficient 2D range and nearest neighbor queries.
Developers choose RTree2D for its exceptional speed, immutability for thread safety, and dual support for plane and spherical geometries, outperforming alternatives like Archery and JTS in benchmarks.
RTree2D is a 2D immutable R-tree for ultra-fast nearest and intersection queries in plane and spherical coordinates
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses Sort-Tile-Recursive packing to create balanced trees, delivering ultra-fast query performance even with millions of overlapping entries, as benchmarked against alternatives like Archery and JTS.
Optimized memory layout and access patterns for modern CPU caches, enabling thread-safe concurrent reads without locking, ideal for real-time applications with high throughput.
Supports both Euclidean plane and spherical Earth coordinates with ±1 meter precision for lat/lon and ±0.3% distance accuracy using the Haversine formula, per the README's accuracy claims.
Efficient implementations reduce allocations and virtual calls, minimizing garbage collection impact—key for large-scale data pipelines, as emphasized in the goals section.
Updating the tree requires constructing a new instance, which can be performance-heavy for dynamic datasets; the README's update benchmarks show rebuild costs, though optimized.
No support for 3D or higher-dimensional spaces, restricting use to planar or spherical 2D scenarios, which may not cover all spatial computing needs.
Tied to Scala and JVM ecosystems, with no native support for other languages, potentially limiting adoption in mixed-tech stacks without complex interop.