mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-29 08:56:27 +02:00
Support embankment=yes tag.
This commit is contained in:
parent
e9b1b499bf
commit
9c3cda3524
2 changed files with 6 additions and 3 deletions
|
@ -257,9 +257,7 @@ def ui(arguments: argparse.Namespace) -> None:
|
||||||
)
|
)
|
||||||
size: np.ndarray = flinger.size
|
size: np.ndarray = flinger.size
|
||||||
|
|
||||||
svg: svgwrite.Drawing = svgwrite.Drawing(
|
svg: svgwrite.Drawing = svgwrite.Drawing(arguments.output_file_name, size)
|
||||||
arguments.output_file_name, size=size
|
|
||||||
)
|
|
||||||
icon_extractor: ShapeExtractor = ShapeExtractor(
|
icon_extractor: ShapeExtractor = ShapeExtractor(
|
||||||
workspace.ICONS_PATH, workspace.ICONS_CONFIG_PATH
|
workspace.ICONS_PATH, workspace.ICONS_CONFIG_PATH
|
||||||
)
|
)
|
||||||
|
|
|
@ -431,6 +431,9 @@ class Road(Tagged):
|
||||||
width = self.matcher.default_width
|
width = self.matcher.default_width
|
||||||
if extra_width and self.tags.get("bridge") == "yes":
|
if extra_width and self.tags.get("bridge") == "yes":
|
||||||
color = Color("#666666")
|
color = Color("#666666")
|
||||||
|
if extra_width and self.tags.get("embankment") == "yes":
|
||||||
|
color = Color("#666666")
|
||||||
|
width += 4
|
||||||
scale: float = flinger.get_scale(self.nodes[0].coordinates)
|
scale: float = flinger.get_scale(self.nodes[0].coordinates)
|
||||||
path_commands: str = self.line.get_path()
|
path_commands: str = self.line.get_path()
|
||||||
path: Path = Path(d=path_commands)
|
path: Path = Path(d=path_commands)
|
||||||
|
@ -441,6 +444,8 @@ class Road(Tagged):
|
||||||
"stroke-linejoin": "round",
|
"stroke-linejoin": "round",
|
||||||
"stroke-width": scale * width + extra_width,
|
"stroke-width": scale * width + extra_width,
|
||||||
}
|
}
|
||||||
|
if extra_width and self.tags.get("embankment") == "yes":
|
||||||
|
style["stroke-dasharray"] = "1,3"
|
||||||
path.update(style)
|
path.update(style)
|
||||||
svg.add(path)
|
svg.add(path)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue