Beispiel #1
0
        /// <summary>
        /// Calculates heatmap for the given profile.
        /// </summary>
        public static HeatmapResult CalculateHeatmap(this RouterBase router, Profile profile, Coordinate origin, int limitInSeconds, int zoom, CancellationToken cancellationToken)
        {
            if (!router.SupportsAll(profile))
            {
                throw new ArgumentException(string.Format("Profile {0} not supported.",
                                                          profile.FullName));
            }

            var routerOrigin = router.Resolve(profile, origin);

            return(router.CalculateHeatmap(profile, routerOrigin, limitInSeconds, zoom, cancellationToken));
        }
Beispiel #2
0
 /// <summary>
 /// Tries to calculate a tree starting at the given location.
 /// </summary>
 public static Tree CalculateTree(this RouterBase router, Profile profile, Coordinate origin, float max)
 {
     return(router.TryCalculateTree(profile, router.Resolve(profile, origin, 500), max).Value);
 }
Beispiel #3
0
        /// <summary>
        /// Calculates isochrones for the given profile based on the given limits.
        /// </summary>
        public static List <LocalGeo.Polygon> CalculateIsochrones(this RouterBase router, Profile profile, Coordinate origin, List <float> limits, int zoom = 16)
        {
            var routerOrigin = router.Resolve(profile, origin);

            return(router.CalculateIsochrones(profile, routerOrigin, limits, zoom));
        }
Beispiel #4
0
        /// <summary>
        /// Calculates heatmap for the given profile.
        /// </summary>
        public static HeatmapResult CalculateHeatmap(this RouterBase router, Profile profile, Coordinate origin, int limitInSeconds, int zoom = 16)
        {
            var routerOrigin = router.Resolve(profile, origin);

            return(router.CalculateHeatmap(profile, routerOrigin, limitInSeconds, zoom));
        }