-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtileinfo.py
59 lines (37 loc) · 1.26 KB
/
tileinfo.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
'''
Created on Dec 31, 2020
@author: stevo
'''
import argparse
import osmium
from utils.map_bb import conversion_type, num2MapBB
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Process some integers.')
parser.add_argument('-x',
dest='x',
default="272",
help='tile x')
parser.add_argument('-y',
dest='y',
default="164",
help='tile y')
parser.add_argument('-z',
dest='z',
default="9",
help='tile z')
args = parser.parse_args()
x=int(args.x)
y=int(args.y)
z=int(args.z)
bb = num2MapBB(x, y, z, conversion_type.extendet)
link = "http://map.openseamap.org/"
link +="?zoom={}".format(z)
link += "&lat={}&lon={}".format(bb.lat, bb.lon)
link += "&mlat={}&mlon={}".format(bb.lat, bb.lon)
link += "&mtext=x{}_y{}_z{}".format(x,y,z)
link += "&layers=BFTFFFFFFTF0FFFFFFFFFF"
print(link)
print("\n\nquery for https://overpass-turbo.eu/")
print(bb.GetOverpassQuery())
print("\n\ngeojson info:")
print(bb.geojson()())