Skip to content

A Java desktop application that animates GPS trip data from a CSV file on an interactive OpenStreetMap map. Features include customizable animation speed and stop detection.

Notifications You must be signed in to change notification settings

Sithabo/Java-GPS-Trip-Animator

Repository files navigation

Java GPS Trip Animator

A Java desktop application that visualizes GPS trip data from a CSV file on an interactive map. It animates the trip's path, showing the route taken over time with a custom icon.

Example animation

Features

  • Interactive Map Display: Uses JMapViewer to render an interactive map from OpenStreetMap.
  • Trip Animation: Animates the entire trip path, drawing the route and moving a custom marker (a raccoon!) along the coordinates.
  • Customizable Animation Speed: Users can select the total animation duration (15, 30, 60, or 90 seconds) from a dropdown menu.
  • Stop Detection: Includes an option to either show the complete journey or a filtered version that excludes detected stops, providing a view of only the moving segments of the trip.
  • Swing GUI: A simple and clean user interface built with Java Swing for controlling the animation.

Technologies Used

  • Language: Java
  • GUI: Java Swing
  • Mapping Library: JMapViewer
  • Data: GPS coordinates and timestamps from a .csv file.

How to Run

This project is built with standard Java and can be compiled and run from the command line.

Prerequisites

  • Java Development Kit (JDK) 8 or higher.

Compilation

  1. Navigate to the project's root directory.

  2. Compile the source files into the bin directory:

    javac -d bin -cp "lib/JMapViewer.jar" src/*.java

Execution

  1. From the project's root directory, run the Driver class:

    java -cp "bin;lib/JMapViewer.jar" Driver
  2. The application window will appear. Use the controls to select an animation time, choose whether to include stops, and press "Play" to start the visualization.

Project Structure

.
├── lib/              # Contains the JMapViewer library
├── src/              # Java source code
│   ├── Driver.java       # Main application class with GUI setup
│   ├── TripPoint.java    # Handles data parsing and stop detection
│   └── IconMarker.java   # Custom map marker for the animation
├── bin/              # Compiled .class files
├── triplog.csv       # Sample GPS data file
└── raccoon.png       # Image for the animation marker

About

A Java desktop application that animates GPS trip data from a CSV file on an interactive OpenStreetMap map. Features include customizable animation speed and stop detection.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages