waypoint: adjust name and elevation

This commit is contained in:
Jonas Rabenstein 2026-08-12 02:19:08 +02:00
commit 8e79bef1d9

View file

@ -68,15 +68,12 @@ pub fn extract_track_points(gpx: &Gpx) -> Result<Vec<TrackPoint>> {
} }
pub fn append_crossing_waypoints(gpx: &mut Gpx, crossings: &[Crossing]) { pub fn append_crossing_waypoints(gpx: &mut Gpx, crossings: &[Crossing]) {
for (index, crossing) in crossings.iter().enumerate() { for crossing in crossings.iter() {
let mut waypoint = Waypoint::new(crossing.point); let mut waypoint = Waypoint::new(crossing.point);
waypoint.name = Some(format!( waypoint.name = Some(crossing.to.name.clone());
"Border {:02}: {} -> {}",
index + 1, waypoint.elevation = Some(0.0);
crossing.from.name,
crossing.to.name,
));
waypoint.description = Some(format!( waypoint.description = Some(format!(
"Administrative border crossing: {} [{}] -> {} [{}]", "Administrative border crossing: {} [{}] -> {} [{}]",