mirror of
https://github.com/enzet/map-machine.git
synced 2025-05-21 04:56:24 +02:00
Add area detection.
Detect whether way is an area.
This commit is contained in:
parent
8a21e729ad
commit
ed3d555bbc
3 changed files with 79 additions and 11 deletions
|
@ -337,11 +337,14 @@ class Constructor:
|
|||
else:
|
||||
self.figures.append(
|
||||
Figure(line.tags, inners, outers, line_style))
|
||||
icon_set: IconSet = self.scheme.get_icon(
|
||||
self.icon_extractor, line.tags, for_="line")
|
||||
self.nodes.append(Point(
|
||||
icon_set, line.tags, center_point, center_coordinates,
|
||||
is_for_node=False))
|
||||
if (line.get_tag("area") == "yes" or
|
||||
is_cycle(outers[0]) and line.get_tag("area") != "no" and
|
||||
self.scheme.is_area(line.tags)):
|
||||
icon_set: IconSet = self.scheme.get_icon(
|
||||
self.icon_extractor, line.tags, for_="line")
|
||||
self.nodes.append(Point(
|
||||
icon_set, line.tags, center_point, center_coordinates,
|
||||
is_for_node=False))
|
||||
|
||||
if not line_styles:
|
||||
if DEBUG:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue