-
Notifications
You must be signed in to change notification settings - Fork 2
/
Overpass query.overpassql
41 lines (37 loc) · 1.03 KB
/
Overpass query.overpassql
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
namespace overpass_query{
// Overpass query to download railway data
// You must replace {} with area definition before use!!!
constexpr auto query = R"ql(
[out:json][timeout:1800];
{} -> .country;
(
node(area.country)["railway"="station"];
node(area.country)["railway"="halt"];
node(area.country)["disused:railway"="station"];
node(area.country)["disused:railway"="halt"];
) -> .stations;
(
relation(area.country)["route"="railway"];
relation(area.country)["route"="tracks"];
) -> .rail_lines;
(
way(area.country)["railway"="rail"];
way(area.country)["railway"="disused"];
way(area.country)["railway"="preserved"];
) -> .tracks;
way(r.rail_lines).tracks -> .tracks;
relation(bw.tracks) -> .rail_lines;
.tracks out qt body geom;
.rail_lines out qt body;
.stations out qt body;
)ql";
// Area of whole country
// Replace {} with country tag
constexpr auto area_country = R"ql(
area["ISO3166-1:alpha2"="{}"][admin_level=2]
)ql";
//Small area for tests
constexpr auto area_pomorskie = R"ql(
area["ISO3166-2"="PL-22"][admin_level=4]
)ql";
}