Overpass_queries   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 2

2 Functions

Rating   Name   Duplication   Size   Complexity  
A get_route_relations() 0 5 1
A get_area_boundary() 0 2 1
1
def get_area_boundary() -> str:
2
    return """
3
        [out:json][timeout:500];
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