waypoint: adjust name and elevation
This commit is contained in:
parent
3c933e8bdc
commit
8e79bef1d9
1 changed files with 4 additions and 7 deletions
|
|
@ -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: {} [{}] -> {} [{}]",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue