fastGeoToolkit
A novel high-performance geospatial analysis framework with advanced route density mapping algorithms.
Features
- High-Performance GPS Processing: Optimized algorithms for large-scale GPS trajectory analysis
- Multi-Format Support: GPX, FIT, and polyline format parsing
- Route Density Mapping: Novel segment-based frequency analysis for route popularity visualization
- Coordinate Validation: Robust filtering of unrealistic GPS jumps and invalid coordinates
- Track Simplification: Douglas-Peucker-inspired algorithms for efficient data reduction
- Geospatial Analytics: Intersection detection, clustering, and coverage analysis
- Cross-Platform: Native Rust with optional WebAssembly compilation
Quick Start
Add this to your Cargo.toml:
[]
= "0.1.3"
Basic Usage
use ;
// Process GPX files
let gpx_data = read?;
let result = process_gpx_files;
// Decode polylines
let coords = decode_polyline;
// Calculate statistics
let stats = calculate_track_statistics;
println!;
Route Density Analysis
use ;
// Load multiple GPS tracks
let tracks = vec!;
// Generate route density heatmap
let heatmap = create_heatmap_from_tracks;
println!;
for track in heatmap.tracks
WebAssembly Support
Enable WebAssembly compilation:
[]
= { = "0.1.3", = ["wasm"] }
API Documentation
Core Functions
process_gpx_files()- Parse and analyze GPX file datadecode_polyline()- Decode Google polyline formatprocess_polylines()- Batch process polyline datavalidate_coordinates()- Validate GPS coordinate arrayssimplify_track()- Reduce track point density while preserving shape
Analysis Functions
calculate_track_statistics()- Distance, bounds, and point count analysisfind_track_intersections()- Detect where multiple tracks intersectcluster_tracks_by_similarity()- Group similar routes togethercalculate_coverage_area()- Compute geographic coverage of track data
Conversion Functions
coordinates_to_geojson()- Export to GeoJSON formatexport_to_gpx()- Generate GPX files from coordinate datacoordinates_to_polyline()- Encode coordinates as polylines
Performance
fastGeoToolkit is optimized for processing large GPS datasets:
- Memory Efficient: Streaming processing for large files
- Fast Parsing: Optimized GPX and FIT file readers
- Parallel Processing: Multi-threaded analysis where applicable
- WASM Ready: Near-native performance in web browsers
Algorithm Details
Route Density Mapping
Our novel approach uses segment-based frequency analysis:
- Segmentation: Tracks are broken into coordinate pairs
- Grid Snapping: Coordinates are snapped to a tolerance grid
- Frequency Counting: Overlapping segments are identified and counted
- Normalization: Track frequencies are calculated from segment usage
This approach provides more accurate route popularity visualization compared to simple point-based methods.
Examples
See the examples/ directory for comprehensive usage examples:
basic_usage.rs- Getting started with core functionsroute_density.rs- Advanced heatmap generationbatch_processing.rs- Processing multiple files efficiently
License
MIT License - see LICENSE file for details.
Contributing
Contributions are welcome! Please see our Contributing Guide for details.
Citation
If you use fastGeoToolkit in academic research, please cite: