Beispiel #1
0
        private static void Table4x(OsrmClient osrm)
        {
            var locations = new Location[] {
                new Location(52.554070, 13.160621),
                new Location(52.431272, 13.720654),
                new Location(52.554070, 13.720654),
                new Location(52.554070, 13.160621),
            };

            var result = osrm.Table(locations);

            var src = new Location[] {
                new Location(52.554070, 13.160621),
            };

            var dst = new Location[] {
                new Location(52.431272, 13.720654),
                new Location(52.554070, 13.720654),
                new Location(52.554070, 13.160621),
            };

            var result2 = osrm.Table(new TableRequest()
            {
                SourceLocations      = src,
                DestinationLocations = dst
            });
        }
Beispiel #2
0
        private static void Trip4x(OsrmClient osrm)
        {
            var locations = new Location[] {
                new Location(52.503033, 13.420526),
                new Location(52.516582, 13.429290),
            };

            var result = osrm.Trip(locations);
        }
Beispiel #3
0
        private static void Match4x(OsrmClient osrm)
        {
            var locations = new LocationWithTimestamp[] {
                new LocationWithTimestamp(52.542648, 13.393252, 1424684612),
                new LocationWithTimestamp(52.543079, 13.394780, 1424684616),
                new LocationWithTimestamp(52.542107, 13.397389, 1424684620)
            };

            var request = new MatchRequest()
            {
                Locations    = locations,
                Instructions = true,
                Classify     = true
            };

            var result = osrm.Match(request);
        }
Beispiel #4
0
        private static void Main(string[] args)
        {
            var osrm5x = new Osrm5x(OsrmUrl);

            Route5x(osrm5x);
            Nearest5x(osrm5x);
            Table5x(osrm5x);
            Match5x(osrm5x);
            Trip5x(osrm5x);

            //  4x
            OsrmClient osrm4x = new OsrmClient(OsrmUrl);

            Route4x(osrm4x);
            Table4x(osrm4x);
            Match4x(osrm4x);
            Nearest4x(osrm4x);
            Trip4x(osrm4x);
        }
Beispiel #5
0
        private static void Route4x(OsrmClient osrm)
        {
            var locations = new Location[] {
                new Location(52.503033, 13.420526),
                new Location(52.516582, 13.429290),
            };

            var result = osrm.Route(locations);

            var result2 = osrm.Route(new ViarouteRequest()
            {
                Locations = locations,
                SendLocsAsEncodedPolyline = true,
                Alternative = false,
            });

            var result3 = osrm.Route(new ViarouteRequest()
            {
                Locations    = locations,
                Instructions = true,
                Zoom         = 5
            });
            var instructions3 = result3.RouteInstructions;
        }
Beispiel #6
0
 private static void Nearest4x(OsrmClient osrm)
 {
     var result = osrm.Nearest(new Location(52.4224, 13.333086));
 }