in render_full immediate levels now cast shadows

This commit is contained in:
Laura Klünder 2016-12-04 02:33:50 +01:00
parent a1ed7534d9
commit a54a85da3b
8 changed files with 54 additions and 17 deletions

View file

@ -7,7 +7,8 @@ from shapely.geometry import JOIN_STYLE, Polygon
from c3nav.routing.graph.point import GraphPoint
from c3nav.routing.graph.room import GraphRoom
from c3nav.routing.utils.base import assert_multipolygon, get_nearest_point
from c3nav.routing.utils.base import get_nearest_point
from c3nav.mapdata.utils import assert_multipolygon
from c3nav.routing.utils.draw import _ellipse_bbox, _line_coords

View file

@ -5,7 +5,7 @@ from matplotlib.path import Path
from shapely.geometry import JOIN_STYLE, LineString
from c3nav.routing.graph.point import GraphPoint
from c3nav.routing.utils.base import assert_multipolygon
from c3nav.mapdata.utils import assert_multipolygon
from c3nav.routing.utils.coords import get_coords_angles
from c3nav.routing.utils.mpl import polygon_to_mpl_paths

View file

@ -1,17 +1,6 @@
from shapely.geometry import Polygon
def assert_multipolygon(geometry):
"""
given a Polygon or a MultiPolygon, return a list of Polygons
:param geometry: a Polygon or a MultiPolygon
:return: a list of Polygons
"""
if isinstance(geometry, Polygon):
polygons = [geometry]
else:
polygons = geometry.geoms
return polygons
from c3nav.mapdata.utils import assert_multipolygon
def get_nearest_point(polygon, point):

View file

@ -1,6 +1,6 @@
from matplotlib.path import Path
from c3nav.routing.utils.base import assert_multipolygon
from c3nav.mapdata.utils import assert_multipolygon
def polygon_to_mpl_paths(polygon):