add stuffedarea but with no routing support yet
This commit is contained in:
parent
06c14a5750
commit
9a6353e2cb
3 changed files with 18 additions and 1 deletions
|
@ -285,7 +285,8 @@ editor = {
|
|||
'arealocation': '#0099FF',
|
||||
'escalator': '#FF9900',
|
||||
'escalatorslope': '#DD7700',
|
||||
'oneway': '#FF00FF'
|
||||
'oneway': '#FF00FF',
|
||||
'stuffedarea': '#D9A3A3'
|
||||
},
|
||||
_line_draw_geometry_style: function(style) {
|
||||
style.stroke = true;
|
||||
|
|
|
@ -168,6 +168,18 @@ class Outside(GeometryMapItemWithLevel):
|
|||
default_related_name = 'outsides'
|
||||
|
||||
|
||||
class StuffedArea(GeometryMapItemWithLevel):
|
||||
"""
|
||||
A slow area with many tables or similar. Avoid it from routing by slowing it a bit down
|
||||
"""
|
||||
geomtype = 'polygon'
|
||||
|
||||
class Meta:
|
||||
verbose_name = _('Stuffed Area')
|
||||
verbose_name_plural = _('Stuffed Areas')
|
||||
default_related_name = 'stuffedareas'
|
||||
|
||||
|
||||
class Escalator(GeometryMapItemWithLevel):
|
||||
"""
|
||||
An escalator area
|
||||
|
|
|
@ -263,3 +263,7 @@ class LevelGeometries():
|
|||
for stair in assert_multilinestring(self.stairs):
|
||||
left.append(stair.parallel_offset(0.15, 'right', join_style=JOIN_STYLE.mitre))
|
||||
return cascaded_union(left).buffer(0.20, join_style=JOIN_STYLE.mitre, cap_style=CAP_STYLE.flat)
|
||||
|
||||
@cached_property
|
||||
def stuffedareas(self):
|
||||
return cascaded_union([stuffedarea.geometry for stuffedarea in self.query('stuffedareas')])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue