Beispiel #1
0
        public DataAnalyzer(GPXFile file, trkType track)
        {
            TrackPoints = file.GetTrackFirstSegmentPoints(track.name);

            Segments = BuildSegments(TrackPoints);
            Segues   = BuildSegues(Segments);
        }
        public static List <wptType> GetTrackFirstSegmentPoints(trkType track)
        {
            if (track.trkseg.Count() < 1)
            {
                return(null);
            }

            return(track.trkseg[0].trkpt.ToList());
        }
        public List <wptType> GetTrackFirstSegmentPoints(string trackName)
        {
            trkType track = gpx.trk.FirstOrDefault(t => t.name.ToUpper() == trackName.ToUpper());

            if (track == null || track.trkseg.Count() < 1)
            {
                return(null);
            }

            return(track.trkseg[0].trkpt.ToList());
        }
        public List <trksegType> GetTrackSegments(string trackName)
        {
            trkType track = gpx.trk.FirstOrDefault(t => t.name == trackName);

            if (track == null)
            {
                return(null);
            }

            return(track.trkseg.ToList());
        }
        public List <wptType> GetTrackPoints(string trackName, int segment)
        {
            trkType track = gpx.trk.FirstOrDefault(t => t.name.ToUpper() == trackName.ToUpper());

            if (track == null)
            {
                return(null);
            }
            if (track.trkseg.Count() < segment + 1)
            {
                return(null);
            }

            return(track.trkseg[segment].trkpt.ToList());
        }
 public static List <trksegType> GetTrackSegments(trkType track)
 {
     return(track.trkseg.ToList());
 }