Created
July 2, 2023 17:37
-
-
Save joaofig/cafc3f25948244f83206f6e21381c0ed to your computer and use it in GitHub Desktop.
Inserts the mapping between H3 tokens and map node coordinates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def insert_h3_nodes(h3_nodes: list[tuple[int,tuple[float,float]]]): | |
| db = TrajDb() | |
| sql = "insert or ignore into h3_node (h3, lat, lon) values (?, ?, ?)" | |
| db.execute_sql(sql, [(n[0], n[1][1], n[1][0]) for n in h3_nodes], many=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment