diff --git a/.gitignore b/.gitignore index 5012171..3a83d22 100644 --- a/.gitignore +++ b/.gitignore @@ -22,8 +22,10 @@ missed_tags.yml # Cache -map/ # OSM XML files +cache/ +map/ # Generated files -icon_set/ # Generated SVG icon files +icon_set/ +out/ diff --git a/doc/grid.png b/doc/grid.png index 0cda273..918a16b 100644 Binary files a/doc/grid.png and b/doc/grid.png differ diff --git a/doc/power.png b/doc/power.png index 40418d6..62953f1 100644 Binary files a/doc/power.png and b/doc/power.png differ diff --git a/doc/power_tower_design.png b/doc/power_tower_design.png index 60c2855..f95de07 100644 Binary files a/doc/power_tower_design.png and b/doc/power_tower_design.png differ diff --git a/doc/surveillance.png b/doc/surveillance.png index af058ce..b488f91 100644 Binary files a/doc/surveillance.png and b/doc/surveillance.png differ diff --git a/doc/trees.png b/doc/trees.png index 9a12712..f953a73 100644 Binary files a/doc/trees.png and b/doc/trees.png differ diff --git a/doc/viewpoints.png b/doc/viewpoints.png index d04a011..850e5f4 100644 Binary files a/doc/viewpoints.png and b/doc/viewpoints.png differ diff --git a/roentgen.py b/roentgen.py index a328e25..200294a 100644 --- a/roentgen.py +++ b/roentgen.py @@ -7,6 +7,7 @@ import argparse import os import sys from pathlib import Path +from typing import List import numpy as np import svgwrite @@ -15,7 +16,7 @@ from roentgen import ui from roentgen.constructor import Constructor from roentgen.flinger import Flinger from roentgen.grid import draw_all_icons -from roentgen.icon import ShapeExtractor, ShapeConfiguration +from roentgen.icon import ShapeExtractor from roentgen.mapper import ( AUTHOR_MODE, CREATION_TIME_MODE, ICONS_FILE_NAME, Painter, TAGS_FILE_NAME, check_level_number, check_level_overground @@ -38,22 +39,26 @@ def main(argv) -> None: if not options: sys.exit(1) + input_file_names: List[Path] + if options.input_file_name: - input_file_name = options.input_file_name + input_file_names = list(map(Path, options.input_file_name)) else: content = get_osm(options.boundary_box) if not content: ui.error("cannot download OSM data") - input_file_name = [os.path.join("map", options.boundary_box + ".osm")] + input_file_names = ["map" / Path(options.boundary_box + ".osm")] - scheme: Scheme = Scheme(TAGS_FILE_NAME) + scheme: Scheme = Scheme(Path(TAGS_FILE_NAME)) + min_: np.array + max_: np.array - if input_file_name[0].endswith(".json"): + if input_file_names[0].name.endswith(".json"): reader: OverpassReader = OverpassReader() - reader.parse_json_file(input_file_name[0]) + reader.parse_json_file(input_file_names[0]) map_ = reader.map_ - min1 = np.array((map_.boundary_box[0].min_, map_.boundary_box[1].min_)) - max1 = np.array((map_.boundary_box[0].max_, map_.boundary_box[1].max_)) + min_ = np.array((map_.boundary_box[0].min_, map_.boundary_box[1].min_)) + max_ = np.array((map_.boundary_box[0].max_, map_.boundary_box[1].max_)) else: boundary_box = list(map(float, options.boundary_box.split(','))) @@ -65,19 +70,19 @@ def main(argv) -> None: osm_reader = OSMReader() - for file_name in input_file_name: - if not os.path.isfile(file_name): - print("Fatal: no such file: " + file_name + ".") + for file_name in input_file_names: + if not file_name.is_file(): + print(f"Fatal: no such file: {file_name}.") sys.exit(1) osm_reader.parse_osm_file(file_name, full=full) map_: Map = osm_reader.map_ - min1: np.array = np.array((boundary_box[1], boundary_box[0])) - max1: np.array = np.array((boundary_box[3], boundary_box[2])) + min_ = np.array((boundary_box[1], boundary_box[0])) + max_ = np.array((boundary_box[3], boundary_box[2])) - flinger: Flinger = Flinger(MinMax(min1, max1), options.scale) + flinger: Flinger = Flinger(MinMax(min_, max_), options.scale) size: np.array = flinger.size svg: svgwrite.Drawing = ( @@ -130,11 +135,13 @@ def draw_element(target: str, tags_description: str): comma, key from value is separated by equals sign. """ tags = dict([x.split("=") for x in tags_description.split(",")]) - scheme = Scheme("scheme/default.yml") - extractor = ShapeExtractor("icons/icons.svg", Path("icons/config.json")) + scheme = Scheme(Path("scheme/default.yml")) + extractor = ShapeExtractor( + Path("icons/icons.svg"), Path("icons/config.json") + ) icon, priority = scheme.get_icon(extractor, tags) is_for_node: bool = target == "node" - labels = scheme.construct_text(tags, True) + labels = scheme.construct_text(tags, "all") point = Point( icon, labels, tags, np.array((32, 32)), None, is_for_node=is_for_node, draw_outline=is_for_node @@ -154,7 +161,7 @@ def draw_element(target: str, tags_description: str): svg.write(open("test_icon.svg", "w+")) -def draw_grid(): +def draw_grid() -> None: """ Draw all possible icon shapes combinations as grid. """ diff --git a/roentgen/color.py b/roentgen/color.py index 9e05b84..d67b7c3 100644 --- a/roentgen/color.py +++ b/roentgen/color.py @@ -1,7 +1,5 @@ """ Color utility. - -Author: Sergey Vartanov (me@enzet.ru) """ from typing import Any, List @@ -9,6 +7,9 @@ from colour import Color from roentgen.util import MinMax +__author__ = "Sergey Vartanov" +__email__ = "me@enzet.ru" + def is_bright(color: Color) -> bool: """ diff --git a/roentgen/constructor.py b/roentgen/constructor.py index 2dd0ced..1aa0558 100644 --- a/roentgen/constructor.py +++ b/roentgen/constructor.py @@ -1,7 +1,5 @@ """ Construct Röntgen nodes and ways. - -Author: Sergey Vartanov (me@enzet.ru). """ from collections import Counter from datetime import datetime @@ -23,6 +21,9 @@ from roentgen.point import Point from roentgen.scheme import DEFAULT_COLOR, LineStyle, Scheme from roentgen.util import MinMax +__author__ = "Sergey Vartanov" +__email__ = "me@enzet.ru" + DEBUG: bool = False TIME_COLOR_SCALE: List[Color] = [ Color("#581845"), Color("#900C3F"), Color("#C70039"), Color("#FF5733"), diff --git a/roentgen/direction.py b/roentgen/direction.py index 1d56470..e80bc30 100644 --- a/roentgen/direction.py +++ b/roentgen/direction.py @@ -1,13 +1,14 @@ """ Direction tag support. - -Author: Sergey Vartanov (me@enzet.ru). """ from typing import Iterator, List, Optional, Union import numpy as np from portolan import middle +__author__ = "Sergey Vartanov" +__email__ = "me@enzet.ru" + SVGPath = Union[float, str, np.array] SHIFT: float = -np.pi / 2 diff --git a/roentgen/flinger.py b/roentgen/flinger.py index fbd0dd7..c849ae0 100644 --- a/roentgen/flinger.py +++ b/roentgen/flinger.py @@ -1,6 +1,4 @@ """ -Author: Sergey Vartanov (me@enzet.ru) - Geo projection. """ from typing import Optional @@ -9,6 +7,9 @@ import numpy as np from roentgen.util import MinMax +__author__ = "Sergey Vartanov" +__email__ = "me@enzet.ru" + EQUATOR_LENGTH: float = 40_075_017 # (in meters) diff --git a/roentgen/grid.py b/roentgen/grid.py index 617e2fb..c8168b1 100644 --- a/roentgen/grid.py +++ b/roentgen/grid.py @@ -1,7 +1,5 @@ """ Icon grid drawing. - -Author: Sergey Vartanov (me@enzet.ru). """ from os.path import join from pathlib import Path @@ -14,6 +12,9 @@ from svgwrite import Drawing from roentgen.icon import Icon, ShapeExtractor, ShapeSpecification from roentgen.scheme import Scheme +__author__ = "Sergey Vartanov" +__email__ = "me@enzet.ru" + def draw_all_icons( output_file_name: str, output_directory: str, columns: int = 16, @@ -31,14 +32,13 @@ def draw_all_icons( :param background_color: background color :param color: icon color """ - tags_file_name: str = "scheme/default.yml" - scheme: Scheme = Scheme(tags_file_name) + scheme: Scheme = Scheme(Path("scheme/default.yml")) icons: List[Icon] = [] icons_file_name: str = "icons/icons.svg" extractor: ShapeExtractor = ShapeExtractor( - icons_file_name, Path("icons/config.json") + Path(icons_file_name), Path("icons/config.json") ) def add() -> None: @@ -54,32 +54,33 @@ def draw_all_icons( if constructed_icon not in icons: icons.append(constructed_icon) - for element in scheme.icons: # type: Dict[str, Any] - for key in ["icon", "add_icon"]: - if key in element: - current_set = element[key] - add() - if "over_icon" not in element: - continue - if "under_icon" in element: + for group in scheme.icons: + for element in group["tags"]: # type: Dict[str, Any] + for key in ["icon", "add_icon"]: + if key in element: + current_set = element[key] + add() + if "over_icon" not in element: + continue + if "under_icon" in element: + for icon_id in element["under_icon"]: # type: str + current_set = set([icon_id] + element["over_icon"]) + add() + if not ("under_icon" in element and "with_icon" in element): + continue for icon_id in element["under_icon"]: # type: str - current_set = set([icon_id] + element["over_icon"]) - add() - if not ("under_icon" in element and "with_icon" in element): - continue - for icon_id in element["under_icon"]: # type: str - for icon_2_id in element["with_icon"]: # type: str - current_set: Set[str] = set( - [icon_id] + [icon_2_id] + element["over_icon"]) - add() - for icon_2_id in element["with_icon"]: # type: str - for icon_3_id in element["with_icon"]: # type: str - current_set = set( - [icon_id] + [icon_2_id] + [icon_3_id] + - element["over_icon"]) - if (icon_2_id != icon_3_id and icon_2_id != icon_id and - icon_3_id != icon_id): - add() + for icon_2_id in element["with_icon"]: # type: str + current_set: Set[str] = set( + [icon_id] + [icon_2_id] + element["over_icon"]) + add() + for icon_2_id in element["with_icon"]: # type: str + for icon_3_id in element["with_icon"]: # type: str + current_set = set( + [icon_id] + [icon_2_id] + [icon_3_id] + + element["over_icon"]) + if (icon_2_id != icon_3_id and icon_2_id != icon_id and + icon_3_id != icon_id): + add() specified_ids: Set[str] = set() diff --git a/roentgen/icon.py b/roentgen/icon.py index 58da6b5..020b9de 100644 --- a/roentgen/icon.py +++ b/roentgen/icon.py @@ -1,7 +1,5 @@ """ Extract icons from SVG file. - -Author: Sergey Vartanov (me@enzet.ru). """ import json import re @@ -19,6 +17,9 @@ from svgwrite.path import Path as SvgPath from roentgen.color import is_bright from roentgen.ui import error +__author__ = "Sergey Vartanov" +__email__ = "me@enzet.ru" + DEFAULT_COLOR: Color = Color("#444444") DEFAULT_SHAPE_ID: str = "default" DEFAULT_SMALL_SHAPE_ID: str = "default_small" @@ -94,7 +95,7 @@ class ShapeExtractor: Shape is a single path with "id" attribute that aligned to 16×16 grid. """ - def __init__(self, svg_file_name: str, configuration_file_name: Path): + def __init__(self, svg_file_name: Path, configuration_file_name: Path): """ :param svg_file_name: input SVG file name with icons. File may contain any other irrelevant graphics. @@ -102,7 +103,7 @@ class ShapeExtractor: self.configuration = ShapeConfiguration(configuration_file_name) self.shapes: Dict[str, Shape] = {} - with open(svg_file_name) as input_file: + with svg_file_name.open() as input_file: content: Document = parse(input_file) for element in content.childNodes: # type: Element if element.nodeName != "svg": diff --git a/roentgen/mapper.py b/roentgen/mapper.py index 454bebe..4e1f5ca 100644 --- a/roentgen/mapper.py +++ b/roentgen/mapper.py @@ -1,7 +1,5 @@ """ Simple OpenStreetMap renderer. - -Author: Sergey Vartanov (me@enzet.ru). """ from typing import Any, Dict @@ -21,6 +19,9 @@ from roentgen.osm_reader import Map from roentgen.point import Occupied, Point from roentgen.scheme import Scheme +__author__ = "Sergey Vartanov" +__email__ = "me@enzet.ru" + ICONS_FILE_NAME: str = "icons/icons.svg" TAGS_FILE_NAME: str = "scheme/default.yml" MISSING_TAGS_FILE_NAME: str = "missing_tags.yml" diff --git a/roentgen/osm_getter.py b/roentgen/osm_getter.py index 3d48856..182cc65 100644 --- a/roentgen/osm_getter.py +++ b/roentgen/osm_getter.py @@ -1,18 +1,19 @@ """ Getting OpenStreetMap data from the web. - -Author: Sergey Vartanov (me@enzet.ru). """ -import os import re import time import urllib +from pathlib import Path from typing import Dict, Optional import urllib3 from roentgen.ui import error +__author__ = "Sergey Vartanov" +__email__ = "me@enzet.ru" + def get_osm(boundary_box: str, to_update: bool = False) -> Optional[str]: """ @@ -21,10 +22,10 @@ def get_osm(boundary_box: str, to_update: bool = False) -> Optional[str]: :param boundary_box: borders of the map part to download :param to_update: update cache files """ - result_file_name = os.path.join("map", boundary_box + ".osm") + result_file_name: Path = "map" / Path(boundary_box + ".osm") - if not to_update and os.path.isfile(result_file_name): - return open(result_file_name).read() + if not to_update and result_file_name.is_file(): + return result_file_name.open().read() matcher = re.match( "(?P[0-9.-]*),(?P[0-9.-]*)," + @@ -58,7 +59,7 @@ def get_osm(boundary_box: str, to_update: bool = False) -> Optional[str]: "api.openstreetmap.org/api/0.6/map", {"bbox": boundary_box}, is_secure=True) - open(result_file_name, "w+").write(content.decode("utf-8")) + result_file_name.open("w+").write(content.decode("utf-8")) return content.decode("utf-8") diff --git a/roentgen/osm_reader.py b/roentgen/osm_reader.py index 228482c..0f44e9b 100644 --- a/roentgen/osm_reader.py +++ b/roentgen/osm_reader.py @@ -1,10 +1,9 @@ """ Reading OpenStreetMap data from XML file. - -Author: Sergey Vartanov (me@enzet.ru). """ import json from datetime import datetime +from pathlib import Path from typing import Any, Dict, List, Optional, Set, Union import numpy as np @@ -12,6 +11,9 @@ import numpy as np from roentgen.ui import progress_bar from roentgen.util import MinMax +__author__ = "Sergey Vartanov" +__email__ = "me@enzet.ru" + OSM_TIME_PATTERN: str = "%Y-%m-%dT%H:%M:%SZ" @@ -67,7 +69,8 @@ class OSMNode(Tagged): self.visible = get_value("visible", text) self.changeset = get_value("changeset", text) self.timestamp = datetime.strptime( - get_value("timestamp", text), OSM_TIME_PATTERN) + get_value("timestamp", text), OSM_TIME_PATTERN + ) self.user = get_value("user", text) self.uid = get_value("uid", text) @@ -296,11 +299,11 @@ class OverpassReader: def __init__(self): self.map_ = Map() - def parse_json_file(self, file_name: str) -> Map: + def parse_json_file(self, file_name: Path) -> Map: """ Parse JSON structure from the file and construct map. """ - with open(file_name) as input_file: + with file_name.open() as input_file: structure = json.load(input_file) node_map = {} @@ -332,7 +335,7 @@ class OSMReader: self.map_ = Map() def parse_osm_file( - self, file_name: str, parse_nodes: bool = True, + self, file_name: Path, parse_nodes: bool = True, parse_ways: bool = True, parse_relations: bool = True, full: bool = False ) -> Map: @@ -341,7 +344,7 @@ class OSMReader: :param file_name: input OSM XML file name """ - with open(file_name) as input_file: + with file_name.open() as input_file: lines_number: int = sum(1 for _ in input_file) print(f"Parsing OSM file {file_name}...") @@ -349,7 +352,7 @@ class OSMReader: element: Optional[Union[OSMNode, OSMWay, OSMRelation]] = None - with open(file_name) as input_file: + with file_name.open() as input_file: for line in input_file.readlines(): # type: str line = line.strip() diff --git a/roentgen/point.py b/roentgen/point.py index baadcad..4a8a76b 100644 --- a/roentgen/point.py +++ b/roentgen/point.py @@ -11,6 +11,9 @@ from roentgen.icon import Icon, IconSet from roentgen.osm_reader import Tagged from roentgen.text import Label +__author__ = "Sergey Vartanov" +__email__ = "me@enzet.ru" + DEFAULT_FONT: str = "Roboto" diff --git a/roentgen/scheme.py b/roentgen/scheme.py index fea735e..c2b4dd1 100644 --- a/roentgen/scheme.py +++ b/roentgen/scheme.py @@ -1,10 +1,9 @@ """ Röntgen drawing scheme. - -Author: Sergey Vartanov (me@enzet.ru). """ from dataclasses import dataclass from enum import Enum +from pathlib import Path from typing import Any, Dict, List, Optional, Set, Tuple, Union import yaml @@ -17,6 +16,9 @@ from roentgen.icon import ( ) from roentgen.text import Label, get_address, get_text +__author__ = "Sergey Vartanov" +__email__ = "me@enzet.ru" + @dataclass class LineStyle: @@ -103,12 +105,12 @@ class Scheme: Specifies map colors and rules to draw icons for OpenStreetMap tags. """ - def __init__(self, file_name: str): + def __init__(self, file_name: Path): """ - :param file_name: scheme file name with tags, colors, and tag key + :param file_name: name of the scheme file with tags, colors, and tag key specification """ - with open(file_name) as input_file: + with file_name.open() as input_file: content: Dict[str, Any] = yaml.load( input_file.read(), Loader=yaml.FullLoader) @@ -198,45 +200,49 @@ class Scheme: processed: Set[str] = set() priority: int = 0 - for index, matcher in enumerate(self.icons): - index: int - matcher: Dict[str, Any] - matched: bool = is_matched(matcher, tags) - matcher_tags: Set[str] = matcher["tags"].keys() - if not matched: - continue - priority = len(self.icons) - index - if "draw" in matcher and not matcher["draw"]: - processed |= set(matcher_tags) - if "icon" in matcher: - main_icon = Icon([ - ShapeSpecification.from_structure(x, icon_extractor, self) - for x in matcher["icon"] - ]) - processed |= set(matcher_tags) - if "over_icon" in matcher: - if main_icon: - main_icon.add_specifications([ - ShapeSpecification.from_structure( - x, icon_extractor, self - ) - for x in matcher["over_icon"] + index: int = 0 + + for group in self.icons: + for matcher in group["tags"]: + matcher: Dict[str, Any] + matched: bool = is_matched(matcher, tags) + matcher_tags: Set[str] = matcher["tags"].keys() + if not matched: + continue + priority = len(self.icons) - index + if "draw" in matcher and not matcher["draw"]: + processed |= set(matcher_tags) + if "icon" in matcher: + main_icon = Icon([ + ShapeSpecification.from_structure(x, icon_extractor, self) + for x in matcher["icon"] ]) + processed |= set(matcher_tags) + if "over_icon" in matcher: + if main_icon: + main_icon.add_specifications([ + ShapeSpecification.from_structure( + x, icon_extractor, self + ) + for x in matcher["over_icon"] + ]) + for key in matcher_tags: + processed.add(key) + if "add_icon" in matcher: + extra_icons += [Icon([ + ShapeSpecification.from_structure( + x, icon_extractor, self, Color("#888888") + ) + for x in matcher["add_icon"] + ])] for key in matcher_tags: processed.add(key) - if "add_icon" in matcher: - extra_icons += [Icon([ - ShapeSpecification.from_structure( - x, icon_extractor, self, Color("#888888") - ) - for x in matcher["add_icon"] - ])] - for key in matcher_tags: - processed.add(key) - if "color" in matcher: - assert False - if "set_main_color" in matcher: - main_icon.recolor(self.get_color(matcher["set_main_color"])) + if "color" in matcher: + assert False + if "set_main_color" in matcher: + main_icon.recolor(self.get_color(matcher["set_main_color"])) + + index += 1 color: Optional[Color] = None diff --git a/roentgen/text.py b/roentgen/text.py index 2533ff4..3f1b1af 100644 --- a/roentgen/text.py +++ b/roentgen/text.py @@ -1,13 +1,14 @@ """ OSM address tag processing. - -Author: Sergey Vartanov (me@enzet.ru). """ from dataclasses import dataclass from typing import Any, Dict, List from colour import Color +__author__ = "Sergey Vartanov" +__email__ = "me@enzet.ru" + DEFAULT_COLOR: Color = Color("#444444") diff --git a/roentgen/ui.py b/roentgen/ui.py index ef360c0..a09597d 100644 --- a/roentgen/ui.py +++ b/roentgen/ui.py @@ -1,11 +1,14 @@ """ -Author: Sergey Vartanov (me@enzet.ru). +Command-line user interface. """ import argparse import sys from typing import List, Optional +__author__ = "Sergey Vartanov" +__email__ = "me@enzet.ru" + BOXES: List[str] = [" ", "▏", "▎", "▍", "▌", "▋", "▊", "▉"] BOXES_LENGTH: int = len(BOXES) diff --git a/roentgen/util.py b/roentgen/util.py index 9323cd2..4dd4845 100644 --- a/roentgen/util.py +++ b/roentgen/util.py @@ -1,11 +1,12 @@ """ Röntgen utility file. - -Author: Sergey Vartanov (me@enzet.ru). """ from dataclasses import dataclass from typing import Any +__author__ = "Sergey Vartanov" +__email__ = "me@enzet.ru" + @dataclass class MinMax: diff --git a/scheme/default.yml b/scheme/default.yml index f701682..1c0317f 100644 --- a/scheme/default.yml +++ b/scheme/default.yml @@ -69,744 +69,740 @@ colors: node_icons: - # No draw + - group: "No draw" + tags: + - tags: {type: multipolygon} + draw: false + - tags: {place: "*"} + draw: false + - tags: {building: "yes"} + draw: false - - tags: {type: multipolygon} - draw: false - - tags: {place: "*"} - draw: false - - tags: {building: "yes"} - draw: false + - group: "Transport hubs" + tags: + - tags: {amenity: ferry_terminal} + icon: [anchor] + - tags: {amenity: ferry_terminal, cargo: vehicle} + icon: [car_on_ferry] + - tags: {amenity: ferry_terminal, cargo: passengers} + icon: [human_on_ferry] + - tags: {aeroway: aerodrome} + icon: [plane] + - tags: {aeroway: helipad} + icon: [h] + - tags: {aeroway: spaceport} + icon: [rocket_on_launch_pad] + - tags: {aeroway: launchpad} + icon: [rocket_flying] + - tags: {aeroway: landingpad} + icon: [booster_landing] + - tags: {highway: bus_stop} + icon: [bus_stop] + add_icon: [bus] + - tags: {railway: station} + icon: [train] + - tags: {railway: station, station: subway, transport: subway} + icon: [train] + - tags: {railway: subway_entrance} + icon: [train] + - tags: {railway: subway_entrance, entrance: "yes"} + icon: [train] + - tags: {public_transport: stop_position} + icon: [bus_stop] + - tags: {railway: tram_station} + icon: [tram] + - tags: {railway: tram_stop} + icon: [tram] + - tags: {public_transport: platform} + icon: [bus_stop_sign] + with_icon: [bus_stop_bench, bus_stop_shelter] + over_icon: [platform] + - tags: {highway: bus_stop, public_transport: platform} + icon: [bus_stop_sign] + with_icon: [bus_stop_bench, bus_stop_shelter] + over_icon: [platform] + - tags: {highway: bus_stop, shelter: "yes"} + icon: [bus_stop_sign] + under_icon: [bus_stop_sign] + with_icon: [bus_stop_bench, platform] + over_icon: [bus_stop_shelter] + - tags: {highway: bus_stop, bench: "yes"} + under_icon: [bus_stop_sign] + with_icon: [bus_stop_shelter, platform] + over_icon: [bus_stop_bench] + - tags: {highway: stop} + icon: [stop] - # Transport hubs + - group: "Big territory" + tags: + - tags: {leisure: fishing} + icon: [fishing_angle] + - tags: {power: substation} + icon: [electricity] + - tags: {plant: christmas_trees} + icon: [{shape: christmas_tree, color: orchard_border_color}] + - tags: {produce: apple} + icon: [{shape: apple, color: orchard_border_color}] + - tags: {produce: christmas_trees} + icon: [{shape: christmas_tree, color: orchard_border_color}] + - tags: {produce: pear} + icon: [{shape: pear, color: orchard_border_color}] + - tags: {trees: apple_trees} + icon: [{shape: apple, color: orchard_border_color}] + - tags: {trees: pear_trees} + icon: [{shape: pear, color: orchard_border_color}] - - tags: {amenity: ferry_terminal} - icon: [anchor] - - tags: {amenity: ferry_terminal, cargo: vehicle} - icon: [car_on_ferry] - - tags: {amenity: ferry_terminal, cargo: passengers} - icon: [human_on_ferry] - - tags: {aeroway: aerodrome} - icon: [plane] - - tags: {aeroway: helipad} - icon: [h] - - tags: {aeroway: spaceport} - icon: [rocket_on_launch_pad] - - tags: {aeroway: launchpad} - icon: [rocket_flying] - - tags: {aeroway: landingpad} - icon: [booster_landing] - - tags: {highway: bus_stop} - icon: [bus_stop] - add_icon: [bus] - - tags: {railway: station} - icon: [train] - - tags: {railway: station, station: subway, transport: subway} - icon: [train] - - tags: {railway: subway_entrance} - icon: [train] - - tags: {railway: subway_entrance, entrance: "yes"} - icon: [train] - - tags: {public_transport: stop_position} - icon: [bus_stop] - - tags: {railway: tram_station} - icon: [tram] - - tags: {railway: tram_stop} - icon: [tram] - - tags: {public_transport: platform} - icon: [bus_stop_sign] - with_icon: [bus_stop_bench, bus_stop_shelter] - over_icon: [platform] - - tags: {highway: bus_stop, public_transport: platform} - icon: [bus_stop_sign] - with_icon: [bus_stop_bench, bus_stop_shelter] - over_icon: [platform] - - tags: {highway: bus_stop, shelter: "yes"} - icon: [bus_stop_sign] - under_icon: [bus_stop_sign] - with_icon: [bus_stop_bench, platform] - over_icon: [bus_stop_shelter] - - tags: {highway: bus_stop, bench: "yes"} - under_icon: [bus_stop_sign] - with_icon: [bus_stop_shelter, platform] - over_icon: [bus_stop_bench] - - tags: {highway: stop} - icon: [stop] + - group: "Bigger objects" + tags: + - tags: {waterway: waterfall} + icon: [{shape: waterfall, color: water_border_color}] + - tags: {natural: cliff} + icon: [cliff] + - tags: {natural: peak} + icon: [triangle_small] + - tags: {shop: mall} + icon: [bag] + - tags: {shop: mall, building: "yes"} + icon: [bag] - # Big territory + - group: "Important big objects" + tags: + - tags: {amenity: pharmacy} + icon: [medicine_bottle] + - tags: {amenity: embassy} + icon: [waving_flag] + - tags: {tourism: hotel} + icon: [bed] + - tags: {building: hotel} + icon: [bed] + - tags: {tourism: hostel} + icon: [two_beds] + - tags: {tourism: motel} # Tourism? + icon: [motel] + - tags: {amenity: clinic} + icon: [greek_cross] + - tags: {amenity: post_office} + location_restrictions: {include: world, exclude: jp} + icon: [envelope] + - tags: {amenity: post_office} + location_restrictions: {include: jp} + icon: [japan_post] + - tags: {shop: car_repair} + icon: [car_repair] + # Place of worship + - tags: {religion: christian} + icon: [cross] + - tags: {amenity: place_of_worship, religion: christian} + icon: [cross] + - tags: + amenity: place_of_worship + religion: christian + denomination: catholic + icon: [cross] + - tags: + amenity: place_of_worship + religion: christian + denomination: russian_orthodox + icon: [russian_orthodox] + - tags: + amenity: place_of_worship + religion: christian + denomination: orthodox + icon: [orthodox] + - tags: + amenity: place_of_worship + religion: christian + denomination: baptist + icon: [baptist] + - tags: {amenity: place_of_worship, religion: muslim} + icon: [muslim] + - tags: {amenity: place_of_worship, religion: buddhist} + icon: [buddhist] + - tags: {amenity: place_of_worship, religion: jewish} + icon: [jewish] + - tags: {historic: tomb, tomb: mausoleum} + icon: [mausoleum] - - tags: {leisure: fishing} - icon: [fishing_angle] - - tags: {power: substation} - icon: [electricity] - # plant=* - - tags: {plant: christmas_trees} - icon: [{shape: christmas_tree, color: orchard_border_color}] - # produce=* - - tags: {produce: apple} - icon: [{shape: apple, color: orchard_border_color}] - - tags: {produce: christmas_trees} - icon: [{shape: christmas_tree, color: orchard_border_color}] - - tags: {produce: pear} - icon: [{shape: pear, color: orchard_border_color}] - # trees=* - - tags: {trees: apple_trees} - icon: [{shape: apple, color: orchard_border_color}] - - tags: {trees: pear_trees} - icon: [{shape: pear, color: orchard_border_color}] + - group: "Normal big objects" + tags: + - tags: {shop: supermarket} + icon: [supermarket_cart] + - tags: {amenity: arts_centre} + icon: [picture] + - tags: {amenity: bank} + icon: [money] + - tags: {amenity: cinema} + icon: [film] + - tags: {amenity: casino} + icon: [card_and_dice] + - tags: {amenity: community_centre} + icon: [two_people_together] + - tags: {amenity: internet_cafe} + icon: [at_in_square] + - tags: {amenity: library} + icon: [book] + - tags: {amenity: prison} + icon: [prison] + - tags: {man_made: survey_point} + icon: [survey_point] + - tags: {leisure: amusement_arcade} + icon: [pac_man] + - tags: {leisure: fitness_centre} + icon: [dumbbell] + - tags: {leisure: outdoor_seating} + icon: [table_and_two_chairs, umbrella] + - tags: {leisure: outdoor_seating, weather_protection: parasol} + icon: [table_and_two_chairs, umbrella] + - tags: {leisure: outdoor_seating, weather_protection: roof} + icon: [table_and_two_chairs, roof] + - tags: {leisure: outdoor_seating, weather_protection: awning} + icon: [table_and_two_chairs, awning] + - tags: {leisure: outdoor_seating, weather_protection: pavilion} + icon: [table_and_two_chairs, roof_and_walls] + - tags: {leisure: outdoor_seating, weather_protection: pergola} + icon: [table_and_two_chairs, pergola] + - tags: {leisure: playground} + icon: [toy_horse] + - tags: {amenity: theatre} + icon: [theatre] + - tags: {amenity: bar} + icon: [bar] + - tags: {amenity: pub} + icon: [beer_mug] + - tags: {amenity: fast_food} + icon: [burger] + - tags: {amenity: food_court} + icon: [food_court] + - tags: {amenity: shop, shop: fishing} + icon: [fishing_angle] + - tags: {shop: alcohol} + icon: [bottle] + - tags: {shop: bakery} + icon: [cupcake] + - tags: {shop: milk} + icon: [milk] + - tags: {building: store} + icon: [shop_convenience] + - tags: {shop: ticket} + icon: [ticket] + - tags: {shop: watches} + icon: [watches] + - tags: {craft: watchmaker} + icon: [watches] + - tags: {shop: frame} + icon: [frame] + - tags: {tourism: gallery} + icon: [picture] + - tags: {amenity: cafe} + icon: [coffee_cup] + - tags: {amenity: ice_cream} + icon: [ice_cream] + - tags: {amenity: biergarten} + icon: [beer_mug] + - tags: {amenity: nightclub} + icon: [night_club] + - tags: {amenity: restaurant} + icon: [restaurant] + - tags: {amenity: restaurant;bar} + icon: [restaurant] + add_icon: [bar] + - tags: {shop: ice_cream} + icon: [ice_cream] + - tags: {shop: gift} + icon: [gift] + - tags: {shop: clothes} + icon: [shop_clothes] + - tags: {amenity: shop, shop: clothes} + icon: [shop_clothes] + - tags: {shop: convenience} + icon: [shop_convenience] + - tags: {amenity: shop, shop: convenience} + icon: [shop_convenience] + - tags: {shop: electronics} + icon: [tv] - # Bigger objects + - group: "Big objects not for all" + tags: + - tags: {building: apartments} + icon: [apartments] + - tags: {building: kindergarten} + icon: [toy_horse] + - tags: {amenity: kindergarten} + icon: [toy_horse] + - tags: {building: kindergarten, amenity: kindergarten} + icon: [toy_horse] + - tags: {building: office} + icon: [briefcase] + - tags: {amenity: school} + location_restrictions: {include: jp} + icon: [japan_elementary_school] + - tags: {office: telecommunication} + icon: [telephone] - - tags: {waterway: waterfall} - icon: [{shape: waterfall, color: water_border_color}] - - tags: {natural: cliff} - icon: [cliff] - - tags: {natural: peak} - icon: [triangle_small] - - tags: {shop: mall} - icon: [bag] - - tags: {shop: mall, building: "yes"} - icon: [bag] + - group: "Not important big objects" + tags: + - tags: {man_made: tower} + icon: [tower] + - tags: {building: garages} + icon: [garages] + - tags: {building: garage} + icon: [garages] - # Important big objects + - group: "Emergency" + tags: + - tags: {emergency: defibrillator} + icon: [{shape: defibrillator, color: emergency_color}] + - tags: {emergency: fire_extinguisher} + icon: [{shape: fire_extinguisher, color: emergency_color}] + - tags: {emergency: fire_hydrant} + icon: [fire_hydrant] + - tags: {emergency: life_ring} + icon: [{shape: life_ring, color: emergency_color}] + - tags: {emergency: phone} + icon: [{shape: sos_phone, color: emergency_color}] - - tags: {amenity: pharmacy} - icon: [medicine_bottle] - - tags: {amenity: embassy} - icon: [waving_flag] - - tags: {tourism: hotel} - icon: [bed] - - tags: {building: hotel} - icon: [bed] - - tags: {tourism: hostel} - icon: [two_beds] - - tags: {tourism: motel} # Tourism? - icon: [motel] - - tags: {amenity: clinic} - icon: [greek_cross] - - tags: {amenity: post_office} - location_restrictions: {include: world, exclude: jp} - icon: [envelope] - - tags: {amenity: post_office} - location_restrictions: {include: jp} - icon: [japan_post] - - tags: {shop: car_repair} - icon: [car_repair] - # Place of worship - - tags: {religion: christian} - icon: [cross] - - tags: {amenity: place_of_worship, religion: christian} - icon: [cross] - - tags: - amenity: place_of_worship - religion: christian - denomination: catholic - icon: [cross] - - tags: - amenity: place_of_worship - religion: christian - denomination: russian_orthodox - icon: [russian_orthodox] - - tags: - amenity: place_of_worship - religion: christian - denomination: orthodox - icon: [orthodox] - - tags: - amenity: place_of_worship - religion: christian - denomination: baptist - icon: [baptist] - - tags: {amenity: place_of_worship, religion: muslim} - icon: [muslim] - - tags: {amenity: place_of_worship, religion: buddhist} - icon: [buddhist] - - tags: {amenity: place_of_worship, religion: jewish} - icon: [jewish] - - tags: {historic: tomb, tomb: mausoleum} - icon: [mausoleum] + - group: "Transport-important middle objects" + tags: + - tags: {ford: "yes"} + icon: [ford] + - tags: {amenity: charging_station} + icon: [charging_station] + - tags: {amenity: bicycle_repair_station} + icon: [bicycle_repair] + - tags: {amenity: fuel} + icon: [fuel_station] + - tags: {amenity: parking} + icon: [p] + - tags: {highway: turning_circle} + icon: [circle_empty] + - tags: {highway: crossing} + icon: [crossing] + - tags: {crossing: zebra} + icon: [crossing] + - tags: {highway: crossing, crossing: zebra} + icon: [crossing] + - tags: {crossing: marked} + icon: [crossing] + - tags: {highway: crossing, crossing: marked} + icon: [crossing] + - tags: {highway: crossing, crossing_ref: zebra} + icon: [crossing] + - tags: {highway: crossing, crossing: uncontrolled} + add_icon: [no_traffic_signals] + - tags: {highway: crossing, crossing: traffic_signals} + add_icon: [traffic_signals] + - tags: {highway: traffic_signals} + icon: [traffic_signals] + - tags: {crossing_ref: toucan} + icon: [toucan_crossing] - # Normal big objects + - group: "Important middle objects" + tags: + - tags: {tourism: attraction, attraction: amusement_ride} + icon: [amusement_ride] + - tags: {amenity: toilets} + icon: [woman_and_man] - - tags: {shop: supermarket} - icon: [supermarket_cart] - - tags: {amenity: arts_centre} - icon: [picture] - - tags: {amenity: bank} - icon: [money] - - tags: {amenity: cinema} - icon: [film] - - tags: {amenity: casino} - icon: [card_and_dice] - - tags: {amenity: community_centre} - icon: [two_people_together] - - tags: {amenity: internet_cafe} - icon: [at_in_square] - - tags: {amenity: library} - icon: [book] - - tags: {amenity: prison} - icon: [prison] - - tags: {man_made: survey_point} - icon: [survey_point] - - tags: {leisure: amusement_arcade} - icon: [pac_man] - - tags: {leisure: fitness_centre} - icon: [dumbbell] - - tags: {leisure: outdoor_seating} - icon: [table_and_two_chairs, umbrella] - - tags: {leisure: outdoor_seating, weather_protection: parasol} - icon: [table_and_two_chairs, umbrella] - - tags: {leisure: outdoor_seating, weather_protection: roof} - icon: [table_and_two_chairs, roof] - - tags: {leisure: outdoor_seating, weather_protection: awning} - icon: [table_and_two_chairs, awning] - - tags: {leisure: outdoor_seating, weather_protection: pavilion} - icon: [table_and_two_chairs, roof_and_walls] - - tags: {leisure: outdoor_seating, weather_protection: pergola} - icon: [table_and_two_chairs, pergola] - - tags: {leisure: playground} - icon: [toy_horse] - - tags: {amenity: theatre} - icon: [theatre] - - tags: {amenity: bar} - icon: [bar] - - tags: {amenity: pub} - icon: [beer_mug] - - tags: {amenity: fast_food} - icon: [burger] - - tags: {amenity: food_court} - icon: [food_court] - - tags: {amenity: shop, shop: fishing} - icon: [fishing_angle] - - tags: {shop: alcohol} - icon: [bottle] - - tags: {shop: bakery} - icon: [cupcake] - - tags: {shop: milk} - icon: [milk] - - tags: {building: store} - icon: [shop_convenience] - - tags: {shop: ticket} - icon: [ticket] - - tags: {shop: watches} - icon: [watches] - - tags: {craft: watchmaker} - icon: [watches] - - tags: {shop: frame} - icon: [frame] - - tags: {tourism: gallery} - icon: [picture] - - tags: {amenity: cafe} - icon: [coffee_cup] - - tags: {amenity: ice_cream} - icon: [ice_cream] - - tags: {amenity: biergarten} - icon: [beer_mug] - - tags: {amenity: nightclub} - icon: [night_club] - - tags: {amenity: restaurant} - icon: [restaurant] - - tags: {amenity: restaurant;bar} - icon: [restaurant] - add_icon: [bar] - - tags: {shop: ice_cream} - icon: [ice_cream] - - tags: {shop: gift} - icon: [gift] - - tags: {shop: clothes} - icon: [shop_clothes] - - tags: {amenity: shop, shop: clothes} - icon: [shop_clothes] - - tags: {shop: convenience} - icon: [shop_convenience] - - tags: {amenity: shop, shop: convenience} - icon: [shop_convenience] - - tags: {shop: electronics} - icon: [tv] + - group: "Normal middle objects" + tags: + - tags: {shop: kiosk} + icon: [kiosk] + - tags: {building: "yes", shop: kiosk} + icon: [kiosk] + - tags: {amenity: shop, shop: kiosk} + icon: [kiosk] + - tags: {amenity: stage} + icon: [theatre] + - tags: {natural: cave_entrance} + icon: [cave] - # Big objects not for all + - group: "Not important middle objects" + tags: + - tags: {building: ventilation_shaft} + icon: [ventilation] + - tags: {power: generator} + icon: [power_generator] + - tags: {amenity: public_bookcase} + icon: [books] + - tags: {power: transformer} + icon: [transformer] + - tags: {power: generator, generator:source: solar} + icon: [solar_panel] + - tags: {power: generator, generator:source: wind} + icon: [wind_turbine] + - tags: {power: tower} + icon: [power_tower_2_level] + - tags: {power: tower, design: one-level} + icon: [power_tower_1_level] + - tags: {power: tower, design: two-level} + icon: [power_tower_2_level] + - tags: {power: tower, design: three-level} + icon: [power_tower_3_level] + - tags: {power: tower, design: four-level} + icon: [power_tower_4_level] + - tags: {power: tower, design: donau} + icon: [power_tower_donau] + - tags: {power: tower, design: barrel} + icon: [power_tower_barrel] + - tags: {power: tower, design: asymmetric} + icon: [power_tower_asymmetric] + - tags: {power: tower, design: triangle} + icon: [power_tower_triangle] + - tags: {power: tower, design: delta} + icon: [power_tower_delta] + - tags: {power: tower, design: delta_two-level} + icon: [power_tower_delta_2_level] + - tags: {power: tower, design: delta_three-level} + icon: [power_tower_delta_3_level] + - tags: {power: tower, design: y-frame} + icon: [power_tower_y_frame] + - tags: {power: tower, design: x-frame} + icon: [power_tower_x_frame] + - tags: {power: tower, design: h-frame} + icon: [power_tower_h_frame] + - tags: {power: tower, design: h-frame_two-level} + icon: [power_tower_h_frame_2_level] + - tags: {power: tower, design: guyed_h-frame} + icon: [power_tower_guyed_h_frame] + - tags: {power: portal} + icon: [power_tower_portal] + - tags: {power: tower, design: portal} + icon: [power_tower_portal] + - tags: {power: tower, design: portal_two-level} + icon: [power_tower_portal_2_level] + - tags: {power: tower, design: portal_three-level} + icon: [power_tower_portal_3_level] - - tags: {building: apartments} - icon: [apartments] - - tags: {building: kindergarten} - icon: [toy_horse] - - tags: {amenity: kindergarten} - icon: [toy_horse] - - tags: {building: kindergarten, amenity: kindergarten} - icon: [toy_horse] - - tags: {building: office} - icon: [briefcase] - - tags: {amenity: school} - location_restrictions: {include: jp} - icon: [japan_elementary_school] - - tags: {office: telecommunication} - icon: [telephone] + - group: "Important small objects" + tags: + - tags: {historic: memorial} + icon: [memorial] + - tags: {historic: memorial, memorial: plaque} + icon: [plaque] + - tags: {historic: memorial, memorial: statue} + icon: [statue] + - tags: {historic: stone} + icon: [stone_with_inscription] + - tags: {historic: memorial, memorial: stone} + icon: [stone_with_inscription] + - tags: {historic: tomb} + icon: [tomb] + - tags: {tomb: "*"} + to_tags: {tomb: mausoleum} + icon: [tomb] + - tags: {barrier: lift_gate} + icon: [lift_gate] + - tags: {barrier: turnstile} + icon: [turnstile] + - tags: {railway: level_crossing} + icon: [x] + - tags: {railway: crossing} + icon: [x] + - tags: {amenity: atm} + icon: [atm] + - tags: {amenity: bicycle_parking} + icon: [bicycle_p] + - tags: {amenity: telephone} + icon: [telephone] + - tags: {information: "*"} + icon: [information] + - tags: {tourism: "*"} + icon: [historic] + - tags: {tourism: information} + icon: [information] + - tags: {information: guidepost} + icon: [guidepost] + - tags: {tourism: viewpoint} + icon: [binocular] + - tags: {information: board} + icon: [information_board] + - tags: {vending: admission_tickets} + icon: [vending_tickets] + - tags: {vending: candles} + icon: [vending_candles] + - tags: {vending: chemist} + icon: [vending_chemist] + - tags: {vending: drinks} + icon: [vending_bottle] + - tags: {vending: fishing_tackle} + icon: [vending_angle] + - tags: {vending: public_transport_tickets} + icon: [vending_tickets] + - tags: {vending: water} + icon: [vending_drop] + - tags: {buoy: "*"} + icon: [buoy] + - tags: {"seamark:type": "*"} + icon: [buoy] + - tags: {"waterway:sign": "*"} + icon: [buoy] + - tags: {amenity: drinking_water} + icon: [drinking_water] + - tags: {tourism: artwork} + icon: [picture] + - tags: {tourism: artwork, artwork_type: statue} + icon: [statue] + - tags: {tourism: artwork, artwork_type: sculpture} + icon: [statue] + - tags: {tourism: attraction} + icon: [photo_camera] + - tags: {xmas:feature: tree} + icon: {christmas_tree} - # Not important big objects + - group: "Normal small objects" + tags: + - tags: {amenity: binoculars} + icon: [binoculars_on_pole] + - tags: {amenity: post_box} + icon: [envelope] + - tags: {amenity: recycling} + icon: [recycling_container] + - tags: {amenity: recycling, recycling_type: container} + icon: [recycling_container] + - tags: {amenity: vending_machine} + icon: [vending_machine] + - tags: {amenity: vending_machine, vending: excrement_bags} + icon: [vending_excrement_bag] + - tags: {fitness_station: horizontal_bar} + icon: [horizontal_bar] + - tags: {fitness_station: wall_bars} + icon: [wall_bars] + - tags: {fitness_station: sit-up} + icon: [sit_up] + - tags: {fitness_station: horizontal_ladder} + icon: [horizontal_ladder] + - tags: {fitness_station: push-up} + icon: [low_horizontal_bars] + - tags: {playground: slide} + icon: [slide] + - tags: {playground: roundabout} + icon: [roundabout] + - tags: {playground: seesaw} + icon: [seesaw] + - tags: {playground: horizontal_bar} + icon: [horizontal_bar] + - tags: {leisure: picnic_table} + icon: [table] - - tags: {man_made: tower} - icon: [tower] - - tags: {building: garages} - icon: [garages] - - tags: {building: garage} - icon: [garages] + - group: "Entrances" + tags: + - tags: {barrier: gate} + icon: [gate] + - tags: {entrance: main} + icon: [main_entrance] + - tags: {barrier: entrance} + icon: [entrance] + - tags: {entrance: "yes"} + icon: [entrance] + - tags: {entrance: exit} + icon: [exit] + - tags: {entrance: service} + icon: [door_with_keyhole] + - tags: {entrance: staircase} + icon: [staircase] + - tags: {door: "no"} + icon: [no_door] - # Emergency + - group: "Not important small objects" + tags: + - tags: {amenity: bench} + icon: [bench] + - tags: {amenity: bench, backrest: "yes"} + icon: [bench_backrest] + - tags: {amenity: bench, backrest: "no"} + icon: [bench_no_backrest] + - tags: {amenity: clock} + icon: [clock] + - tags: {amenity: fountain} + icon: [{shape: fountain, color: water_border_color}] + - tags: {amenity: waste_basket} + icon: [waste_basket] + - tags: {highway: street_lamp} + icon: [street_lamp] + - tags: {man_made: cross} + icon: [cross] + - tags: {man_made: flagpole} + icon: [flagpole] + - tags: {man_made: manhole} + icon: [circle_9] + - tags: {manhole: drain} + icon: [manhole_drain] + - tags: {man_made: pole} + icon: [pole] + - tags: {man_made: pole, highway: street_lamp} + icon: [pole_lamp] + - tags: {man_made: street_cabinet} + icon: [street_cabinet] + - tags: {man_made: surveillance} + icon: [cctv] + - tags: {man_made: ventilation_shaft} + icon: [ventilation] + - tags: {power: pole} + icon: [pole] + - tags: {advertising: billboard} + icon: [billboard] + - tags: {natural: rock} + icon: [stone] + - tags: {natural: stone} + icon: [stone] + - tags: {sloped_curb: "yes"} + icon: [lowered_kerb] + - tags: {kerb: lowered} + icon: [lowered_kerb] - - tags: {emergency: defibrillator} - icon: [{shape: defibrillator, color: emergency_color}] - - tags: {emergency: fire_extinguisher} - icon: [{shape: fire_extinguisher, color: emergency_color}] - - tags: {emergency: fire_hydrant} - icon: [fire_hydrant] - - tags: {emergency: life_ring} - icon: [{shape: life_ring, color: emergency_color}] - - tags: {emergency: phone} - icon: [{shape: sos_phone, color: emergency_color}] + - tags: {natural: tree} + icon: [{shape: tree, color: tree_color}] + - tags: {leaf_type: broadleaved} + icon: [{shape: tree_with_leaf, color: tree_color}] + - tags: {leaf_type: needleleaved} + icon: [{shape: needleleaved_tree, color: tree_color}] + - tags: {leaf_type: palm} + icon: [{shape: palm, color: tree_color}] + - tags: {natural: tree, leaf_type: broadleaved} + icon: [{shape: tree_with_leaf, color: tree_color}] + - tags: {natural: tree, leaf_type: needleleaved} + icon: [{shape: needleleaved_tree, color: tree_color}] + - tags: {natural: tree, leaf_type: palm} + icon: [{shape: palm, color: tree_color}] + - tags: {natural: tree, type: conifer} + icon: [{shape: needleleaved_tree, color: tree_color}] + - tags: {leaf_cycle: deciduous} + set_main_color: decidious_color + - tags: {leaf_cycle: evergreen} + set_main_color: evergreen_color + - tags: {natural: tree, leaf_cycle: deciduous} + set_main_color: decidious_color + - tags: {natural: tree, leaf_cycle: evergreen} + set_main_color: evergreen_color + - tags: {natural: bush} + icon: [{shape: bush, color: tree_color}] + - tags: {natural: tree, genus: Betula} + icon: [{shape: betula, color: tree_color}] + - tags: {natural: tree, "genus:en": Birch} + icon: [{shape: betula, color: tree_color}] + - tags: {natural: tree, "genus:ru": Берёза} + icon: [{shape: betula, color: tree_color}] - # Transport-important middle objects + - tags: {railway: buffer_stop} + icon: [buffer_stop] + - tags: {traffic_sign: city_limit} + icon: [city_limit_sign] + - tags: {traffic_sign: maxspeed, maxspeed: "30"} + icon: [ + circle_11, + {shape: digit_3, offset: [-2, 0], color: "#FFFFFF"}, + {shape: digit_0, offset: [2, 0], color: "#FFFFFF"}, + ] + - tags: {traffic_sign: maxspeed, maxspeed: "40"} + icon: [ + circle_11, + {shape: digit_4, offset: [-2, 0], color: "#FFFFFF"}, + {shape: digit_0, offset: [2, 0], color: "#FFFFFF"}, + ] + - tags: {traffic_sign: maxspeed, maxspeed: "50"} + icon: [ + circle_11, + {shape: digit_5, offset: [-2, 0], color: "#FFFFFF"}, + {shape: digit_0, offset: [2, 0], color: "#FFFFFF"}, + ] + - tags: {traffic_sign: maxspeed, maxspeed: "60"} + icon: [ + circle_11, + {shape: digit_6, offset: [-2, 0], color: "#FFFFFF"}, + {shape: digit_0, offset: [2, 0], color: "#FFFFFF"}, + ] + - tags: {traffic_sign: maxspeed, maxspeed: "40_mph"} + icon: [ + speed_limit_mph, + {shape: digit_4, offset: [-2, 2]}, + {shape: digit_0, offset: [2, 2]}, + ] + - tags: {traffic_sign: stop} + icon: [stop] + - tags: {highway: give_way} + icon: [triangle_down_hollow] + - tags: {noexit: "yes"} + icon: [noexit] + - tags: {barrier: block} + icon: [block] + - tags: {barrier: rock} + icon: [stone] + - tags: {barrier: bollard} + icon: [bollard] - - tags: {ford: "yes"} - icon: [ford] - - tags: {amenity: charging_station} - icon: [charging_station] - - tags: {amenity: bicycle_repair_station} - icon: [bicycle_repair] - - tags: {amenity: fuel} - icon: [fuel_station] - - tags: {amenity: parking} - icon: [p] - - tags: {highway: turning_circle} - icon: [circle_empty] - - tags: {highway: crossing} - icon: [crossing] - - tags: {crossing: zebra} - icon: [crossing] - - tags: {highway: crossing, crossing: zebra} - icon: [crossing] - - tags: {crossing: marked} - icon: [crossing] - - tags: {highway: crossing, crossing: marked} - icon: [crossing] - - tags: {highway: crossing, crossing_ref: zebra} - icon: [crossing] - - tags: {highway: crossing, crossing: uncontrolled} - add_icon: [no_traffic_signals] - - tags: {highway: crossing, crossing: traffic_signals} - add_icon: [traffic_signals] - - tags: {highway: traffic_signals} - icon: [traffic_signals] - - tags: {crossing_ref: toucan} - icon: [toucan_crossing] + - group: "Indoor" + tags: + - tags: {door: "yes"} + icon: [entrance] - # Important middle objects + - group: "Add and over" + tags: + - 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] + - tags: {amenity: "*", karaoke: "yes"} + add_icon: [microphone] + - tags: {building: "*", "roof:shape": onion} + add_icon: [onion_roof_shape] + - tags: {natural: tree, denotation: urban} + over_icon: [urban_tree_pot] + under_icon: [tree, tree_with_leaf, needleleaved_tree, betula, palm] + - tags: {natural: tree, denotation: avenue} + over_icon: [bottom_right_horizontal_line] + under_icon: [tree, tree_with_leaf, needleleaved_tree, betula, palm] - - tags: {tourism: attraction, attraction: amusement_ride} - icon: [amusement_ride] - - tags: {amenity: toilets} - icon: [woman_and_man] + - tags: {wheelchair: "yes"} + add_icon: [wheelchair] + - tags: {wheelchair: "no"} + add_icon: [no_wheelchair] + - tags: {foot: "yes"} + add_icon: [foot] + - tags: {foot: "no"} + add_icon: [no_foot] + - tags: {bicycle: "yes"} + add_icon: [bicycle] + - tags: {bicycle: "no"} + add_icon: [no_bicycle] + - tags: {internet_access: wlan, "internet_access:fee": "no"} + add_icon: [free_wlan] + - tags: {internet_access: wlan} + no_tags: {"internet_access:fee": "*"} + add_icon: [wlan] + - tags: {material: wood} + add_icon: [wood] + - tags: {access: private} + add_icon: [lock_with_keyhole] + - tags: {direction: clockwise} + add_icon: [clockwise] + - tags: {direction: contrclockwise} + add_icon: [contrclockwise] + - tags: {atm: "yes"} + add_icon: [atm] + - tags: {tactile_paving: "yes"} + add_icon: [tactile_paving] + - tags: {"payment:credit_cards": "yes"} + add_icon: [credit_card] - # Normal middle objects + - tags: {bus: "yes"} + add_icon: [bus] + - tags: {monorail: "yes"} + add_icon: [monorail] + - tags: {trolleybus: "yes"} + add_icon: [trolleybus] - - tags: {shop: kiosk} - icon: [kiosk] - - tags: {building: "yes", shop: kiosk} - icon: [kiosk] - - tags: {amenity: shop, shop: kiosk} - icon: [kiosk] - - tags: {amenity: stage} - icon: [theatre] - - tags: {natural: cave_entrance} - icon: [cave] + - tags: {recycling:glass_bottles: "yes"} + add_icon: [bottle] - # Not important middle objects - - - tags: {building: ventilation_shaft} - icon: [ventilation] - - tags: {power: generator} - icon: [power_generator] - - tags: {amenity: public_bookcase} - icon: [books] - - tags: {power: transformer} - icon: [transformer] - - tags: {power: generator, generator:source: solar} - icon: [solar_panel] - - tags: {power: generator, generator:source: wind} - icon: [wind_turbine] - - tags: {power: tower} - icon: [power_tower_2_level] - - tags: {power: tower, design: one-level} - icon: [power_tower_1_level] - - tags: {power: tower, design: two-level} - icon: [power_tower_2_level] - - tags: {power: tower, design: three-level} - icon: [power_tower_3_level] - - tags: {power: tower, design: four-level} - icon: [power_tower_4_level] - - tags: {power: tower, design: donau} - icon: [power_tower_donau] - - tags: {power: tower, design: barrel} - icon: [power_tower_barrel] - - tags: {power: tower, design: asymmetric} - icon: [power_tower_asymmetric] - - tags: {power: tower, design: triangle} - icon: [power_tower_triangle] - - tags: {power: tower, design: delta} - icon: [power_tower_delta] - - tags: {power: tower, design: delta_two-level} - icon: [power_tower_delta_2_level] - - tags: {power: tower, design: delta_three-level} - icon: [power_tower_delta_3_level] - - tags: {power: tower, design: y-frame} - icon: [power_tower_y_frame] - - tags: {power: tower, design: x-frame} - icon: [power_tower_x_frame] - - tags: {power: tower, design: h-frame} - icon: [power_tower_h_frame] - - tags: {power: tower, design: h-frame_two-level} - icon: [power_tower_h_frame_2_level] - - tags: {power: tower, design: guyed_h-frame} - icon: [power_tower_guyed_h_frame] - - tags: {power: portal} - icon: [power_tower_portal] - - tags: {power: tower, design: portal} - icon: [power_tower_portal] - - tags: {power: tower, design: portal_two-level} - icon: [power_tower_portal_2_level] - - tags: {power: tower, design: portal_three-level} - icon: [power_tower_portal_3_level] - - # Important small objects - - - tags: {historic: memorial} - icon: [memorial] - - tags: {historic: memorial, memorial: plaque} - icon: [plaque] - - tags: {historic: memorial, memorial: statue} - icon: [statue] - - tags: {historic: stone} - icon: [stone_with_inscription] - - tags: {historic: memorial, memorial: stone} - icon: [stone_with_inscription] - - tags: {historic: tomb} - icon: [tomb] - - tags: {tomb: "*"} - to_tags: {tomb: mausoleum} - icon: [tomb] - - tags: {barrier: lift_gate} - icon: [lift_gate] - - tags: {barrier: turnstile} - icon: [turnstile] - - tags: {railway: level_crossing} - icon: [x] - - tags: {railway: crossing} - icon: [x] - - tags: {amenity: atm} - icon: [atm] - - tags: {amenity: bicycle_parking} - icon: [bicycle_p] - - tags: {amenity: telephone} - icon: [telephone] - - tags: {information: "*"} - icon: [information] - - tags: {tourism: "*"} - icon: [historic] - - tags: {tourism: information} - icon: [information] - - tags: {information: guidepost} - icon: [guidepost] - - tags: {tourism: viewpoint} - icon: [binocular] - - tags: {information: board} - icon: [information_board] - - tags: {vending: admission_tickets} - icon: [vending_tickets] - - tags: {vending: candles} - icon: [vending_candles] - - tags: {vending: chemist} - icon: [vending_chemist] - - tags: {vending: drinks} - icon: [vending_bottle] - - tags: {vending: fishing_tackle} - icon: [vending_angle] - - tags: {vending: public_transport_tickets} - icon: [vending_tickets] - - tags: {vending: water} - icon: [vending_drop] - - tags: {buoy: "*"} - icon: [buoy] - - tags: {"seamark:type": "*"} - icon: [buoy] - - tags: {"waterway:sign": "*"} - icon: [buoy] - - tags: {amenity: drinking_water} - icon: [drinking_water] - - tags: {tourism: artwork} - icon: [picture] - - tags: {tourism: artwork, artwork_type: statue} - icon: [statue] - - tags: {tourism: artwork, artwork_type: sculpture} - icon: [statue] - - tags: {tourism: attraction} - icon: [photo_camera] - - tags: {xmas:feature: tree} - icon: {christmas_tree} - - # Normal small objects - - - tags: {amenity: binoculars} - icon: [binoculars_on_pole] - - tags: {amenity: post_box} - icon: [envelope] - - tags: {amenity: recycling} - icon: [recycling_container] - - tags: {amenity: recycling, recycling_type: container} - icon: [recycling_container] - - tags: {amenity: vending_machine} - icon: [vending_machine] - - tags: {amenity: vending_machine, vending: excrement_bags} - icon: [vending_excrement_bag] - - tags: {fitness_station: horizontal_bar} - icon: [horizontal_bar] - - tags: {fitness_station: wall_bars} - icon: [wall_bars] - - tags: {fitness_station: sit-up} - icon: [sit_up] - - tags: {fitness_station: horizontal_ladder} - icon: [horizontal_ladder] - - tags: {fitness_station: push-up} - icon: [low_horizontal_bars] - - tags: {playground: slide} - icon: [slide] - - tags: {playground: roundabout} - icon: [roundabout] - - tags: {playground: seesaw} - icon: [seesaw] - - tags: {playground: horizontal_bar} - icon: [horizontal_bar] - - tags: {leisure: picnic_table} - icon: [table] - - # Entrances - - - tags: {barrier: gate} - icon: [gate] - - tags: {entrance: main} - icon: [main_entrance] - - tags: {barrier: entrance} - icon: [entrance] - - tags: {entrance: "yes"} - icon: [entrance] - - tags: {entrance: exit} - icon: [exit] - - tags: {entrance: service} - icon: [door_with_keyhole] - - tags: {entrance: staircase} - icon: [staircase] - - tags: {door: "no"} - icon: [no_door] - - # Not important small objects - - - tags: {amenity: bench} - icon: [bench] - - tags: {amenity: bench, backrest: "yes"} - icon: [bench_backrest] - - tags: {amenity: bench, backrest: "no"} - icon: [bench_no_backrest] - - tags: {amenity: clock} - icon: [clock] - - tags: {amenity: fountain} - icon: [{shape: fountain, color: water_border_color}] - - tags: {amenity: waste_basket} - icon: [waste_basket] - - tags: {highway: street_lamp} - icon: [street_lamp] - - tags: {man_made: cross} - icon: [cross] - - tags: {man_made: flagpole} - icon: [flagpole] - - tags: {man_made: manhole} - icon: [circle_9] - - tags: {manhole: drain} - icon: [manhole_drain] - - tags: {man_made: pole} - icon: [pole] - - tags: {man_made: pole, highway: street_lamp} - icon: [pole_lamp] - - tags: {man_made: street_cabinet} - icon: [street_cabinet] - - tags: {man_made: surveillance} - icon: [cctv] - - tags: {man_made: ventilation_shaft} - icon: [ventilation] - - tags: {power: pole} - icon: [pole] - - tags: {advertising: billboard} - icon: [billboard] - - tags: {natural: rock} - icon: [stone] - - tags: {natural: stone} - icon: [stone] - - tags: {sloped_curb: "yes"} - icon: [lowered_kerb] - - tags: {kerb: lowered} - icon: [lowered_kerb] - # Trees - - tags: {natural: tree} - icon: [{shape: tree, color: tree_color}] - - tags: {leaf_type: broadleaved} - icon: [{shape: tree_with_leaf, color: tree_color}] - - tags: {leaf_type: needleleaved} - icon: [{shape: needleleaved_tree, color: tree_color}] - - tags: {leaf_type: palm} - icon: [{shape: palm, color: tree_color}] - - tags: {natural: tree, leaf_type: broadleaved} - icon: [{shape: tree_with_leaf, color: tree_color}] - - tags: {natural: tree, leaf_type: needleleaved} - icon: [{shape: needleleaved_tree, color: tree_color}] - - tags: {natural: tree, leaf_type: palm} - icon: [{shape: palm, color: tree_color}] - - tags: {natural: tree, type: conifer} - icon: [{shape: needleleaved_tree, color: tree_color}] - - tags: {leaf_cycle: deciduous} - set_main_color: decidious_color - - tags: {leaf_cycle: evergreen} - set_main_color: evergreen_color - - tags: {natural: tree, leaf_cycle: deciduous} - set_main_color: decidious_color - - tags: {natural: tree, leaf_cycle: evergreen} - set_main_color: evergreen_color - - tags: {natural: bush} - icon: [{shape: bush, color: tree_color}] - # Tree genus - - tags: {natural: tree, genus: Betula} - icon: [{shape: betula, color: tree_color}] - - tags: {natural: tree, "genus:en": Birch} - icon: [{shape: betula, color: tree_color}] - - tags: {natural: tree, "genus:ru": Берёза} - icon: [{shape: betula, color: tree_color}] - - - tags: {railway: buffer_stop} - icon: [buffer_stop] - - tags: {traffic_sign: city_limit} - icon: [city_limit_sign] - - tags: {traffic_sign: maxspeed, maxspeed: "30"} - icon: [ - circle_11, - {shape: digit_3, offset: [-2, 0], color: "#FFFFFF"}, - {shape: digit_0, offset: [2, 0], color: "#FFFFFF"}, - ] - - tags: {traffic_sign: maxspeed, maxspeed: "40"} - icon: [ - circle_11, - {shape: digit_4, offset: [-2, 0], color: "#FFFFFF"}, - {shape: digit_0, offset: [2, 0], color: "#FFFFFF"}, - ] - - tags: {traffic_sign: maxspeed, maxspeed: "50"} - icon: [ - circle_11, - {shape: digit_5, offset: [-2, 0], color: "#FFFFFF"}, - {shape: digit_0, offset: [2, 0], color: "#FFFFFF"}, - ] - - tags: {traffic_sign: maxspeed, maxspeed: "60"} - icon: [ - circle_11, - {shape: digit_6, offset: [-2, 0], color: "#FFFFFF"}, - {shape: digit_0, offset: [2, 0], color: "#FFFFFF"}, - ] - - tags: {traffic_sign: maxspeed, maxspeed: "40_mph"} - icon: [ - speed_limit_mph, - {shape: digit_4, offset: [-2, 2]}, - {shape: digit_0, offset: [2, 2]}, - ] - - tags: {traffic_sign: stop} - icon: [stop] - - tags: {highway: give_way} - icon: [triangle_down_hollow] - - tags: {noexit: "yes"} - icon: [noexit] - - tags: {barrier: block} - icon: [block] - - tags: {barrier: rock} - icon: [stone] - - tags: {barrier: bollard} - icon: [bollard] - - # Indoor - - - tags: {door: "yes"} - icon: [entrance] - - # Add and over - - - 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] - - tags: {amenity: "*", karaoke: "yes"} - add_icon: [microphone] - - tags: {building: "*", "roof:shape": onion} - add_icon: [onion_roof_shape] - - tags: {natural: tree, denotation: urban} - over_icon: [urban_tree_pot] - under_icon: [tree, tree_with_leaf, needleleaved_tree, betula, palm] - - tags: {natural: tree, denotation: avenue} - over_icon: [bottom_right_horizontal_line] - under_icon: [tree, tree_with_leaf, needleleaved_tree, betula, palm] - - - tags: {wheelchair: "yes"} - add_icon: [wheelchair] - - tags: {wheelchair: "no"} - add_icon: [no_wheelchair] - - tags: {foot: "yes"} - add_icon: [foot] - - tags: {foot: "no"} - add_icon: [no_foot] - - tags: {bicycle: "yes"} - add_icon: [bicycle] - - tags: {bicycle: "no"} - add_icon: [no_bicycle] - - tags: {internet_access: wlan, "internet_access:fee": "no"} - add_icon: [free_wlan] - - tags: {internet_access: wlan} - no_tags: {"internet_access:fee": "*"} - add_icon: [wlan] - - tags: {material: wood} - add_icon: [wood] - - tags: {access: private} - add_icon: [lock_with_keyhole] - - tags: {direction: clockwise} - add_icon: [clockwise] - - tags: {direction: contrclockwise} - add_icon: [contrclockwise] - - tags: {atm: "yes"} - add_icon: [atm] - - tags: {tactile_paving: "yes"} - add_icon: [tactile_paving] - - tags: {"payment:credit_cards": "yes"} - add_icon: [credit_card] - - - tags: {bus: "yes"} - add_icon: [bus] - - tags: {monorail: "yes"} - add_icon: [monorail] - - tags: {trolleybus: "yes"} - add_icon: [trolleybus] - - - tags: {recycling:glass_bottles: "yes"} - add_icon: [bottle] - - - tags: {crossing:island: "yes"} - add_icon: [rectangle_vertical_rounded] - - tags: {crossing:island: "no"} - add_icon: [rectangle_vertical_rounded_crossed] + - tags: {crossing:island: "yes"} + add_icon: [rectangle_vertical_rounded] + - tags: {crossing:island: "no"} + add_icon: [rectangle_vertical_rounded_crossed] ways: - tags: {indoor: area} diff --git a/test/test_direction.py b/test/test_direction.py index e9d07be..246ecf9 100644 --- a/test/test_direction.py +++ b/test/test_direction.py @@ -1,12 +1,13 @@ """ Test direction processing. - -Author: Sergey Vartanov (me@enzet.ru). """ import numpy as np from roentgen.direction import parse_vector +__author__ = "Sergey Vartanov" +__email__ = "me@enzet.ru" + def test_compass_points_1() -> None: """ Test north direction. """ diff --git a/test/test_icons.py b/test/test_icons.py index 142f095..d8fcab6 100644 --- a/test/test_icons.py +++ b/test/test_icons.py @@ -1,7 +1,5 @@ """ Test icon generation for nodes. - -Author: Sergey Vartanov (me@enzet.ru). """ from os import makedirs from pathlib import Path @@ -11,9 +9,12 @@ from roentgen.grid import draw_all_icons from roentgen.icon import ShapeExtractor from roentgen.scheme import Scheme -SCHEME: Scheme = Scheme("scheme/default.yml") +__author__ = "Sergey Vartanov" +__email__ = "me@enzet.ru" + +SCHEME: Scheme = Scheme(Path("scheme/default.yml")) ICON_EXTRACTOR: ShapeExtractor = ShapeExtractor( - "icons/icons.svg", Path("icons/config.json") + Path("icons/icons.svg"), Path("icons/config.json") ) diff --git a/test/test_label.py b/test/test_label.py index ff27064..b32bdf2 100644 --- a/test/test_label.py +++ b/test/test_label.py @@ -1,14 +1,16 @@ """ Test label generation for nodes. - -Author: Sergey Vartanov (me@enzet.ru). """ +from pathlib import Path from typing import List from roentgen.scheme import Scheme from roentgen.text import Label -SCHEME: Scheme = Scheme("scheme/default.yml") +__author__ = "Sergey Vartanov" +__email__ = "me@enzet.ru" + +SCHEME: Scheme = Scheme(Path("scheme/default.yml")) def construct_labels(tags) -> List[Label]: diff --git a/test/test_text.py b/test/test_text.py index d425cac..f152d09 100644 --- a/test/test_text.py +++ b/test/test_text.py @@ -1,10 +1,11 @@ """ Test text generation. - -Author: Sergey Vartanov (me@enzet.ru). """ from roentgen.text import format_voltage +__author__ = "Sergey Vartanov" +__email__ = "me@enzet.ru" + def test_voltage() -> None: """