/// <summary>Нарезает трек на сегменты</summary> private static IList<TrackSegment> SliceForSegments(GpsTrack Track) { if (Track.TrackPoints.Count == 0) return new TrackSegment[0]; if (Track.TrackPoints.Count == 1) return new[] { new TrackSegment(Track.TrackPoints[0], Track.TrackPoints[0], 0) }; double offset = 0; var res = new List<TrackSegment>(Track.TrackPoints.Count - 1); for (int i = 1; i < Track.TrackPoints.Count; i++) { var segment = new TrackSegment(Track.TrackPoints[i - 1], Track.TrackPoints[i], offset); offset = segment.EndOffset; res.Add(segment); } return res; }
public void SaveTrack(GpsTrack GpsTrack, Stream output) { throw new NotImplementedException(); }
public TrackPathRider(GpsTrack Track) { this.Track = Track; TrackSegments = SliceForSegments(Track); }