Пример #1
0
        public override void Succes()
        {
            OsmSharp.Routing.ArcAggregation.Output.AggregatedPoint poisPoint = (this.FinalMessages[this.FinalMessages.Count - 1] as MicroPlannerMessagePoint).Point;

            List <Routing.ArcAggregation.Output.PointPoi> pois =
                (this.FinalMessages[this.FinalMessages.Count - 1] as MicroPlannerMessagePoint).Point.Points;

            // construct the box indicating the location of the resulting find by this machine.
            GeoCoordinate    point1 = pois[0].Location;
            GeoCoordinateBox box    = new GeoCoordinateBox(
                new GeoCoordinate(point1.Latitude - 0.001f, point1.Longitude - 0.001f),
                new GeoCoordinate(point1.Latitude + 0.001f, point1.Longitude + 0.001f));

            // let the scentence planner generate the correct information.
            this.Planner.SentencePlanner.GeneratePoi(poisPoint.EntryIdx, box, pois, null);
        }
Пример #2
0
        public override void Succes()
        {
            OsmSharp.Routing.ArcAggregation.Output.AggregatedPoint pois_point   = (this.FinalMessages[this.FinalMessages.Count - 1] as MicroPlannerMessagePoint).Point;
            OsmSharp.Routing.ArcAggregation.Output.AggregatedArc   previous_arc = (this.FinalMessages[this.FinalMessages.Count - 2] as MicroPlannerMessageArc).Arc;

            // get the pois list.
            List <Routing.ArcAggregation.Output.PointPoi> pois = (this.FinalMessages[this.FinalMessages.Count - 1] as MicroPlannerMessagePoint).Point.Points;

            // get the angle from the pois point.
            RelativeDirection direction = pois_point.Angle;

            // calculate the box.
            List <GeoCoordinate> coordinates = new List <GeoCoordinate>();

            foreach (Routing.ArcAggregation.Output.PointPoi poi in pois)
            {
                coordinates.Add(poi.Location);
            }
            coordinates.Add(pois_point.Location);
            GeoCoordinateBox box = new GeoCoordinateBox(coordinates.ToArray());

            // let the scentence planner generate the correct information.
            this.Planner.SentencePlanner.GeneratePoi(box, pois, direction);
        }