private Route TrackToRoute(Track track)
 {
     Route res = new Route("Исходный трек");
     TrackItem[] items = track.TrackItems;
     for (int i = 0; i < items.Length; i++)
     {
         RoutePoint rp = new RoutePoint(items[i].Latitude, items[i].Longitude, items[i].Date, i + 1);
         res.AddPoint(rp);
     }
     return res;
 }
Example #2
0
 private void CalcGeoOnPoint(RoutePoint rp)
 {
     if (rp.lat > latMax)
         latMax = rp.lat;
     if (rp.lat < latMin)
         latMin = rp.lat;
     if (rp.lon > lonMax)
         lonMax = rp.lon;
     if (rp.lon < lonMin)
         lonMin = rp.lon;
 }
 private Route ProccessedTrackToRoute(ProccessedTrack pTrack)
 {
     Route res = new Route(pTrack.MethodName);
     ProccessedTrackItem[] pItems = pTrack.ProccessedTrackItems;
     for (int i = 0; i < pItems.Length; i++)
     {
         RoutePoint rp = new RoutePoint(pItems[i].ProccessedLatitude, pItems[i].ProccessedLongitude, pItems[i].MeasureDate, i + 1);
         res.AddPoint(rp);
     }
     return res;
 }
Example #4
0
 public void AddPoint(RoutePoint point)
 {
     Points.Add(point);
     CalcGeoOnPoint(point);
 }