Beispiel #1
0
        public static Track FromRoute(Route route)
        {
            Track retVal = new Track();
            retVal.Classification = route.Classification;
            retVal.Comment = route.Comment;
            retVal.Description = route.Description;
            retVal.Link = route.Link;
            retVal.Name = route.Name;
            retVal.number = route.Number;
            retVal.Source = route.src;

            retVal.TrackSegments = new List<TrackSegment>();
            TrackSegment segment = new TrackSegment();
            segment.WayPoints = new List<WayPoint>();
            foreach (WayPoint wp in route.rtept)
            {
                segment.WayPoints.Add(wp);
            }
            retVal.TrackSegments.Add(segment);
            return retVal;
        }
Beispiel #2
0
 /// <summary>
 /// Constructor using a GPX track
 /// </summary>
 /// <param name="track">track</param>
 public Edge(Track track)
 {
     Track = track;
     track.Recalculate();
     Weight = track.GetTrackLength();
 }