diff options
| author | Gustav Sörnäs <gusso230@student.liu.se> | 2020-11-05 16:42:34 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gusso230@student.liu.se> | 2020-11-05 16:42:34 +0100 |
| commit | 5bd68cac4b2aa953bcc63e8e903ed8c5f2aec5c2 (patch) | |
| tree | 0dc363b1973ee4b2c483ab70091afc6da0009a7a /store.py | |
| parent | 2eef624ac866070dbfec8a88e4b76cba4a4593d8 (diff) | |
| download | tdde25-5bd68cac4b2aa953bcc63e8e903ed8c5f2aec5c2.tar.gz | |
remove nodes without neighbours
Diffstat (limited to 'store.py')
| -rw-r--r-- | store.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -45,6 +45,11 @@ def extract_osm_nodes(f_name): add_neighbours(nodes) + # remove nodes without neighbours + for node_id, node in nodes.copy().items(): + if not node.neighbours: + del nodes[node_id] + return nodes |
