From 32bad69fc5a805b7cc0b421c33cb19b829170962 Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Sat, 23 Apr 2022 23:33:23 +0300 Subject: [PATCH 01/14] Issues #126: fix waterways priority. --- map_machine/scheme/default.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/map_machine/scheme/default.yml b/map_machine/scheme/default.yml index 84ff89b..f286d67 100644 --- a/map_machine/scheme/default.yml +++ b/map_machine/scheme/default.yml @@ -2487,24 +2487,29 @@ ways: style: stroke: water_color stroke-width: 2.5 + priority: 22.0 - tags: {waterway: canal} style: stroke: water_color stroke-width: 2.0 + priority: 22.0 - tags: {waterway: stream} style: stroke: water_color stroke-width: 1.5 + priority: 22.0 - tags: {waterway: riverbank} style: fill: water_color stroke: water_border_color stroke-width: 1.0 + priority: 22.0 - tags: {waterway: ditch} style: fill: water_color stroke: water_color stroke-width: 2.0 + priority: 22.0 - tags: {railway: subway} style: From 5a934e2f37c0a4df7ae5bc128d111876a7d2bc28 Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Wed, 27 Apr 2022 00:11:10 +0300 Subject: [PATCH 02/14] Issues #126: refactor figures sorting. --- map_machine/constructor.py | 4 ++++ map_machine/mapper.py | 10 +++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/map_machine/constructor.py b/map_machine/constructor.py index 34ad72f..bf1c50c 100644 --- a/map_machine/constructor.py +++ b/map_machine/constructor.py @@ -529,6 +529,10 @@ class Constructor: ) self.points.append(point) + def get_sorted_figures(self) -> list[StyledFigure]: + """Get all figures sorted by priority.""" + return sorted(self.figures, key=lambda x: x.line_style.priority) + def check_level_number(tags: Tags, level: float) -> bool: """Check if element described by tags is no the specified level.""" diff --git a/map_machine/mapper.py b/map_machine/mapper.py index 353ac03..f142002 100644 --- a/map_machine/mapper.py +++ b/map_machine/mapper.py @@ -18,7 +18,6 @@ from map_machine.constructor import Constructor from map_machine.drawing import draw_text from map_machine.feature.building import Building, draw_walls, BUILDING_SCALE from map_machine.feature.road import Intersection, Road, RoadPart -from map_machine.figure import StyledFigure from map_machine.geometry.boundary_box import BoundaryBox from map_machine.geometry.flinger import Flinger from map_machine.geometry.vector import Segment @@ -59,16 +58,13 @@ class Map: self.svg.add( Rect((0.0, 0.0), self.flinger.size, fill=self.background_color) ) - ways: list[StyledFigure] = sorted( - constructor.figures, key=lambda x: x.line_style.priority - ) logging.info("Drawing ways...") - for way in ways: - path_commands: str = way.get_path(self.flinger) + for figure in constructor.get_sorted_figures(): + path_commands: str = figure.get_path(self.flinger) if path_commands: path: SVGPath = SVGPath(d=path_commands) - path.update(way.line_style.style) + path.update(figure.line_style.style) self.svg.add(path) constructor.roads.draw(self.svg, self.flinger) From 5fc9ab0b5ea22336e7af3e9bf3fab1e9b8fc249b Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Wed, 27 Apr 2022 00:14:29 +0300 Subject: [PATCH 03/14] Issues #126: add test. --- tests/test_ways.py | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tests/test_ways.py diff --git a/tests/test_ways.py b/tests/test_ways.py new file mode 100644 index 0000000..68a81f9 --- /dev/null +++ b/tests/test_ways.py @@ -0,0 +1,46 @@ +import numpy as np + +from map_machine.figure import Figure +from map_machine.geometry.boundary_box import BoundaryBox +from map_machine.geometry.flinger import Flinger +from map_machine.map_configuration import MapConfiguration +from map_machine.constructor import Constructor +from map_machine.osm.osm_reader import OSMData, OSMWay, OSMNode +from tests import SCHEME, SHAPE_EXTRACTOR + + +def get_constructor(osm_data: OSMData) -> Constructor: + flinger: Flinger = Flinger( + BoundaryBox(-0.01, -0.01, 0.01, 0.01), 18, osm_data.equator_length + ) + constructor: Constructor = Constructor( + osm_data, flinger, SCHEME, SHAPE_EXTRACTOR, MapConfiguration() + ) + constructor.construct_ways() + return constructor + + +def test_river_and_wood() -> None: + """ + Check that river is above the wood. + + See https://github.com/enzet/map-machine/issues/126 + """ + nodes_1: list[OSMNode] = [ + OSMNode({}, 1, np.array((-0.01, -0.01))), + OSMNode({}, 2, np.array((0.01, 0.01))), + ] + nodes_2: list[OSMNode] = [ + OSMNode({}, 3, np.array((-0.01, -0.01))), + OSMNode({}, 4, np.array((0.01, 0.01))), + ] + + osm_data: OSMData = OSMData() + osm_data.add_way(OSMWay({"natural": "wood"}, 1, nodes_1)) + osm_data.add_way(OSMWay({"waterway": "river"}, 2, nodes_2)) + + figures: list[Figure] = get_constructor(osm_data).get_sorted_figures() + + assert len(figures) == 2 + assert figures[0].tags["natural"] == "wood" + assert figures[1].tags["waterway"] == "river" From 701263f06594d1e2aebb8cbf335b47e9f9f724f7 Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Wed, 27 Apr 2022 00:15:06 +0300 Subject: [PATCH 04/14] Add test for empty ways. --- tests/test_ways.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_ways.py b/tests/test_ways.py index 68a81f9..3708c24 100644 --- a/tests/test_ways.py +++ b/tests/test_ways.py @@ -44,3 +44,12 @@ def test_river_and_wood() -> None: assert len(figures) == 2 assert figures[0].tags["natural"] == "wood" assert figures[1].tags["waterway"] == "river" + + +def test_empty_ways() -> None: + """Ways without nodes.""" + osm_data: OSMData = OSMData() + osm_data.add_way(OSMWay({"natural": "wood"}, 1)) + osm_data.add_way(OSMWay({"waterway": "river"}, 2)) + + assert not get_constructor(osm_data).get_sorted_figures() From fa27e58d717235767bc582d2b9af42f042045e29 Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Wed, 27 Apr 2022 00:48:57 +0300 Subject: [PATCH 05/14] Issue #125: add style for railway=construction. --- map_machine/scheme/default.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/map_machine/scheme/default.yml b/map_machine/scheme/default.yml index f286d67..13a7f36 100644 --- a/map_machine/scheme/default.yml +++ b/map_machine/scheme/default.yml @@ -2547,6 +2547,13 @@ ways: stroke-width: 3.0 stroke: "#BBBBBB" priority: 42.0 + - tags: {railway: construction} + style: + stroke-width: 3.0 + stroke: "#000000" + stroke-dasharray: 3,3 + opacity: 0.3 + priority: 42.0 - tags: {railway: rail} style: From d9de7bf96b7cac9bcc1dea3ea2090f2af23f6314 Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Wed, 27 Apr 2022 01:06:12 +0300 Subject: [PATCH 06/14] Issue #129: add style for landuse=village_green. --- map_machine/scheme/default.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/map_machine/scheme/default.yml b/map_machine/scheme/default.yml index 13a7f36..d7edb6d 100644 --- a/map_machine/scheme/default.yml +++ b/map_machine/scheme/default.yml @@ -83,6 +83,7 @@ colors: track_color: "#A88A64" trunk_color: "#97612b" tree_color: "#98AC64" + village_green_color: "#DDEEBB" wall_bottom_1_color: "#AAAAAA" wall_bottom_2_color: "#C3C3C3" wall_color: "#E8E8E8" @@ -2409,6 +2410,10 @@ ways: style: fill: parking_color priority: 21.0 + - tags: {landuse: village_green} + style: + fill: village_green_color + priority: 20.0 - tags: {landuse: grass} style: fill: grass_color From b44fe64f8e10ee249bfd92f86536da6281f70b19 Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Wed, 27 Apr 2022 02:01:31 +0300 Subject: [PATCH 07/14] Issue #129: add style for recreation_ground. Tag is leisure=recreation_ground. --- map_machine/scheme/default.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/map_machine/scheme/default.yml b/map_machine/scheme/default.yml index d7edb6d..0ac2889 100644 --- a/map_machine/scheme/default.yml +++ b/map_machine/scheme/default.yml @@ -2618,6 +2618,10 @@ ways: style: fill: grass_color opacity: 0.5 + - tags: {leisure: recreation_ground} + style: + fill: grass_color + opacity: 0.5 - tags: {leisure: stadium} style: fill: grass_color From 7105e4ce88f28b64c347eb712bd5e7868404b902 Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Wed, 27 Apr 2022 02:03:15 +0300 Subject: [PATCH 08/14] Issue #129: add style for greenhouse_horticulture. Tag is landuse=greenhouse_horticulture. --- map_machine/scheme/default.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/map_machine/scheme/default.yml b/map_machine/scheme/default.yml index 0ac2889..b747e9a 100644 --- a/map_machine/scheme/default.yml +++ b/map_machine/scheme/default.yml @@ -2390,6 +2390,9 @@ ways: - tags: {landuse: farmland} style: {fill: farmland_color, stroke: farmland_border_color} priority: 20.0 + - tags: {landuse: greenhouse_horticulture} + style: {fill: farmland_color, stroke: farmland_border_color} + priority: 20.0 - tags: {landuse: farmyard} style: {fill: farmland_color, stroke: farmland_border_color} # FIXME priority: 20.0 From e8604ec4080fa395a37d2764f0d32d526d305ed3 Mon Sep 17 00:00:00 2001 From: Andrew Klofas Date: Sun, 1 May 2022 13:22:05 -0700 Subject: [PATCH 09/14] PR #131: allow duplicate ids in OSM data. * Allow duplicate id's in `OSMData` class as long as data identical. Allows creating OSMData classes from composite datasets with overlapping but identical data. * Fixed formatting issues. --- map_machine/osm/osm_reader.py | 39 ++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/map_machine/osm/osm_reader.py b/map_machine/osm/osm_reader.py index d923409..af06ae4 100644 --- a/map_machine/osm/osm_reader.py +++ b/map_machine/osm/osm_reader.py @@ -122,7 +122,7 @@ class Tagged: return is_well_formed -@dataclass +@dataclass(eq=False) class OSMNode(Tagged): """ OpenStreetMap node. @@ -182,6 +182,19 @@ class OSMNode(Tagged): def __hash__(self) -> int: return self.id_ + def __eq__(self, other) -> bool: + if not isinstance(other, OSMNode): + return False + return ( + self.id_ == other.id_ + and np.array_equal(self.coordinates, other.coordinates) + and self.visible == other.visible + and self.changeset == other.changeset + and self.timestamp == other.timestamp + and self.user == other.user + and self.uid == other.uid + ) + @dataclass class OSMWay(Tagged): @@ -343,9 +356,11 @@ class OSMData: def add_node(self, node: OSMNode) -> None: """Add node and update map parameters.""" if node.id_ in self.nodes: - raise NotWellFormedOSMDataException( - f"Node with duplicate id {node.id_}." - ) + if node != self.nodes[node.id_]: + raise NotWellFormedOSMDataException( + f"Node with duplicate id {node.id_}." + ) + return self.nodes[node.id_] = node if node.user: self.authors.add(node.user) @@ -360,9 +375,11 @@ class OSMData: def add_way(self, way: OSMWay) -> None: """Add way and update map parameters.""" if way.id_ in self.ways: - raise NotWellFormedOSMDataException( - f"Way with duplicate id {way.id_}." - ) + if way != self.ways[way.id_]: + raise NotWellFormedOSMDataException( + f"Way with duplicate id {way.id_}." + ) + return self.ways[way.id_] = way if way.user: self.authors.add(way.user) @@ -374,9 +391,11 @@ class OSMData: def add_relation(self, relation: OSMRelation) -> None: """Add relation and update map parameters.""" if relation.id_ in self.relations: - raise NotWellFormedOSMDataException( - f"Relation with duplicate id {relation.id_}." - ) + if relation != self.relations[relation.id_]: + raise NotWellFormedOSMDataException( + f"Relation with duplicate id {relation.id_}." + ) + return self.relations[relation.id_] = relation def parse_overpass(self, file_name: Path) -> None: From 94e5aa772550743861aad03b73934ef1903e1110 Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Sun, 1 May 2022 23:29:54 +0300 Subject: [PATCH 10/14] Move contributing file. --- .github/CONTRIBUTING.md => CONTRIBUTING.md | 0 map_machine/doc/moire_manager.py | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename .github/CONTRIBUTING.md => CONTRIBUTING.md (100%) diff --git a/.github/CONTRIBUTING.md b/CONTRIBUTING.md similarity index 100% rename from .github/CONTRIBUTING.md rename to CONTRIBUTING.md diff --git a/map_machine/doc/moire_manager.py b/map_machine/doc/moire_manager.py index e5d4f60..c2213dc 100644 --- a/map_machine/doc/moire_manager.py +++ b/map_machine/doc/moire_manager.py @@ -301,5 +301,5 @@ def convert(input_path: Path, output_path: Path) -> None: if __name__ == "__main__": - convert(Path("doc/readme.moi"), Path("README.md")) - convert(Path("doc/contributing.moi"), Path(".github/CONTRIBUTING.md")) + for id_ in "readme", "contributing": + convert(Path("doc") / f"{id_}.moi", Path(f"{id_.upper()}.md")) From 5f5d8818a3bd43dd1809b4bab84d92efcd8d2b78 Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Mon, 2 May 2022 00:06:08 +0300 Subject: [PATCH 11/14] Add Git hooks warning. --- CONTRIBUTING.md | 74 +++++++++++++++++++++++--------------------- doc/contributing.moi | 40 ++++++++++++------------ 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6651fc9..df50ee3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,6 +3,44 @@ Contributing Thank you for your interest in the Map Machine project. Since the primary goal of the project is to cover as many tags as possible, the project is crucially depend on contributions as OpenStreetMap itself. +Modify the code +--------------- + +❗ **IMPORTANT** ❗ Before committing please enable Git hooks: + +```shell +git config --local core.hooksPath data/githooks +``` + +This will allow you to automatically check your commit message and code before committing and pushing changes. This will crucially speed up pull request merging and make Git history neat and uniform. + +### First configure your workspace ### + +Make sure you have Python 3.9 development tools. E.g., for Ubuntu, run `apt install python3.9-dev python3.9-venv`. + +Activate virtual environment. E.g. for fish shell, run `source venv/bin/activate.fish`. + +Install the project in editable mode: + +```shell +pip install -e . +``` + +Install formatter, linter and test system: `pip install black flake8 mypy pytest pytest-cov`. + +If you are using PyCharm, you may want to set up user dictionary as well: + + + * `cp data/dictionary.xml .idea/dictionaries/.xml` + * in `.idea/dictionaries/.xml` change `%USERNAME%` to your username, + * restart PyCharm if it is launched. + +### Code style ### + +We use [Black](http://github.com/psf/black) code formatter with maximum 80 characters line length for all Python files within the project. Reformat a file is as simple as `black -l 80 `. Reformat everything with `black -l 80 map_machine tests`. + +If you create new Python file, make sure you add `__author__ = " "` and `__email__ = ""` string variables. + Suggest a tag to support ------------------------ @@ -18,39 +56,3 @@ Fix a typo in documentation This action is not that easy as it supposed to be. We use [Moire](http://github.com/enzet/Moire) markup and converter to automatically generate documentation for GitHub, website, and [OpenStreetMap wiki](http://wiki.openstreetmap.org/). That's why editing Markdown files is not allowed. To fix a typo, open corresponding Moire file in `doc` directory (e.g. `doc/readme.moi` for `README.md`), modify it, and run `python map_machine/moire_manager.py`. -Modify the code ---------------- - -### First configure your workspace ### - -Make sure you have Python 3.9 development tools. E.g., for Ubuntu, run `apt install python3.9-dev python3.9-venv`. - -Activate virtual environment. E.g. for fish shell, run `source venv/bin/activate.fish`. - -Install the project in editable mode: - -```shell -pip install -e . -``` - -Install formatter, linter and test system: `pip install black flake8 mypy pytest pytest-cov`. - -Be sure to enable Git hooks: - -```shell -git config --local core.hooksPath data/githooks -``` - -If you are using PyCharm, you may want to set up user dictionary as well: - - - * `cp data/dictionary.xml .idea/dictionaries/.xml` - * in `.idea/dictionaries/.xml` change `%USERNAME%` to your username, - * restart PyCharm if it is launched. - -### Code style ### - -We use [Black](http://github.com/psf/black) code formatter with maximum 80 characters line length for all Python files within the project. Reformat a file is as simple as `black -l 80 `. Reformat everything with `black -l 80 map_machine tests`. - -If you create new Python file, make sure you add `__author__ = " "` and `__email__ = ""` string variables. - diff --git a/doc/contributing.moi b/doc/contributing.moi index 62951bd..22dc59e 100644 --- a/doc/contributing.moi +++ b/doc/contributing.moi @@ -2,25 +2,15 @@ Thank you for your interest in the Map Machine project. Since the primary goal of the project is to cover as many tags as possible, the project is crucially depend on contributions as OpenStreetMap itself. -\2 {Suggest a tag to support} {} - -Please, create an issue describing how you would like the feature to be visualized. - -/* -\2 {Add an icon} {} -*/ - -\2 {Report a bug} {} - -Please, create an issue describing the current behavior, expected behavior, and environment (most importantly, the OS version and Python version if it was not the recommended one). - -\2 {Fix a typo in documentation} {} - -This action is not that easy as it supposed to be. We use \ref {http://github.com/enzet/Moire} {Moire} markup and converter to automatically generate documentation for GitHub, website, and \ref {http://wiki.openstreetmap.org/} {OpenStreetMap wiki}. That's why editing Markdown files is not allowed. To fix a typo, open corresponding Moire file in \m {doc} directory (e.g. \m {doc/readme.moi} for \m {README.md}), modify it, and run \m {python map_machine/moire_manager.py}. - \2 {Modify the code} {} -\3 {First configure your workspace} +❗ \b {IMPORTANT} ❗ Before committing please enable Git hooks: + +\code {git config --local core.hooksPath data/githooks} {shell} + +This will allow you to automatically check your commit message and code before committing and pushing changes. This will crucially speed up pull request merging and make Git history neat and uniform. + +\3 {First configure your workspace} {} Make sure you have Python 3.9 development tools. E.g., for Ubuntu, run \m {apt install python3.9-dev python3.9-venv}. @@ -32,10 +22,6 @@ Install the project in editable mode: Install formatter, linter and test system\: \m {pip install black flake8 mypy pytest pytest-cov}. -Be sure to enable Git hooks: - -\code {git config --local core.hooksPath data/githooks} {shell} - If you are using PyCharm, you may want to set up user dictionary as well: \list @@ -48,3 +34,15 @@ If you are using PyCharm, you may want to set up user dictionary as well: We use \ref {http://github.com/psf/black} {Black} code formatter with maximum 80 characters line length for all Python files within the project. Reformat a file is as simple as \m {black -l 80 \formal {file name}}. Reformat everything with \m {black -l 80 map_machine tests}. If you create new Python file, make sure you add \m {__author__ = "\formal {first name} \formal {second name}"} and \m {__email__ = "\formal {author e-mail}"} string variables. + +\2 {Suggest a tag to support} {} + +Please, create an issue describing how you would like the feature to be visualized. + +\2 {Report a bug} {} + +Please, create an issue describing the current behavior, expected behavior, and environment (most importantly, the OS version and Python version if it was not the recommended one). + +\2 {Fix a typo in documentation} {} + +This action is not that easy as it supposed to be. We use \ref {http://github.com/enzet/Moire} {Moire} markup and converter to automatically generate documentation for GitHub, website, and \ref {http://wiki.openstreetmap.org/} {OpenStreetMap wiki}. That's why editing Markdown files is not allowed. To fix a typo, open corresponding Moire file in \m {doc} directory (e.g. \m {doc/readme.moi} for \m {README.md}), modify it, and run \m {python map_machine/moire_manager.py}. From e5a7722fd47cc260b30208729ea4d1977839aa0b Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Wed, 11 May 2022 23:55:50 +0300 Subject: [PATCH 12/14] Refactor element drawing. --- map_machine/element/__init__.py | 0 {tests => map_machine/element}/test_elements.py | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 map_machine/element/__init__.py rename {tests => map_machine/element}/test_elements.py (100%) diff --git a/map_machine/element/__init__.py b/map_machine/element/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_elements.py b/map_machine/element/test_elements.py similarity index 100% rename from tests/test_elements.py rename to map_machine/element/test_elements.py From 51ab8ade38bcb0e86aafbc4ba06331e24ca35ea0 Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Sun, 15 May 2022 19:02:55 +0300 Subject: [PATCH 13/14] Add commit style to documentation. --- CONTRIBUTING.md | 6 ++++++ doc/contributing.moi | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index df50ee3..76b3ab7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -41,6 +41,12 @@ We use [Black](http://github.com/psf/black) code formatter with maximum 80 chara If you create new Python file, make sure you add `__author__ = " "` and `__email__ = ""` string variables. +### Commit message format ### + +The project uses commit messages that starts with a verb in infinitive form with first letter in uppercase, ends with a dot, and is not longer than 50 characters. E.g. `Add new icon.` or `Fix labels.` + +If some issues or pull requests are referenced, commit message should starts with prefix such as `PR #123: `, `Issue #42: `, or `Fix #13: ` with the next letter in lowercase. E.g. `PR #123: refactor elements.` or `Issue #42: add icon for natural=tree.` + Suggest a tag to support ------------------------ diff --git a/doc/contributing.moi b/doc/contributing.moi index 22dc59e..79b97f7 100644 --- a/doc/contributing.moi +++ b/doc/contributing.moi @@ -35,6 +35,12 @@ We use \ref {http://github.com/psf/black} {Black} code formatter with maximum 80 If you create new Python file, make sure you add \m {__author__ = "\formal {first name} \formal {second name}"} and \m {__email__ = "\formal {author e-mail}"} string variables. +\3 {Commit message format} {} + +The project uses commit messages that starts with a verb in infinitive form with first letter in uppercase, ends with a dot, and is not longer than 50 characters. E.g. \m {Add new icon.} or \m {Fix labels.} + +If some issues or pull requests are referenced, commit message should starts with prefix such as \m {PR #123: }, \m {Issue #42: }, or \m {Fix #13: } with the next letter in lowercase. E.g. \m {PR #123: refactor elements.} or \m {Issue #42: add icon for natural=tree.} + \2 {Suggest a tag to support} {} Please, create an issue describing how you would like the feature to be visualized. From fb673798bc6da4808b4276986fedc41c75766aa2 Mon Sep 17 00:00:00 2001 From: Sergey Vartanov Date: Sun, 15 May 2022 19:08:38 +0300 Subject: [PATCH 14/14] Fix import. --- map_machine/{ => element}/element.py | 0 map_machine/main.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename map_machine/{ => element}/element.py (100%) diff --git a/map_machine/element.py b/map_machine/element/element.py similarity index 100% rename from map_machine/element.py rename to map_machine/element/element.py diff --git a/map_machine/main.py b/map_machine/main.py index 178af72..b250ac9 100644 --- a/map_machine/main.py +++ b/map_machine/main.py @@ -47,7 +47,7 @@ def main() -> None: mapcss.generate_mapcss(arguments) elif arguments.command == "element": - from map_machine.element import draw_element + from map_machine.element.element import draw_element draw_element(arguments)