Total Complexity | 5 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | def get_area_boundary() -> str: |
||
2 | return """ |
||
3 | [out:json]; |
||
4 | |||
5 | area["ISO3166-1"="HU"] |
||
6 | // area["admin_level"="8"]["name"="Hegyeshalom"] |
||
7 | -> .country; |
||
8 | |||
9 | """ |
||
10 | |||
11 | |||
12 | def get_route_relations() -> str: |
||
13 | # future: replace lines below when https://github.com/drolbr/Overpass-API/issues/146 is closed |
||
14 | # relation["route"="railway"]["ref"]["operator"~"(^MÁV(?=;))|((?<=;)MÁV(?=;))|((?<=;)MÁV$)"](area.country); |
||
15 | # relation["route"="railway"]["ref"]["operator"~"(^GYSEV(?=;))|((?<=;)GYSEV(?=;))|((?<=;)GYSEV$)"](area.country); |
||
16 | return """ |
||
17 | ( |
||
18 | relation["route"="railway"]["ref"]["operator"~"MÁV"](area.country); |
||
19 | relation["route"="railway"]["ref"]["operator"~"GYSEV"](area.country); |
||
20 | ); |
||
21 | >>; |
||
22 | out; |
||
23 | |||
24 | """ |
||
25 | |||
26 | |||
27 | def get_operating_site_area(node_id: int) -> str: |
||
28 | return f""" |
||
29 | node({node_id}) -> .station; |
||
30 | .station out; |
||
31 | nwr(around.station:100)["landuse"="railway"]; |
||
32 | convert item ::geom=geom(); |
||
33 | out geom; |
||
34 | """ |
||
35 | |||
36 | |||
37 | def get_ground_floor_tracks() -> str: |
||
38 | return f""" |
||
39 | ( |
||
40 | way["railway"="rail"][!"layer"](area.operatingSite); |
||
41 | way["disused:railway"="rail"][!"layer"](area.operatingSite); |
||
42 | way["abandoned:railway"="rail"][!"layer"](area.operatingSite); |
||
43 | |||
44 | way["railway"="rail"]["layer"="0"](area.operatingSite); |
||
45 | way["disused:railway"="rail"]["layer"="0"](area.operatingSite); |
||
46 | way["abandoned:railway"="rail"]["layer"="0"](area.operatingSite); |
||
47 | ); |
||
48 | """ |
||
49 | |||
50 | |||
51 | def get_operating_site_separator() -> str: |
||
52 | return f""" |
||
53 | (._;>;); |
||
58 |