From 06aec216698876fc88e457c76136e4c450f003c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Thu, 8 Dec 2016 21:13:57 +0100 Subject: [PATCH] fix graph building error if only one stair is present on a level --- src/c3nav/routing/room.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c3nav/routing/room.py b/src/c3nav/routing/room.py index 9b0761df..541fe7eb 100644 --- a/src/c3nav/routing/room.py +++ b/src/c3nav/routing/room.py @@ -33,7 +33,7 @@ class GraphRoom(): def prepare_build(self): self.mpl_clear = shapely_to_mpl(self.clear_geometry.buffer(0.01, join_style=JOIN_STYLE.mitre)) self.mpl_stairs = () - for stair_line in self.level.level.geometries.stairs: + for stair_line in assert_multilinestring(self.level.level.geometries.stairs): coords = tuple(stair_line.coords) self.mpl_stairs += tuple((Path(part), coord_angle(*part)) for part in zip(coords[:-1], coords[1:]))