Skip to content

Latest commit

 

History

History
59 lines (54 loc) · 1.34 KB

overpass_queries.md

File metadata and controls

59 lines (54 loc) · 1.34 KB

Querying Streets from City (in this case Prince George)

Use at: http://overpass-turbo.eu/
Get city names at: https://www.openstreetmap.org/

Cities:
Bangkok: กรุงเทพมหานคร
Nha Trang: Thành phố Nha Trang
[out:json];
area[name = "Prince George"];
(
  way(area)
    ['name'] // this is essential (only want named roads)
    ['highway']
    // everything below is to exclude certain types of "highways"
    ['highway' !~ 'path']
    ['highway' !~ 'steps']
    ['highway' !~ 'motorway']
    ['highway' !~ 'motorway_link']
    ['highway' !~ 'raceway']
    ['highway' !~ 'bridleway']
    ['highway' !~ 'proposed']
    ['highway' !~ 'construction']
    ['highway' !~ 'elevator']
    ['highway' !~ 'bus_guideway']
    ['highway' !~ 'footway']
    ['highway' !~ 'cycleway']
    ['highway' !~ 'trunk']
    ['foot' !~ 'no']
    ['access' !~ 'private']
    ['access' !~ 'no'];
  >;
);
// node(w); // Uncomment if you want to see just nodes.
out;

Querying ALL Streets from City (in this case Etobicoke)

Necessary to build routes correctly

[out:json];
area[name = "Etobicoke"];
(
  way(area)
    ['highway']
    // everything below is to exclude certain types of "highways"
    ['foot' !~ 'no']
    ['access' !~ 'private']
    ['access' !~ 'no'];
  >;
);
// node(w); // Uncomment if you want to see just nodes.
out;