public void SaveTrack(GpsTrack GpsTrack, Stream output)
 {
     using (var writer = new StreamWriter(output))
     {
         foreach (EarthPoint point in GpsTrack.TrackPoints)
             writer.WriteLine("{0:F8}\t{1:F8}", point.Longitude.ToRadian().Value, point.Latitude.ToRadian().Value);
     }
 }
Esempio n. 2
0
 public void SaveTrack(GpsTrack GpsTrack, Stream output)
 {
     var doc =
         new XDocument(
             new XElement("gpx",
                          new XElement("trk",
                                       new XElement("trkseg",
                                                    GpsTrack.TrackPoints
                                                            .Select(point =>
                                                                    new XElement("trkpt",
                                                                                 new XAttribute("lat", point.Latitude.Value),
                                                                                 new XAttribute("lon", point.Longitude.Value)))))));
     doc.Save(output);
 }