mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-22 21:46:24 +02:00
Fix ignored tags processing.
This commit is contained in:
parent
9af7d5f2d9
commit
f5fa2049a6
2 changed files with 17 additions and 2 deletions
|
@ -11,9 +11,8 @@ from colour import Color
|
||||||
|
|
||||||
from roentgen import ui
|
from roentgen import ui
|
||||||
from roentgen.color import get_gradient_color
|
from roentgen.color import get_gradient_color
|
||||||
from roentgen.figure import Building, StyledFigure, Road
|
from roentgen.figure import Building, Road, StyledFigure
|
||||||
from roentgen.flinger import Flinger
|
from roentgen.flinger import Flinger
|
||||||
|
|
||||||
# fmt: off
|
# fmt: off
|
||||||
from roentgen.icon import (
|
from roentgen.icon import (
|
||||||
DEFAULT_SMALL_SHAPE_ID, Icon, IconSet, ShapeExtractor, ShapeSpecification
|
DEFAULT_SMALL_SHAPE_ID, Icon, IconSet, ShapeExtractor, ShapeSpecification
|
||||||
|
@ -24,6 +23,7 @@ from roentgen.osm_reader import (
|
||||||
from roentgen.point import Point
|
from roentgen.point import Point
|
||||||
from roentgen.scheme import DEFAULT_COLOR, LineStyle, Scheme
|
from roentgen.scheme import DEFAULT_COLOR, LineStyle, Scheme
|
||||||
from roentgen.util import MinMax
|
from roentgen.util import MinMax
|
||||||
|
|
||||||
# fmt: on
|
# fmt: on
|
||||||
|
|
||||||
__author__ = "Sergey Vartanov"
|
__author__ = "Sergey Vartanov"
|
||||||
|
@ -375,6 +375,8 @@ class Constructor:
|
||||||
self.icon_extractor, tags, processed
|
self.icon_extractor, tags, processed
|
||||||
)
|
)
|
||||||
labels = self.scheme.construct_text(tags, "all", processed)
|
labels = self.scheme.construct_text(tags, "all", processed)
|
||||||
|
self.scheme.process_ignored(tags, processed)
|
||||||
|
|
||||||
point: Point = Point(
|
point: Point = Point(
|
||||||
icon_set, labels, tags, processed, flung, node.coordinates,
|
icon_set, labels, tags, processed, flung, node.coordinates,
|
||||||
priority=priority, draw_outline=draw_outline
|
priority=priority, draw_outline=draw_outline
|
||||||
|
|
|
@ -477,3 +477,16 @@ class Scheme:
|
||||||
if matcher.is_matched(tags):
|
if matcher.is_matched(tags):
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def process_ignored(
|
||||||
|
self, tags: Dict[str, str], processed: Set[str]
|
||||||
|
) -> None:
|
||||||
|
"""
|
||||||
|
Mark all ignored tag as processed.
|
||||||
|
|
||||||
|
:param tags: input tag dictionary
|
||||||
|
:param processed: processed set
|
||||||
|
"""
|
||||||
|
for tag in tags:
|
||||||
|
if self.is_no_drawable(tag):
|
||||||
|
processed.add(tag)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue