Immutable in-memory R-tree and R*-tree implementations in Java with a reactive API for spatial indexing.
rtree is an open-source Java library that implements immutable in-memory R-tree and R*-tree data structures for spatial indexing. It allows developers to efficiently store and query 2D geometric data—like points, rectangles, and circles—with support for reactive streams via RxJava. The library solves the problem of fast spatial lookups in applications such as geographic information systems (GIS), gaming, or any domain requiring proximity searches.
Java developers working on applications that require spatial indexing, such as GIS software, location-based services, game engines, or data analytics tools that handle geometric data.
Developers choose rtree for its combination of immutability (ensuring thread safety), reactive API (enabling efficient streaming of results), and high performance with multiple splitting strategies. It offers a pure Java solution with no external dependencies beyond RxJava, making it lightweight and easy to integrate.
Immutable in-memory R-tree and R*-tree implementations in Java with reactive api
All operations return new tree instances, enabling safe concurrent access without locks, as emphasized in the README's design philosophy.
Search results are delivered as RxJava Observables, supporting backpressure and lazy evaluation for efficient data handling, with examples in the documentation.
Offers Guttman's quadratic split, R*-tree heuristics, and customizable splitters, allowing optimization for different datasets like earthquake locations.
STR bulk loading accelerates index creation by 10x for large or static datasets, as highlighted in the features and benchmarks.
Tight coupling with RxJava forces projects to adopt reactive programming, adding complexity and an external dependency not suitable for all codebases.
Immutable design means every insert or delete creates a new tree, leading to performance and memory inefficiencies in write-heavy scenarios, as noted in the O(n) worst-case complexity.
FlatBuffers serialization reduces memory usage but makes searches up to 10x slower, a trade-off explicitly admitted in the README's benchmark notes.
RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.
a fast, scalable, multi-language and extensible build system
A high performance caching library for Java
A modern I/O library for Android, Java, and Kotlin Multiplatform.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.