示例#1
0
        private List <IntermediatePoint> SeparateDuplexPoint(List <IntermediatePoint> intermediatePoints)
        {
            int i = 0;

            do
            {
                if (intermediatePoints.Count == 0)
                {
                    break;
                }
                var currentElement = intermediatePoints.ElementAt(i);
                intermediatePoints.RemoveAll(p => Matematic.GaversinusMethod(p.Latitude, currentElement.Latitude, p.Longitude, currentElement.Longitude) <= 1);
                i++;
            } while (i < intermediatePoints.Count);
            return(intermediatePoints);
        }
示例#2
0
 public void InsertBusStops(List <BusStop> busStops)
 {
     BusStops = busStops.FindAll(b => IntermediatePoints.Any(i => Matematic.GaversinusMethod(i.Latitude, b.Latitude, i.Longitude, b.Longitude) <= 1));
 }