Start region work

This commit is contained in:
WQY\qiong
2023-03-31 09:55:06 +08:00
parent 55e52ff4fc
commit e0b6ce7559
8 changed files with 89 additions and 5 deletions

View File

@@ -24,7 +24,7 @@ def get_node_coord(name: str, id: str) -> dict[str, float]:
def inp_in_coord(line: str) -> str:
tokens = line.split()
node = tokens[0]
coord = f"'({tokens[1]}, {tokens[2]})'"
coord = f"st_geomfromtext('point({tokens[1]} {tokens[2]})')"
return f"insert into coordinates (node, coord) values ('{node}', {coord});"