feat: Add wardriving data import system and cleanup tools

Major Features:
- Multi-format GPS data import (Wigle CSV, GPS JSON, filename GPS)
- Data source tracking (test/mock/production)
- Database cleanup tools for managing test data
- JSON file persistence for simplified server
- UI improvements for map controls

Backend:
- Added wardriving_importer.py with WigleCSVImporter, GPSJSONImporter, BatchImporter
- Added data_source and session_id tracking to captures
- New API endpoints: DELETE /api/v1/admin/cleanup
- Auto-save/load functionality for captures_simple.json
- Updated stats endpoint to show data source breakdown

CLI Tools:
- scripts/import_wardriving_data.py - Batch import with --data-source flag
- scripts/cleanup_database.py - Clean by source, session, or all
- scripts/create_test_dataset.py - Generate GPS-tagged test data
- scripts/test_wardriving_import.py - Test suite for importers

Frontend:
- Fixed map controls z-index and positioning issues
- Moved controls to top-right to avoid zoom button overlap
- Fixed Leaflet zoom controls rendering over header
- Changed controls to position:fixed for persistent visibility
- Export map object to window.map for proper invalidateSize

Documentation:
- docs/WARDRIVING_IMPORT.md - Complete import guide
- docs/DATA_CLEANUP_GUIDE.md - Cleanup system documentation
- docs/TEST_LOCATIONS.md - Test GPS coordinates reference
- TEST_RESULTS_SUMMARY.md - Format testing results

Test Data:
- Created test_dataset_gps with 15 captures across 5 US cities
- All test data marked with data_source="test" for easy cleanup

Testing:
- Verified Wigle CSV import (1 capture from West LA)
- Verified GPS filename import (3 captures from UCLA area)
- Verified GPS JSON companion files (15 captures, 5 cities)
- Verified cleanup functionality (deleted 15 test captures)
- Verified data persistence across server restarts

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-01-14 07:48:01 -08:00
parent 04bd80b25b
commit f5d92f1d36
28 changed files with 2609 additions and 6 deletions
+28 -6
View File
@@ -108,16 +108,30 @@ main {
height: 100%;
}
/* Leaflet zoom controls - move below header */
.leaflet-top {
top: 90px !important;
}
/* Ensure Leaflet controls stay below header */
.leaflet-control-zoom {
z-index: 500 !important;
}
.map-controls {
position: absolute;
top: 20px;
left: 20px;
position: fixed;
top: 90px;
right: 20px;
background: white;
padding: 1rem;
border-radius: 0.5rem;
box-shadow: var(--shadow-lg);
z-index: 1000;
z-index: 500;
min-width: 300px;
max-width: 350px;
max-height: calc(100vh - 120px);
overflow-y: auto;
pointer-events: auto;
}
.control-group {
@@ -551,8 +565,16 @@ footer p {
}
.map-controls {
position: static;
margin: 1rem;
position: fixed;
top: 80px;
right: 10px;
left: 10px;
max-width: calc(100% - 20px);
min-width: auto;
}
.leaflet-top {
top: 10px !important;
}
#map-section {