private RouteSelect SortLocation(Location prev, Location loc,
                                         RouteSelect prevroute, double spd, DateTime dt)
        {
            _routesModel.TimeRoute.Add(new RoutePoint {
                Point = prev, Date = dt
            });
            var curroute = GetRouteClass(spd);

            if (prevroute != curroute)
            {
                loc.FirstPoint = false;
                AddToRoute(loc, prevroute);
                //if(spd > 0)
                AddToRoute(new Location(prev, true), curroute);
            }
            //if(spd > 0)
            AddToRoute(loc, curroute);
            return(curroute);
        }
        /// <summary>
        /// filter data to different route tracks
        /// </summary>
        /// <param name="loc"></param>
        /// <param name="curroute"></param>
        private void AddToRoute(Location loc, RouteSelect curroute)
        {
            switch (curroute)
            {
            case RouteSelect.Normal:
                var added = _routesModel.Route.Count < 1 ? new Location(loc, true) : loc;
                if (_routesModel.Route.IndexOf(added) < 0)
                {
                    _routesModel.Route.Add(added);
                }
                break;

            case RouteSelect.Warning:
                _routesModel.WarningRoute.Add(_routesModel.WarningRoute.Count < 1 ? new Location(loc, true) : loc);
                break;

            case RouteSelect.Error:
                _routesModel.ErrorRoute.Add(_routesModel.ErrorRoute.Count < 1 ? new Location(loc, true) : loc);
                break;
            }
        }