Fixed node properties

This commit is contained in:
DingZQ
2025-03-29 17:24:49 +08:00
parent f795ca29f1
commit 90eb873ecf
4 changed files with 20 additions and 14 deletions

View File

@@ -33,11 +33,13 @@ def get_all_junctions(name: str) -> list[dict[str, Any]]:
result = []
for row in rows:
d = {}
d['id'] = str(row['id'])
d['x'] = float(row['x'])
d['y'] = float(row['y'])
id = str(row['id'])
xy = get_node_coord(name, id)
d['id'] = id
d['x'] = float(xy['x'])
d['y'] = float(xy['y'])
d['elevation'] = float(row['elevation'])
d['links'] = get_node_links(name, row['id'])
d['links'] = get_node_links(name, id)
result.append(d)
return result