From 2f02d3e57fb90892a541a5db09666b9543e738b1 Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Thu, 7 Jan 2016 15:25:39 +0300 Subject: [PATCH] Support and no door icons. --- data/tags.yml | 19 ++ engine/mapper.py | 7 +- engine/process.py | 7 +- icons/icons.svg | 441 ++++++++++++++++++++++++++++++++++------------ 4 files changed, 353 insertions(+), 121 deletions(-) diff --git a/data/tags.yml b/data/tags.yml index 915208a..9ae3635 100644 --- a/data/tags.yml +++ b/data/tags.yml @@ -89,6 +89,23 @@ tags: icon: [information] - tags: {tourism: information} icon: [information] +- tags: {information: board} + icon: [information_board] + +- tags: {vending: public_transport_tickets} + add_icon: [ticket] + + # Support + +- tags: {support: pole} + over_icon: [support_pole] + under_icon: [clock, information_board] +- tags: {support: wall_mounted} + over_icon: [support_wall] + under_icon: [clock, information_board] +- tags: {support: column} + over_icon: [support_column] + under_icon: [clock, information_board] # Eating and entertainment @@ -255,6 +272,8 @@ tags: icon: [main_entrance] - tags: {entrance: staircase} icon: [staircase] +- tags: {door: 'no'} + icon: [no_door] # Transport diff --git a/engine/mapper.py b/engine/mapper.py index 40fa6a9..5a98e37 100644 --- a/engine/mapper.py +++ b/engine/mapper.py @@ -93,10 +93,10 @@ prefix_to_write = set(['addr', 'contact', 'name', 'operator', 'wikipedia', tags_to_skip = set(['note', 'layer', 'level', 'source', 'building:part', 'comment', 'FIXME', 'source_ref', 'naptan:verified:note', 'fixme', - 'building:levels', 'ref:opendataparis:adresse', - 'ref:opendataparis:geo_point_2d', 'created_by']) + 'building:levels', 'ref:opendataparis:adresse', 'indoor', 'level:ref', + 'ref:opendataparis:geo_point_2d', 'created_by', 'mapillary']) -prefix_to_skip = set(['source']) +prefix_to_skip = set(['source', 'mapillary']) def get_d_from_file(file_name): path, x, y = icons.get_path(file_name) @@ -410,6 +410,7 @@ def construct_way(drawing, nodes, tags, path, user, time): :param user: way update time. """ layer = 0 + level = 0 if 'layer' in tags: layer = get_float(tags['layer']) diff --git a/engine/process.py b/engine/process.py index 3ee0db5..1b648ee 100644 --- a/engine/process.py +++ b/engine/process.py @@ -43,9 +43,10 @@ def get_icon(tags, scheme, fill='444444'): main_icon = copy.deepcopy(matcher['icon']) processed = set(matcher['tags'].keys()) if 'over_icon' in matcher: - main_icon += matcher['over_icon'] - for key in matcher['tags'].keys(): - processed.add(key) + if main_icon: # TODO: check main icon in under icons + main_icon += matcher['over_icon'] + for key in matcher['tags'].keys(): + processed.add(key) if 'add_icon' in matcher: extra_icons += matcher['add_icon'] for key in matcher['tags'].keys(): diff --git a/icons/icons.svg b/icons/icons.svg index aad761f..b266f59 100644 --- a/icons/icons.svg +++ b/icons/icons.svg @@ -24,20 +24,20 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="11.313708" - inkscape:cx="335.33561" - inkscape:cy="558.55783" + inkscape:zoom="16" + inkscape:cx="384.8366" + inkscape:cy="470.06725" inkscape:current-layer="layer1" inkscape:document-units="px" showgrid="false" - showguides="false" + showguides="true" inkscape:guide-bbox="true" inkscape:object-paths="true" inkscape:snap-bbox="true" inkscape:window-width="1479" inkscape:window-height="905" inkscape:window-x="65" - inkscape:window-y="47" + inkscape:window-y="70" inkscape:window-maximized="0"> + - @@ -766,7 +770,7 @@ sodipodi:rx="4" sodipodi:ry="4" d="m 156,56 a 4,4 0 1 1 -8,0 4,4 0 1 1 8,0 z" - transform="matrix(0.875,0,0,0.875,-29.5,-25.5)" /> + transform="matrix(0.875,0,0,0.875,-28.5,-25.5)" /> - - - - - - - + d="m 378,153 c 0,-3 -4,-1 -4,-4" + style="fill:#808080;stroke:#ffdd55;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" /> @@ -2125,7 +2085,7 @@ sodipodi:nodetypes="cc" inkscape:connector-curvature="0" id="path4432" - d="m 389,186 c 0,-3 -4,-1 -4,-4" + d="m 378,158 c 0,-3 -4,-1 -4,-4" style="fill:#aa8800;stroke:#d4aa00;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" /> + transform="translate(161,-30)" /> @@ -2151,13 +2111,13 @@ id="rect4442" width="3" height="1" - x="103" + x="104" y="23" ry="0.5" rx="0.5" /> @@ -3873,16 +3833,6 @@ id="main_entrance" inkscape:label="#path4508" inkscape:connector-curvature="0" /> - - + transform="translate(17,32)" /> + transform="translate(17,32)" /> + d="m 182,213 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z" + transform="translate(16,32)" /> + d="m 188,213 a 1,1 0 1 1 -2,0 1,1 0 1 1 2,0 z" + transform="translate(16,32)" /> + transform="translate(16,29.5)" /> + transform="translate(32.5,32.5)" /> + transform="translate(31.5,32.5)" /> + inkscape:label="#rect4610" + inkscape:connector-curvature="0" /> @@ -4687,12 +4640,12 @@ id="rect4631" width="5" height="9" - x="213" - y="213" + x="229" + y="245" ry="0" /> @@ -4701,12 +4654,12 @@ id="rect4640" width="3" height="7" - x="214" - y="214" /> + x="230" + y="246" /> + d="m 247,258 0,2 -3,4 0,7 7,0 0,-7 -3,-4 0,-2 -1,0 z m 0.5,3.03125 2.21875,2.96875 -4.4375,0 2.21875,-2.96875 z" + id="milk" + inkscape:connector-curvature="0" /> + id="bicycle" + inkscape:label="#path4662" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +