User:Hanoj/overpass

From OpenStreetMap Wiki
Jump to navigation Jump to search

OverpassTurbo

  • node "traffic_calming"~"humb|table|cushion" on highway"~"primary|secondary" dynamic BBOX

http://overpass-turbo.eu/s/7Il

  • way "maxheight"<4" AND "maxweight"<12" in plzensky kraj

http://overpass-turbo.eu/s/17Kg

  • way cycleway=opposite changed last year on the map (include nodes)

https://overpass-turbo.eu/s/1wVm

[adiff:"2023-02-31T23:59:00Z"]; Template:GeocodeArea:Brno->.searchArea;way["cycleway"="opposite"](area.searchArea);compare(delta:t["cycleway"]);out meta geom;

Import network to Aimsun

http://www.overpass-api.de/api/interpreter?data=node(49.178337,16.6501236,49.2321715,16.7328644);way(bn);(._;node(w););out%20meta;

CZ (bbox)

  • node railway=crossing on the map

http://overpass-api.de/api/convert?data=node["railway"~"crossing"](48,12.5,51.1,18.5);out;&target=openlayers&zoom=12&lat=49.2&lon=16.6

  • node XAPI railway=crossing

http://www.overpass-api.de/api/xapi?node[bbox=12.5,48,18.5,51.1][railway=crossing][@meta]

  • way cycleway=opposite* (include nodes)

http://www.overpass-api.de/api/interpreter?data=way["cycleway"~"opposite"](48,12,51,19);out meta;

  • way cycleway=opposite* on the map (include nodes)

http://overpass-api.de/api/convert?data=way["cycleway"~"opposite"](48,12.5,51.1,18.5);(._;node(w););out;&target=openlayers&zoom=12&lat=52&lon=16

https://www.overpass-api.de/api/interpreter?data=%5Bdate:%222012-12-31T23:59:59Z%22%5D;node(area:3600438171);way(bn);(way._%5B%22highway%22%5D;node(w););out%20meta;

  • relation with operator=BrnoNaKole (include ways and nodes)

http://www.overpass-api.de/api/interpreter?data=(rel[operator~BrnoNaKole];>;);out meta;

CZ (area query)

  • node railway=crossing

http://www.overpass-api.de/api/interpreter?data=node(area:3600051684);node._["railway"="crossing"];out meta;

  • node monitoring:bicycle

http://www.overpass-api.de/api/interpreter?data=node(area:3600051684);node._[%22monitoring:bicycle%22];out%20meta;

  • relace pěší trasy KČT

http://www.overpass-api.de/api/interpreter?data=[timeout:280];(rel["operator"~"cz:K[CČ]T",i]["route"~"hiking|foot"];>;);out meta;

  • relace cyklotras v ČR a jejich děti

http://www.overpass-api.de/api/interpreter?data=[timeout:380];rel(area:3600051684)["route"="bicycle"];>>;out meta;

  • relace bicycle v ČR a jejich cesty v ČR a jejich nody

http://www.overpass-api.de/api/interpreter?data=[timeout:380];rel[route=bicycle](area:3600051684);(._;way(r)(area:3600051684);>);out meta;

Brno (bbox)

  • node XAPI bicycle rental

http://www.overpass-api.de/api/xapi?node[bbox=16.25,49,16.7,49.25][amenity=bicycle_rental][@meta]

  • node XAPI bicycle shop

http://www.overpass-api.de/api/xapi?node[bbox=16.25,49,16.7,49.25][shop=bicycle][@meta]

  • node bicycle shop on the MAP

http://overpass-api.de/api/interpreter?data=node["shop"="bicycle"](49.0,16.25,49.25,16.7);out;&target=ol_fixed

  • node bicycle shop on the MAP

http://toolserver.org/~kolossos/qtm2/queryinmap.php?BBOX=16.4,49.1,16.8,49.3&name=*&key=shop&value=bicycle&types=points-infos

  • way cycleway=opposite* on the MAP (include nodes)

http://overpass-api.de/api/convert?data=way["cycleway"~"opposite"](49.1,16.4,49.3,16.8);(._;node(w););out;&target=openlayers&zoom=12&lat=49.2&lon=16.6

  • way oneway=yes AND highway=residential|living_street|pedestrian on the MAP (include nodes)

http://overpass-api.de/api/convert?data=way["oneway"~"yes|-1"]["highway"~"residential|living_street|pedestrian"](49.1,16.4,49.3,16.8);(._;node(w););out;&target=openlayers&zoom=12&lat=49.2&lon=16.6

  • way maxspeed=30 OR highway=living_street on the MAP (include nodes)

http://overpass-api.de/api/convert?data=(way["maxspeed"="30"](49.1,16.4,49.3,16.8);way["highway"="living_street"](49.1,16.4,49.3,16.8));(._;node(w););out;&target=openlayers&zoom=12&lat=49.2&lon=16.6

Brno (area query)

  • relace bicycle v Brně a jejich cesty v Brně a jejich nody

http://www.overpass-api.de/api/interpreter?data=[timeout:80];rel[route=bicycle](area:3600438171);(._;way(r)(area:3600438171);>);out meta;

  • way cycleway=opposite* (include nodes)

http://www.overpass-api.de/api/interpreter?data=node(area:3600438171);way(bn);(way._["cycleway"~"opposite"];node(w););out meta;

  • way highway=cycleway OR cycleway=* OR cycleway:left OR cycleway:right (include nodes)

http://www.overpass-api.de/api/interpreter?data=node(area:3600438171);way(bn)->.all_ways;((way.all_ways["highway"="cycleway"];way.all_ways[~"cycleway.*"~".*"];)->.selected_ways;rel(bw.selected_ways);node(w.selected_ways););out meta;

  • way highway=cycleway (include nodes)

http://www.overpass-api.de/api/interpreter?data=node(area:3600438171);way(bn);(way._["highway"="cycleway"];node(w););out meta;

  • way cycleway=* (include nodes)

http://www.overpass-api.de/api/interpreter?data=node(area:3600438171);way(bn);(way._["cycleway"];node(w););out meta;

  • way highway v Brně a jejich relace a nody

http://www.overpass-api.de/api/interpreter?data=[timeout:80];way[highway](area:3600438171);(._;rel(bw)[route=bicycle]);(._;node(w));out meta;

  • node shop=bicycle

http://www.overpass-api.de/api/interpreter?data=node(area:3600438171);node._["shop"="bicycle"];out meta;

  • node amenity=bicycle_parking on MAP

http://www.overpass-api.de/api/convert?data=node[%22amenity%22=%22bicycle_parking%22]%28area:3600438171%29;out;&target=ol_fixed

  • node railway=level_crossing WITH parent way

http://www.overpass-api.de/api/interpreter?data=node(area:3600438171);node._["railway"="level_crossing"];way(bn);(._;>;);out meta;

Other

  • node addr regexp area Ostopovice

http://overpass-api.de/api/convert?data=node(area:3600442066);node._["addr:conscriptionnumber"~"^[0-9]{1,2}$"];out meta;&target=openlayers&zoom=12&lat=49.2&lon=16.6

  • node addr by Hanoj

http://overpass-api.de/api/interpreter?data=node(user:"hanoj")["addr:housenumber"];out ids;

  • way pedestrian with bicycle tag in EU (bbbox)

http://www.overpass-api.de/api/interpreter?data=[timeout:3600];way["highway"="pedestrian"]["bicycle"](30,-11,70,45);(._;node(w););out meta;

  • node town/city with population 100k-10M

http://www.overpass-api.de/api/interpreter?data=node["place"~"city|town"]["population"~"[0-9]{6,7}"]; out meta;

  • node bicycle to CSV

http://www.overpass-api.de/api/interpreter?data=[out:csv(::"id", ::"lat", ::"lon",::"timestamp", name, display, start_date,"is_in:city","is_in:country_code",website, lastcheck)];node["monitoring:bicycle"];out meta;

  • node bicycle_parking in Olomouc to CSV

http://www.overpass-api.de/api/interpreter?data=[out:csv(::"id", ::"lat", ::"lon",::"user",::"timestamp", operator, "bicycle_parking", capacity, start_date, "description", lastcheck)];node(area:3600437057);node._["amenity"="bicycle_parking"];out meta;

  • way proposed D49

http://www.overpass-api.de/api/interpreter?data=way["highway"~"proposed"]["ref"~"D49"];(._;node(w););out meta;

  • way roads and rails in region for the SZDC model

http://overpass-api.de/query_form.html

 (
   way["railway"~"rail"]["service"!~"spur|yard"](poly:"49.44 15.58 49.71 15.77 49.76 15.94 49.71 16.11");
   way["highway"~"primary.*|secondary.*|tertiary.*|trunk.*|motorway.*"](poly:"49.44 15.58 49.71 15.77 49.76 15.94 49.71 16.1");
 );
 (
 ._;
 >;
 ); out meta;

Overpass node query > Reverse Geocoding Nominative > csv

  • batch Nominative reverse geocoding in one line BASH command:

curl 'http://www.overpass-api.de/api/interpreter?data=\[out:csv(::%22id%22,%20::%22lat%22,%20::%22lon%22,::%22timestamp%22,%20name,%20display,%20start_date,website)\];node\[%22monitoring:bicycle%22\];out%20meta;' | awk -v a='curl --retry 5 -m 20 "http://nominatim.openstreetmap.org/reverse?format=json&addressdetails=3&osm_type=N&osm_id=' -v b='" | jq -r ".address|.country_code,.city,.town,.village,.hamlet" | tr "\n" "\t" | sed -e "s/\tnull//" -e "s/\tnull//" -e "s/\tnull//"' '{geoloc=system(a $1 b); print geoloc $0}' | sed "s/0@id/country\tcity\t@id/" > BikeCounter`date --iso-8601`.csv