feat: add route selection functionality and improve station handling

- Added `vitest` for testing and created initial tests for route utilities.
- Implemented route selection logic in the App component, allowing users to select start and end stations.
- Updated the NetworkMap component to reflect focused and selected stations, including visual indicators for start and end stations.
- Enhanced the route panel UI to display selected route information and estimated lengths.
- Introduced utility functions for building track adjacency and computing routes based on selected stations.
- Improved styling for route selection and station list items to enhance user experience.
This commit is contained in:
2025-10-11 19:28:35 +02:00
parent 92d19235d8
commit 090dca29c2
10 changed files with 1441 additions and 52 deletions

View File

@@ -16,12 +16,12 @@
- [x] Define geographic bounding boxes and filtering rules for importing real-world stations from OpenStreetMap.
- [x] Implement an import script/CLI that pulls OSM station data and normalizes it to the PostGIS schema.
- [x] Expose backend CRUD endpoints for stations (create, update, archive) with validation and geometry handling.
- [ ] Build React map tooling for selecting a station.
- [ ] Build tools for station editing, including form validation.
- [x] Build React map tooling for selecting a station.
- [ ] Enhance map UI to support selecting two stations and previewing the rail corridor between them.
- [ ] Define track selection criteria and tagging rules for harvesting OSM rail segments within target regions.
- [ ] Extend the importer to load track geometries and associate them with existing stations.
- [ ] Implement backend track-management APIs with length/speed validation and topology checks.
- [ ] Create a frontend track-drawing workflow (polyline editor, snapping to stations, undo/redo).
- [ ] Implement track path mapping along existing OSM rail segments between chosen stations.
- [ ] Design train connection manager requirements (link trains to operating tracks, manage consist data).
- [ ] Implement backend services and APIs to attach trains to routes and update assignments.
- [ ] Add UI flows for managing train connections, including visual feedback on the map.