diff --git a/roentgen/constructor.py b/roentgen/constructor.py
index 65b51da..542eb8d 100644
--- a/roentgen/constructor.py
+++ b/roentgen/constructor.py
@@ -219,6 +219,8 @@ class Constructor:
nodes = way.nodes
if self.mode == "user-coloring":
+ if not way:
+ return
user_color = get_user_color(way.user, self.seed)
self.ways.append(
Way("way", nodes, path,
@@ -629,8 +631,10 @@ class Constructor:
if self.mode == "user-coloring":
fill = get_user_color(node.user, self.seed)
+ shapes = ["small"]
if self.mode == "time":
fill = get_time_color(node.timestamp)
+ shapes = ["small"]
# for k in tags:
# if k in processed or self.no_draw(k):
@@ -664,4 +668,4 @@ class Constructor:
# print("Tags processed: " + str(processed_tags) + ", tags skipped: " +
# str(skipped_tags) + " (" +
# str(processed_tags / float(
- # processed_tags + skipped_tags) * 100) + " %).")
\ No newline at end of file
+ # processed_tags + skipped_tags) * 100) + " %).")
diff --git a/roentgen/extract_icon.py b/roentgen/extract_icon.py
index 14773dd..4513f0c 100644
--- a/roentgen/extract_icon.py
+++ b/roentgen/extract_icon.py
@@ -64,6 +64,8 @@ class IconExtractor:
if id_ in self.icons:
return self.icons[id_]
else:
- if id_ != "no":
- ui.error(f"no such icon ID {id_}")
- return "M 4,4 L 4,10 10,10 10,4 z", 0, 0
+ if id_ == "no":
+ return "M 4,4 L 4,10 10,10 10,4 z", 0, 0
+ if id_ == "small":
+ return "M 6,6 L 6,8 8,8 8,6 z", 0, 0
+ ui.error(f"no such icon ID {id_}")
diff --git a/roentgen/mapper.py b/roentgen/mapper.py
index 48017c0..a8f6ca2 100644
--- a/roentgen/mapper.py
+++ b/roentgen/mapper.py
@@ -288,11 +288,11 @@ class Painter:
if way.kind == "way":
if way.nodes:
path = get_path(way.nodes, [0, 0], self.map_, self.flinger)
- self.output_file.write(f'\n')
+ self.output_file.write(
+ f'\n')
else:
- self.output_file.write('\n')
+ self.output_file.write(
+ f'\n')
# Building shade
@@ -360,20 +360,24 @@ class Painter:
node.tags["natural"] == "tree" and \
"diameter_crown" in node.tags:
continue
- self.draw_shapes(node.shapes, points, node.x, node.y,
- node.color, node.tags, node.processed)
+ self.draw_shapes(
+ node.shapes, points, node.x, node.y, node.color, node.tags,
+ node.processed)
for node in nodes:
- self.draw_texts(node.shapes, points, node.x, node.y,
- node.color, node.tags, node.processed)
+ if self.mode not in ["time", "user-coloring"]:
+ self.draw_texts(
+ node.shapes, points, node.x, node.y, node.color,
+ node.tags, node.processed)
def draw_point_shape(self, name, x, y, fill, tags=None):
if not isinstance(name, list):
name = [name]
- for one_name in name:
- shape, xx, yy = self.icons.get_path(one_name)
- self.draw_point_outline(
- shape, x, y, fill, mode=self.mode, size=16, xx=xx, yy=yy)
+ if self.mode not in ["time", "user-coloring"]:
+ for one_name in name:
+ shape, xx, yy = self.icons.get_path(one_name)
+ self.draw_point_outline(
+ shape, x, y, fill, mode=self.mode, size=16, xx=xx, yy=yy)
for one_name in name:
shape, xx, yy = self.icons.get_path(one_name)
self.draw_point(shape, x, y, fill, size=16, xx=xx, yy=yy, tags=tags)