Issue #84: add primitive road connections.

This commit is contained in:
Sergey Vartanov 2021-09-18 20:25:51 +03:00
parent b46e65f2ec
commit aa82353f00
6 changed files with 258 additions and 150 deletions

View file

@ -151,8 +151,8 @@ class OSMNode(Tagged):
:param structure: input structure
"""
return cls(
structure["id"],
structure["tags"] if "tags" in structure else {},
structure["id"],
coordinates=np.array((structure["lat"], structure["lon"])),
)
@ -209,7 +209,7 @@ class OSMWay(Tagged):
:param nodes: node structure
"""
return cls(
structure["tags"],
structure["tags"] if "tags" in structure else {},
structure["id"],
[nodes[x] for x in structure["nodes"]],
)