Skip to content

Maelkiz/spatial-index-visualizer

Repository files navigation

Spatial Index Visualizer

A visualization of spatial indexing data structures using the Processing libraries.


What is this?

This project demonstrates how various spatial data structures organize and store spatial information. It uses the Processing library to create interactive visualizations of different spatial indexing algorithms including Quadtree, K-D tree, and R-tree data structures.


Example Visualizations

Quadtree

Quadtree

K-D tree

K-D tree

R-tree

R-tree


Prerequisites

Before you try to build or run the project, make sure you have:

  • Java Development Kit (JDK) 25
  • Apache Maven 3.9 or newer

The project targets Java 25 in pom.xml, so older JDK releases will not work.


Quick Start

To get started, clone this repository and cd to the project root:

git clone <repository-url>
cd spatial-index-visualizer

Basic Maven commands

Build (compile + package):

mvn clean package

Run via Maven (calls the main class):

mvn exec:java

Run the packaged JAR produced by the build:

java -jar target/spatial-index-visualizer.jar

Clean build artifacts:

mvn clean

Controls / Keybindings

  • 1: Switch to QuadTree and rebuild the index.
  • 2: Switch to KDTree and rebuild the index.
  • 3: Switch to RTree and rebuild the index.
  • s: Save the current frame to the output/ directory as a PNG (<IndexName>-####.png).

Notes:

  • The visualizer opens a Processing window; press the keys while the window is focused.
  • Ensure an X11/GUI display is available when running (or use X forwarding).

About

A visualization of various spatial data structures.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages