Ejemplo n.º 1
0
        static void ChangeToWaypoints()
        {
            var points = GpxFile.Load("Track.gpx")
                         .Tracks
                         .SelectMany(t => t.Segments)
                         .SelectMany(s => s.Points);

            var gpx = new GpxFile();
            var i   = 1;

            foreach (var pt in points)
            {
                pt.Name        = $"My waypoint - {i++}";
                pt.Description = $"Desc My waypoint - {i++}";
                gpx.AddWaypoint(pt);
            }
            gpx.Save("Waypoints.gpx", true);
        }