Skip to content
This repository was archived by the owner on Jun 10, 2025. It is now read-only.

Commit e02b591

Browse files
committed
HELP wanted list tower:type=communication
I need to list all cell towers but my coding skills is sub par if anyone wants to help an aspiring coder I also need a map of signal penetration from digital elevation model
1 parent d6a31f3 commit e02b591

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

examples/cell_towers.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/env python
2+
3+
# Retrieves a list of cell towers for a named area.
4+
5+
import overpass
6+
7+
# area_name = "Vaasa"
8+
area_name = "Helsinki"
9+
# pos=61,25
10+
11+
query = """area[tower="{}"]->.a;(node(area.a);<;);""".format(area_name)
12+
api = overpass.API(debug=False)
13+
result = api.Get(query, responseformat="csv(::type)", verbosity="meta")
14+
print(result)
15+
exit(0)
16+
towers = {"type": []}
17+
del result[0] # header
18+
for row in result:
19+
uid = int(row[0])
20+
username = row[1]
21+
if uid in towers["type"]:
22+
continue
23+
towers["type"].append(uid)
24+
print(towers)

0 commit comments

Comments
 (0)