From 08d947226df768bfe90736674fc2f34af16bd5cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Fri, 22 Dec 2017 15:30:04 +0100 Subject: [PATCH] fix error for areas with no nodes --- src/c3nav/routing/router.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/c3nav/routing/router.py b/src/c3nav/routing/router.py index d73cc7e5..f7515def 100644 --- a/src/c3nav/routing/router.py +++ b/src/c3nav/routing/router.py @@ -220,9 +220,10 @@ class Router: if edge.access_restriction: restrictions.setdefault(edge.access_restriction, RouterRestriction()).edges.append(index) + # respect slow_down_factor for area in areas.values(): if area.slow_down_factor != 1: - area_nodes = np.array(area.nodes) + area_nodes = np.array(area.nodes, dtype=np.uint32) graph[area_nodes.reshape((-1, 1)), area_nodes] *= float(area.slow_down_factor) # finalize waytype matrixes