Skip to content

Commit cc72e13

Browse files
committed
update user example to include OSM message URLs
1 parent 4ff916a commit cc72e13

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

examples/unique_users_for_area.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44

55
import overpass
66

7+
# Change this to the name of the area you're interested in.
8+
# Keep it small to not abuse the Overpass server.
79
area_name = "Kanab"
810

9-
query = """area[name="{}"]->.slc;(node(area.slc);<;);""".format(area_name)
10-
11+
query = """area[name="{}"]->.a;(node(area.a);<;);""".format(area_name)
1112
users = {"ids": [], "usernames": []}
13+
message_urls = []
1214
api = overpass.API(debug=False)
1315
result = api.Get(
1416
query,
@@ -22,4 +24,7 @@
2224
continue
2325
users["ids"].append(uid)
2426
users["usernames"].append(username)
27+
message_urls.append("https://www.openstreetmap.org/message/new/{}".format(
28+
username))
2529
print(users)
30+
print(message_urls)

0 commit comments

Comments
 (0)