Some Overpass queries are very slow and clog up the download process by pitching the app in a long queue, waiting to replenish its Overpass download quota. If the queries were executed faster, the app would reach the quota later.
So:
Find out which quests take long and why. First step here is to create a little program in the tests/ directory that iterates through the quest type list and outputs the compiled overpass query for each for some bbox to console. See https://github.com/westnordost/StreetComplete/issues/1457#issuecomment-509031473. The output of this program would also be interesting for @rugk who is maintaining the quests wiki page and links to the used overpass queries for each quest type.
Executing each query on some location should give an idea which quest types are problematic.
Implement optimizations based on these observations. In the predecessor ticket to this one, a few suggestions have already been made:
ors in OQL with if: <condition> blocks if they don't contain regexSomething that might conceivably help (if not already planned) is to output the resource usage (e.g. System time) for the queries. I don't know of a method in Overpass Turbo to output these data, or if they're even remotely available. The transactions.log includes the PID but I don't know if it includes other metrics.
Quest Type | Response time for a bbox of central Hamburg
------------ | -------------
AddRoadName | 6s
AddPlaceName | 45s
AddOneway |
AddBusStopName | 114s
AddIsBuildingUnderground | 2s
AddHousenumber | 6s
MarkCompletedHighwayConstruction | 7s
AddReligionToPlaceOfWorship | 7s
AddParkingAccess | 6s
AddRecyclingType | 12s
AddSport | 5s
AddRoadSurface | 1s
AddMaxSpeed | 2s
AddMaxHeight | 1s
AddRailwayCrossingBarrier | 2s
AddPostboxCollectionTimes | 1s
AddOpeningHours | 14s
AddBikeParkingCapacity | 0s
AddOrchardProduce | 3s
AddCycleway | 41s
AddSidewalk | 57s
AddProhibitedForPedestrians | 43s
AddCrossingType | 1s
AddBuildingLevels | 3s
AddBusStopShelter | 3s
AddVegetarian | 4s
AddVegan | 2s
AddInternetAccess | 3s
AddParkingFee | 3s
AddMotorcycleParkingCapacity | 5s
AddPathSurface | 4s
AddTracktype | 3s
AddBikeParkingType | 1s
AddWheelChairAccessToilets | 2s
AddPlaygroundAccess | 1s
AddWheelchairAccessBusiness | 7s
AddToiletAvailability | 7s
AddFerryAccessPedestrian | 3s
AddFerryAccessMotorVehicle | 2s
AddBuildingType | 2s
AddWayLit | 6s
AddToiletsFee | 6s
AddBabyChangingTable | 4s
AddBikeParkingCover | 3s
AddTrafficSignalsSound | 2s
AddRoofShape | 4s
AddWheelChairAccessPublicTransport | 3s
AddWheelchairAccessOutside | 2s
AddTactilePavingBusStop | 3s
AddTactilePavingCrosswalk | 2s
AddBridgeStructure | 0s
AddReligionToWaysideShrine | 1s
AddCyclewaySegregation | 2s
MarkCompletedBuildingConstruction | 1s
AddMotorcycleParkingCover | 1s
AddFireHydrantType | 1s
AddParkingType | 0s
AddPowerPolesMaterial | 0s
AddCarWashType | 1s
AddBenchBackrest | 1s
AddTrafficSignalsButton | 1s
Note: The times somewhat vary, even if using the same bbox to download. So this list is only good for a very rough categorization of what is expensive and what not.
[bbox:{{bbox}}];
way[highway~"^(primary|secondary|tertiary|unclassified|residential|living_street|pedestrian)$"][!name][!ref][noname != yes][!junction][area != yes];
out meta geom 2000;
[bbox:{{bbox}}];
way[highway~"^(primary|secondary|tertiary|unclassified|residential|living_street|pedestrian)$"][!name][!ref][noname != yes][!junction][area != yes] -> .without_names;
way[highway~"^(primary|secondary|tertiary|unclassified|residential|living_street|pedestrian)$"][name] -> .with_names;
way.with_names(around.without_names:30.0);
out body geom;
md5-d46afdebbce0d86b00865c63cd08d0ea
[bbox:{{bbox}}];
(
node["name"!~"."]["brand"!~"."]["noname"!="yes"]["shop"]["shop"!~"^(no|vacant)$"];
node["name"!~"."]["brand"!~"."]["noname"!="yes"]["tourism"="information"]["information"="office"];
node["name"!~"."]["brand"!~"."]["noname"!="yes"]["amenity"~"^(restaurant|cafe|ice_cream|fast_food|bar|pub|biergarten|food_court|nightclub|cinema|theatre|planetarium|arts_centre|studio|events_venue|conference_centre|exhibition_centre|music_venue|townhall|prison|courthouse|embassy|police|fire_station|ranger_station|bank|bureau_de_change|money_transfer|post_office|library|marketplace|internet_cafe|community_centre|social_facility|nursing_home|childcare|retirement_home|social_centre|youth_centre|car_wash|car_rental|boat_rental|fuel|ferry_terminal|dentist|doctors|clinic|pharmacy|hospital|place_of_worship|monastery|kindergarten|school|college|university|research_institute|driving_school|dive_centre|language_school|music_school|casino|brothel|gambling|love_hotel|stripclub|animal_boarding|animal_shelter|animal_breeding|veterinary)$"];
node["name"!~"."]["brand"!~"."]["noname"!="yes"]["tourism"~"^(attraction|zoo|aquarium|theme_park|gallery|museum|hotel|guest_house|motel|hostel|alpine_hut|apartment|resort|camp_site|caravan_site)$"];
node["name"!~"."]["brand"!~"."]["noname"!="yes"]["leisure"~"^(nature_reserve|sports_centre|fitness_centre|dance|golf_course|water_park|miniature_golf|stadium|marina|bowling_alley|amusement_arcade|adult_gaming_centre|tanning_salon|horse_riding)$"];
node["name"!~"."]["brand"!~"."]["noname"!="yes"]["office"~"^(insurance|estate_agent|travel_agent)$"];
way["name"!~"."]["brand"!~"."]["noname"!="yes"]["shop"]["shop"!~"^(no|vacant)$"];
way["name"!~"."]["brand"!~"."]["noname"!="yes"]["tourism"="information"]["information"="office"];
way["name"!~"."]["brand"!~"."]["noname"!="yes"]["amenity"~"^(restaurant|cafe|ice_cream|fast_food|bar|pub|biergarten|food_court|nightclub|cinema|theatre|planetarium|arts_centre|studio|events_venue|conference_centre|exhibition_centre|music_venue|townhall|prison|courthouse|embassy|police|fire_station|ranger_station|bank|bureau_de_change|money_transfer|post_office|library|marketplace|internet_cafe|community_centre|social_facility|nursing_home|childcare|retirement_home|social_centre|youth_centre|car_wash|car_rental|boat_rental|fuel|ferry_terminal|dentist|doctors|clinic|pharmacy|hospital|place_of_worship|monastery|kindergarten|school|college|university|research_institute|driving_school|dive_centre|language_school|music_school|casino|brothel|gambling|love_hotel|stripclub|animal_boarding|animal_shelter|animal_breeding|veterinary)$"];
way["name"!~"."]["brand"!~"."]["noname"!="yes"]["tourism"~"^(attraction|zoo|aquarium|theme_park|gallery|museum|hotel|guest_house|motel|hostel|alpine_hut|apartment|resort|camp_site|caravan_site)$"];
way["name"!~"."]["brand"!~"."]["noname"!="yes"]["leisure"~"^(nature_reserve|sports_centre|fitness_centre|dance|golf_course|water_park|miniature_golf|stadium|marina|bowling_alley|amusement_arcade|adult_gaming_centre|tanning_salon|horse_riding)$"];
way["name"!~"."]["brand"!~"."]["noname"!="yes"]["office"~"^(insurance|estate_agent|travel_agent)$"];
rel["name"!~"."]["brand"!~"."]["noname"!="yes"]["shop"]["shop"!~"^(no|vacant)$"];
rel["name"!~"."]["brand"!~"."]["noname"!="yes"]["tourism"="information"]["information"="office"];
rel["name"!~"."]["brand"!~"."]["noname"!="yes"]["amenity"~"^(restaurant|cafe|ice_cream|fast_food|bar|pub|biergarten|food_court|nightclub|cinema|theatre|planetarium|arts_centre|studio|events_venue|conference_centre|exhibition_centre|music_venue|townhall|prison|courthouse|embassy|police|fire_station|ranger_station|bank|bureau_de_change|money_transfer|post_office|library|marketplace|internet_cafe|community_centre|social_facility|nursing_home|childcare|retirement_home|social_centre|youth_centre|car_wash|car_rental|boat_rental|fuel|ferry_terminal|dentist|doctors|clinic|pharmacy|hospital|place_of_worship|monastery|kindergarten|school|college|university|research_institute|driving_school|dive_centre|language_school|music_school|casino|brothel|gambling|love_hotel|stripclub|animal_boarding|animal_shelter|animal_breeding|veterinary)$"];
rel["name"!~"."]["brand"!~"."]["noname"!="yes"]["tourism"~"^(attraction|zoo|aquarium|theme_park|gallery|museum|hotel|guest_house|motel|hostel|alpine_hut|apartment|resort|camp_site|caravan_site)$"];
rel["name"!~"."]["brand"!~"."]["noname"!="yes"]["leisure"~"^(nature_reserve|sports_centre|fitness_centre|dance|golf_course|water_park|miniature_golf|stadium|marina|bowling_alley|amusement_arcade|adult_gaming_centre|tanning_salon|horse_riding)$"];
rel["name"!~"."]["brand"!~"."]["noname"!="yes"]["office"~"^(insurance|estate_agent|travel_agent)$"];
);
out meta geom 2000;
md5-84103d5063a02c7b1a94d105144b202d
[bbox:{{bbox}}];
(
node["public_transport"="platform"]["bus"="yes"]["name"!~"."]["noname"!="yes"];
node["public_transport"="platform"]["trolleybus"="yes"]["name"!~"."]["noname"!="yes"];
node["public_transport"="platform"]["tram"="yes"]["name"!~"."]["noname"!="yes"];
node["highway"="bus_stop"]["public_transport"!="stop_position"]["name"!~"."]["noname"!="yes"];
);
out meta geom 2000;
md5-45e3ebd3aa53758c6f81d49e98a85c45
[bbox:{{bbox}}];
(
way["building"]["location"!~"."]["layer"~"^(-[0-9]+)$"];
rel["building"]["location"!~"."]["layer"~"^(-[0-9]+)$"];
);
out meta geom 2000;
md5-9bc93e3d2a13cdbd0b299c951382129f
( way['building'~'^(house|residential|apartments|detached|terrace|dormitory|semi|semidetached_house|farm|school|civic|college|university|public|hospital|kindergarten|train_station|hotel|retail|commercial)$'][location!=underground][!'addr:housenumber'][!'addr:housename'][!'addr:conscriptionnumber'][!'addr:streetnumber'][!noaddress]({{bbox}});
rel['building'~'^(house|residential|apartments|detached|terrace|dormitory|semi|semidetached_house|farm|school|civic|college|university|public|hospital|kindergarten|train_station|hotel|retail|commercial)$'][location!=underground][!'addr:housenumber'][!'addr:housename'][!'addr:conscriptionnumber'][!'addr:streetnumber'][!noaddress]({{bbox}});
) -> .buildings;
.buildings > -> .building_nodes;
node.building_nodes[~'^addr:(housenumber|housename|conscriptionnumber|streetnumber)$'~'.'];
< -> .buildings_with_addr_nodes;
(
.buildings;
- .buildings_with_addr_nodes;
);
out meta geom;
md5-295c05610ef64b1555cb30cbea5d3bb2
[bbox:{{bbox}}];
way[highway=construction](if:!is_date(t['opening_date']) || date(t['opening_date'])<date('2019-08-02T00:00:00Z')) -> .construction_with_unknown_state;
(way[highway=construction](newer: '2019-07-19T00:00:00Z');
relation[highway=construction](newer: '2019-07-19T00:00:00Z');
) -> .recently_edited_construction;
(
.construction_with_unknown_state;
- .recently_edited_construction;
) -> .roads_for_review;
.roads_for_review out meta geom 2000;
md5-d602062d09d26474796e6e2ae7e5ea4b
[bbox:{{bbox}}];
(
node["amenity"="place_of_worship"]["religion"!~"."]["name"];
way["amenity"="place_of_worship"]["religion"!~"."]["name"];
rel["amenity"="place_of_worship"]["religion"!~"."]["name"];
);
out meta geom 2000;
md5-27e01641b38de5ec51bdc8d0c1653d66
[bbox:{{bbox}}];
(
node["amenity"="parking"]["access"!~"."];
node["amenity"="parking"]["access"="unknown"];
way["amenity"="parking"]["access"!~"."];
way["amenity"="parking"]["access"="unknown"];
rel["amenity"="parking"]["access"!~"."];
rel["amenity"="parking"]["access"="unknown"];
);
out meta geom 2000;
md5-c87264beff9e854fb0e4e464aaef01c2
[bbox:{{bbox}}];
(
node["amenity"="recycling"]["recycling_type"!~"."];
way["amenity"="recycling"]["recycling_type"!~"."];
rel["amenity"="recycling"]["recycling_type"!~"."];
);
out meta geom 2000;
md5-b842eee9bbb3ea1df137f7d7f10acb3e
[bbox:{{bbox}}];
(
node["leisure"="pitch"]["sport"!~"."]["access"!~"^(private|no)$"];
node["leisure"="pitch"]["sport"~"^(team_handball|hockey|skating|football)$"]["access"!~"^(private|no)$"];
way["leisure"="pitch"]["sport"!~"."]["access"!~"^(private|no)$"];
way["leisure"="pitch"]["sport"~"^(team_handball|hockey|skating|football)$"]["access"!~"^(private|no)$"];
);
out meta geom 2000;
md5-3321122b644d1f5b33f3e92d2ed38337
[bbox:{{bbox}}];
(
way["highway"~"^(primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential|living_street|pedestrian|track|road)$"]["surface"!~"."]["access"!~"^(private|no)$"];
way["highway"~"^(primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential|living_street|pedestrian|track|road)$"]["surface"!~"."]["foot"]["foot"!~"^(private|no)$"];
);
out meta geom 2000;
md5-41eb6ab57ef982a4e890d076418aa192
[bbox:{{bbox}}];
(
way["highway"~"^(motorway|trunk|primary|secondary|tertiary|unclassified|residential)$"]["maxspeed"!~"."]["maxspeed:forward"!~"."]["maxspeed:backward"!~"."]["source:maxspeed"!~"."]["zone:maxspeed"!~"."]["maxspeed:type"!~"."]["zone:traffic"!~"."]["surface"!~"^(unpaved|compacted|gravel|fine_gravel|pebblestone|grass_paver|ground|earth|dirt|grass|sand|mud|ice|salt|snow|woodchips)$"]["motor_vehicle"!~"^(private|no)$"]["vehicle"!~"^(private|no)$"]["access"!~"^(private|no)$"]["area"!="yes"];
way["highway"~"^(motorway|trunk|primary|secondary|tertiary|unclassified|residential)$"]["maxspeed"!~"."]["maxspeed:forward"!~"."]["maxspeed:backward"!~"."]["source:maxspeed"!~"."]["zone:maxspeed"!~"."]["maxspeed:type"!~"."]["zone:traffic"!~"."]["surface"!~"^(unpaved|compacted|gravel|fine_gravel|pebblestone|grass_paver|ground|earth|dirt|grass|sand|mud|ice|salt|snow|woodchips)$"]["motor_vehicle"!~"^(private|no)$"]["vehicle"!~"^(private|no)$"]["foot"]["foot"!~"^(private|no)$"]["area"!="yes"];
);
out meta geom 2000;
md5-fbed25abee4cab94abf0bee59bcf4ef6
[bbox:{{bbox}}];
(
(node["barrier"="height_restrictor"]["maxheight"!~"."]["maxheight:physical"!~"."];
node["amenity"="parking_entrance"]["parking"~"^(underground|multi-storey)$"]["maxheight"!~"."]["maxheight:physical"!~"."];
);
(
way["highway"~"^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential|living_street|track|road)$"]["covered"="yes"]["maxheight"!~"."]["maxheight:physical"!~"."];
way["highway"~"^(motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential|living_street|track|road)$"]["tunnel"~"^(yes|building_passage|avalanche_protector)$"]["maxheight"!~"."]["maxheight:physical"!~"."];
way["highway"="service"]["access"!~"^(private|no)$"]["vehicle"!~"^(private|no)$"]["covered"="yes"]["maxheight"!~"."]["maxheight:physical"!~"."];
way["highway"="service"]["access"!~"^(private|no)$"]["vehicle"!~"^(private|no)$"]["tunnel"~"^(yes|building_passage|avalanche_protector)$"]["maxheight"!~"."]["maxheight:physical"!~"."];
);
);
out meta geom 2000;
md5-5ae4f8a0716d00d1d212658e4eac88c4
[bbox:{{bbox}}];
way["highway"]["access"~"^private|no$"];
node(w) -> .private_roads;
way["railway"~"^tram|abandoned$"];
node(w) -> .excluded_railways;
node["railway"="level_crossing"][!"crossing:barrier"];
(._;
- .private_roads;
);
(._;
- .excluded_railways;
);
out meta geom 2000;
md5-4fcaeba4e3dbed8ea5dead1049aa5888
[bbox:{{bbox}}];
node["amenity"="post_box"]["collection_times"!~"."]["collection_times:signed"!="no"]["access"!~"^(private|no)$"];
out meta geom 2000;
md5-b97c0500391f214ae7dccca42ddd6774
[bbox:{{bbox}}];
(
node["shop"]["shop"!~"^(no|vacant)$"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
node["amenity"="bicycle_parking"]["bicycle_parking"="building"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
node["amenity"="parking"]["parking"="multi-storey"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
node["amenity"="recycling"]["recycling_type"="centre"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
node["tourism"="information"]["information"="office"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
node["amenity"~"^(restaurant|cafe|ice_cream|fast_food|bar|pub|biergarten|food_court|nightclub|cinema|planetarium|casino|library|townhall|courthouse|embassy|community_centre|youth_centre|bank|bureau_de_change|money_transfer|post_office|marketplace|internet_cafe|car_wash|car_rental|boat_rental|fuel|dentist|doctors|clinic|pharmacy|veterinary)$"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
node["tourism"~"^(zoo|aquarium|theme_park|gallery|museum)$"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
node["leisure"~"^(fitness_centre|dance|golf_course|water_park|miniature_golf|bowling_alley|horse_riding|amusement_arcade|adult_gaming_centre|tanning_salon)$"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
node["office"~"^(insurance|government|estate_agent|travel_agent|religion)$"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
way["shop"]["shop"!~"^(no|vacant)$"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
way["amenity"="bicycle_parking"]["bicycle_parking"="building"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
way["amenity"="parking"]["parking"="multi-storey"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
way["amenity"="recycling"]["recycling_type"="centre"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
way["tourism"="information"]["information"="office"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
way["amenity"~"^(restaurant|cafe|ice_cream|fast_food|bar|pub|biergarten|food_court|nightclub|cinema|planetarium|casino|library|townhall|courthouse|embassy|community_centre|youth_centre|bank|bureau_de_change|money_transfer|post_office|marketplace|internet_cafe|car_wash|car_rental|boat_rental|fuel|dentist|doctors|clinic|pharmacy|veterinary)$"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
way["tourism"~"^(zoo|aquarium|theme_park|gallery|museum)$"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
way["leisure"~"^(fitness_centre|dance|golf_course|water_park|miniature_golf|bowling_alley|horse_riding|amusement_arcade|adult_gaming_centre|tanning_salon)$"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
way["office"~"^(insurance|government|estate_agent|travel_agent|religion)$"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
rel["shop"]["shop"!~"^(no|vacant)$"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
rel["amenity"="bicycle_parking"]["bicycle_parking"="building"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
rel["amenity"="parking"]["parking"="multi-storey"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
rel["amenity"="recycling"]["recycling_type"="centre"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
rel["tourism"="information"]["information"="office"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
rel["amenity"~"^(restaurant|cafe|ice_cream|fast_food|bar|pub|biergarten|food_court|nightclub|cinema|planetarium|casino|library|townhall|courthouse|embassy|community_centre|youth_centre|bank|bureau_de_change|money_transfer|post_office|marketplace|internet_cafe|car_wash|car_rental|boat_rental|fuel|dentist|doctors|clinic|pharmacy|veterinary)$"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
rel["tourism"~"^(zoo|aquarium|theme_park|gallery|museum)$"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
rel["leisure"~"^(fitness_centre|dance|golf_course|water_park|miniature_golf|bowling_alley|horse_riding|amusement_arcade|adult_gaming_centre|tanning_salon)$"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
rel["office"~"^(insurance|government|estate_agent|travel_agent|religion)$"]["opening_hours"!~"."]["name"]["opening_hours:signed"!="no"]["access"!~"^(private|no)$"];
);
out meta geom 2000;
md5-725a3ae5728b61af80f5a1707795ffbd
[bbox:{{bbox}}];
(
node["amenity"="bicycle_parking"]["capacity"!~"."]["access"!~"^(private|no)$"];
way["amenity"="bicycle_parking"]["capacity"!~"."]["access"!~"^(private|no)$"];
);
out meta geom 2000;
md5-881378c93ad97b680c0451a6f490feb5
[bbox:{{bbox}}];
(
way["landuse"="orchard"]["trees"!~"."]["produce"!~"."]["crop"!~"."];
rel["landuse"="orchard"]["trees"!~"."]["produce"!~"."]["crop"!~"."];
);
out meta geom 2000;
md5-673f9b8ca28a426d82263c24d7a40e1c
[bbox:{{bbox}}];
way[highway ~ "^(primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$"][area != yes][motorroad != yes][!cycleway][!"cycleway:left"][!"cycleway:right"][!"cycleway:both"][!"sidewalk:bicycle"][!"sidewalk:both:bicycle"][!"sidewalk:left:bicycle"][!"sidewalk:right:bicycle"][maxspeed !~ "^(20|15|10|8|7|6|5|10 mph|5 mph|walk)$"][surface !~ "^(unpaved|compacted|gravel|fine_gravel|pebblestone|grass_paver|ground|earth|dirt|grass|sand|mud|ice|salt|snow|woodchips)$"][bicycle != no][access !~ "^private|no$"][bicycle != use_sidepath]["bicycle:backward" != use_sidepath]["bicycle:forward" != use_sidepath] -> .streets;
(
way[highway=cycleway](around.streets: 15);
way[highway ~ "^(path|footway)$"](around.streets: 15);
) -> .cycleways;
way.streets(around.cycleways: 15) -> .streets_near_cycleways;
(
.streets;
- .streets_near_cycleways;
);
out meta geom 2000;
md5-cbb57141e100fc40f30ddcf5f22a0ecc
[bbox:{{bbox}}];
way[highway ~ "^(primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential)$"][area != yes][motorroad != yes][!sidewalk][!"sidewalk:left"][!"sidewalk:right"][!"sidewalk:both"][maxspeed !~ "^(8|7|6|5|5 mph|walk)$"][surface !~ "^(unpaved|compacted|gravel|fine_gravel|pebblestone|grass_paver|ground|earth|dirt|grass|sand|mud|ice|salt|snow|woodchips)$"][lit = yes][foot != no][access !~ "^private|no$"][foot != use_sidepath] -> .streets;
way[highway ~ "^(path|footway|cycleway)$"](around.streets: 15) -> .ways;
way.streets(around.ways: 15) -> .streets_near_ways;
(
.streets;
- .streets_near_ways;
);
out meta geom 2000;
md5-405a081bf295fd8d13d0da306cb0f044
[bbox:{{bbox}}];
(
way["foot"!~"."]["sidewalk"~"^(none|no)$"]["access"!~"^(private|no)$"]["motorroad"!="yes"]["highway"~"^(trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$"]["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"]["oneway"~"^(yes|-1)$"];
way["foot"!~"."]["sidewalk"~"^(none|no)$"]["access"!~"^(private|no)$"]["motorroad"!="yes"]["highway"~"^(trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$"]["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"]["bridge"="yes"];
way["foot"!~"."]["sidewalk"~"^(none|no)$"]["access"!~"^(private|no)$"]["motorroad"!="yes"]["highway"~"^(trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$"]["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"]["tunnel"="yes"];
way["foot"!~"."]["sidewalk"~"^(none|no)$"]["access"!~"^(private|no)$"]["motorroad"!="yes"]["highway"~"^(trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$"]["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"]["bicycle"~"^(no|use_sidepath)$"];
way["foot"!~"."]["sidewalk"~"^(none|no)$"]["access"!~"^(private|no)$"]["motorroad"!="yes"]["highway"~"^(trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$"]["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"]["lit"="yes"];
way["foot"!~"."]["sidewalk:both"~"^(none|no)$"]["access"!~"^(private|no)$"]["motorroad"!="yes"]["highway"~"^(trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$"]["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"]["oneway"~"^(yes|-1)$"];
way["foot"!~"."]["sidewalk:both"~"^(none|no)$"]["access"!~"^(private|no)$"]["motorroad"!="yes"]["highway"~"^(trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$"]["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"]["bridge"="yes"];
way["foot"!~"."]["sidewalk:both"~"^(none|no)$"]["access"!~"^(private|no)$"]["motorroad"!="yes"]["highway"~"^(trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$"]["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"]["tunnel"="yes"];
way["foot"!~"."]["sidewalk:both"~"^(none|no)$"]["access"!~"^(private|no)$"]["motorroad"!="yes"]["highway"~"^(trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$"]["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"]["bicycle"~"^(no|use_sidepath)$"];
way["foot"!~"."]["sidewalk:both"~"^(none|no)$"]["access"!~"^(private|no)$"]["motorroad"!="yes"]["highway"~"^(trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$"]["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"]["lit"="yes"];
way["foot"!~"."]["sidewalk:left"~"^(none|no)$"]["sidewalk:right"~"^(none|no)$"]["access"!~"^(private|no)$"]["motorroad"!="yes"]["highway"~"^(trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$"]["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"]["oneway"~"^(yes|-1)$"];
way["foot"!~"."]["sidewalk:left"~"^(none|no)$"]["sidewalk:right"~"^(none|no)$"]["access"!~"^(private|no)$"]["motorroad"!="yes"]["highway"~"^(trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$"]["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"]["bridge"="yes"];
way["foot"!~"."]["sidewalk:left"~"^(none|no)$"]["sidewalk:right"~"^(none|no)$"]["access"!~"^(private|no)$"]["motorroad"!="yes"]["highway"~"^(trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$"]["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"]["tunnel"="yes"];
way["foot"!~"."]["sidewalk:left"~"^(none|no)$"]["sidewalk:right"~"^(none|no)$"]["access"!~"^(private|no)$"]["motorroad"!="yes"]["highway"~"^(trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$"]["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"]["bicycle"~"^(no|use_sidepath)$"];
way["foot"!~"."]["sidewalk:left"~"^(none|no)$"]["sidewalk:right"~"^(none|no)$"]["access"!~"^(private|no)$"]["motorroad"!="yes"]["highway"~"^(trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$"]["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"]["lit"="yes"];
);
out meta geom 2000;
md5-b7a894f2865a800d8a8865fb03250ee8
[bbox:{{bbox}}];
node["highway"="crossing"]["crossing"!~"."];
out meta geom 2000;
md5-5dc2b2ee9f10dc33e1e1fcb753af097f
[bbox:{{bbox}}];
(
way["building"~"^(house|residential|apartments|detached|terrace|dormitory|semi|semidetached_house|bungalow|school|civic|college|university|public|hospital|kindergarten|transportation|train_station|hotel|retail|commercial|office|warehouse|industrial|manufacture|parking|farm|farm_auxiliary|barn|cabin)$"]["building:levels"!~"."]["height"!~"."]["building:height"!~"."]["man_made"!~"."]["location"!="underground"];
rel["building"~"^(house|residential|apartments|detached|terrace|dormitory|semi|semidetached_house|bungalow|school|civic|college|university|public|hospital|kindergarten|transportation|train_station|hotel|retail|commercial|office|warehouse|industrial|manufacture|parking|farm|farm_auxiliary|barn|cabin)$"]["building:levels"!~"."]["height"!~"."]["building:height"!~"."]["man_made"!~"."]["location"!="underground"];
);
out meta geom 2000;
md5-951e6fe0fe3d64589091db10bae38206
[bbox:{{bbox}}];
(
node["public_transport"="platform"]["bus"="yes"]["shelter"!~"."]["covered"!~"."];
node["public_transport"="platform"]["trolleybus"="yes"]["shelter"!~"."]["covered"!~"."];
node["public_transport"="platform"]["tram"="yes"]["shelter"!~"."]["covered"!~"."];
node["highway"="bus_stop"]["public_transport"!="stop_position"]["shelter"!~"."]["covered"!~"."];
);
out meta geom 2000;
md5-d86e55cadfb9be6a33eece45145e7382
[bbox:{{bbox}}];
(
node["amenity"~"^(restaurant|cafe|fast_food)$"]["name"]["diet:vegetarian"!~"."];
way["amenity"~"^(restaurant|cafe|fast_food)$"]["name"]["diet:vegetarian"!~"."];
);
out meta geom 2000;
md5-e009fd74ba945823aeb143c4a31d232c
[bbox:{{bbox}}];
(
node["amenity"~"^(restaurant|cafe|fast_food)$"]["name"]["diet:vegetarian"~"^(yes|only)$"]["diet:vegan"!~"."];
way["amenity"~"^(restaurant|cafe|fast_food)$"]["name"]["diet:vegetarian"~"^(yes|only)$"]["diet:vegan"!~"."];
);
out meta geom 2000;
md5-98d1c38edbbd60d617758f346a06cd6a
[bbox:{{bbox}}];
(
node["amenity"="library"]["internet_access"!~"."]["wifi"!~"."]["name"];
node["tourism"~"^(hotel|guest_house|hostel|motel)$"]["internet_access"!~"."]["wifi"!~"."]["name"];
way["amenity"="library"]["internet_access"!~"."]["wifi"!~"."]["name"];
way["tourism"~"^(hotel|guest_house|hostel|motel)$"]["internet_access"!~"."]["wifi"!~"."]["name"];
rel["amenity"="library"]["internet_access"!~"."]["wifi"!~"."]["name"];
rel["tourism"~"^(hotel|guest_house|hostel|motel)$"]["internet_access"!~"."]["wifi"!~"."]["name"];
);
out meta geom 2000;
md5-1dd6021fd2d76d01dc2971fb9d4d9128
[bbox:{{bbox}}];
(
node["amenity"="parking"]["fee"!~"."]["fee:conditional"!~"."]["access"~"^(yes|customers|public)$"];
way["amenity"="parking"]["fee"!~"."]["fee:conditional"!~"."]["access"~"^(yes|customers|public)$"];
rel["amenity"="parking"]["fee"!~"."]["fee:conditional"!~"."]["access"~"^(yes|customers|public)$"];
);
out meta geom 2000;
md5-22c10f6fb9ebef77882a699331dc87b0
[bbox:{{bbox}}];
(
node["amenity"="motorcycle_parking"]["capacity"!~"."]["access"!~"^(private|no)$"];
way["amenity"="motorcycle_parking"]["capacity"!~"."]["access"!~"^(private|no)$"];
);
out meta geom 2000;
md5-e6e4dce220e547a566eb1d390580c947
[bbox:{{bbox}}];
way["highway"~"^(path|footway|cycleway|bridleway|steps)$"]["surface"!~"."]["access"!~"^(private|no)$"];
out meta geom 2000;
md5-944bda9cc142fa1cea9374f79a08d8ed
[bbox:{{bbox}}];
(
way["highway"="track"]["tracktype"!~"."]["access"!~"^(private|no)$"];
way["highway"="track"]["tracktype"!~"."]["foot"]["foot"!~"^(private|no)$"];
);
out meta geom 2000;
md5-84b478d46366b9dbdaad274918ddf941
[bbox:{{bbox}}];
(
node["amenity"="bicycle_parking"]["access"!="private"]["bicycle_parking"!~"."];
way["amenity"="bicycle_parking"]["access"!="private"]["bicycle_parking"!~"."];
);
out meta geom 2000;
md5-1665b4a3006c2db417f85a25e72151c5
[bbox:{{bbox}}];
(
node["amenity"="toilets"]["access"!~"^(private|customers)$"]["wheelchair"!~"."];
way["amenity"="toilets"]["access"!~"^(private|customers)$"]["wheelchair"!~"."];
);
out meta geom 2000;
md5-5a9612311a1b8957ae8c0a6f45ace703
[bbox:{{bbox}}];
(
node["leisure"="playground"]["access"!~"."];
node["leisure"="playground"]["access"="unknown"];
way["leisure"="playground"]["access"!~"."];
way["leisure"="playground"]["access"="unknown"];
rel["leisure"="playground"]["access"!~"."];
rel["leisure"="playground"]["access"="unknown"];
);
out meta geom 2000;
md5-7131de67b4a7f6894c08eb647b4ccf8b
[bbox:{{bbox}}];
(
node["shop"]["shop"!~"^(no|vacant)$"]["wheelchair"!~"."]["name"];
node["amenity"="parking"]["parking"="multi-storey"]["wheelchair"!~"."]["name"];
node["amenity"="recycling"]["recycling_type"="centre"]["wheelchair"!~"."]["name"];
node["tourism"="information"]["information"="office"]["wheelchair"!~"."]["name"];
node["amenity"~"^(restaurant|cafe|ice_cream|fast_food|bar|pub|biergarten|food_court|nightclub|cinema|library|theatre|arts_centre|casino|conference_centre|bank|bureau_de_change|money_transfer|post_office|internet_cafe|marketplace|police|ranger_station|courthouse|embassy|townhall|community_centre|youth_centre|car_wash|car_rental|fuel|driving_school|doctors|clinic|pharmacy|veterinary|dentist|place_of_worship)$"]["wheelchair"!~"."]["name"];
node["tourism"~"^(zoo|aquarium|theme_park|gallery|attraction|viewpoint|museum|hotel|guest_house|hostel|motel|apartment|chalet)$"]["wheelchair"!~"."]["name"];
node["leisure"~"^(golf_course|water_park|miniature_golf|dance|bowling_alley|horse_riding|sports_centre|fitness_centre|amusement_arcade|adult_gaming_centre|tanning_salon)$"]["wheelchair"!~"."]["name"];
node["office"~"^(insurance|government|lawyer|estate_agent|political_party|travel_agent|tax_advisor|therapist|religion)$"]["wheelchair"!~"."]["name"];
way["shop"]["shop"!~"^(no|vacant)$"]["wheelchair"!~"."]["name"];
way["amenity"="parking"]["parking"="multi-storey"]["wheelchair"!~"."]["name"];
way["amenity"="recycling"]["recycling_type"="centre"]["wheelchair"!~"."]["name"];
way["tourism"="information"]["information"="office"]["wheelchair"!~"."]["name"];
way["amenity"~"^(restaurant|cafe|ice_cream|fast_food|bar|pub|biergarten|food_court|nightclub|cinema|library|theatre|arts_centre|casino|conference_centre|bank|bureau_de_change|money_transfer|post_office|internet_cafe|marketplace|police|ranger_station|courthouse|embassy|townhall|community_centre|youth_centre|car_wash|car_rental|fuel|driving_school|doctors|clinic|pharmacy|veterinary|dentist|place_of_worship)$"]["wheelchair"!~"."]["name"];
way["tourism"~"^(zoo|aquarium|theme_park|gallery|attraction|viewpoint|museum|hotel|guest_house|hostel|motel|apartment|chalet)$"]["wheelchair"!~"."]["name"];
way["leisure"~"^(golf_course|water_park|miniature_golf|dance|bowling_alley|horse_riding|sports_centre|fitness_centre|amusement_arcade|adult_gaming_centre|tanning_salon)$"]["wheelchair"!~"."]["name"];
way["office"~"^(insurance|government|lawyer|estate_agent|political_party|travel_agent|tax_advisor|therapist|religion)$"]["wheelchair"!~"."]["name"];
rel["shop"]["shop"!~"^(no|vacant)$"]["wheelchair"!~"."]["name"];
rel["amenity"="parking"]["parking"="multi-storey"]["wheelchair"!~"."]["name"];
rel["amenity"="recycling"]["recycling_type"="centre"]["wheelchair"!~"."]["name"];
rel["tourism"="information"]["information"="office"]["wheelchair"!~"."]["name"];
rel["amenity"~"^(restaurant|cafe|ice_cream|fast_food|bar|pub|biergarten|food_court|nightclub|cinema|library|theatre|arts_centre|casino|conference_centre|bank|bureau_de_change|money_transfer|post_office|internet_cafe|marketplace|police|ranger_station|courthouse|embassy|townhall|community_centre|youth_centre|car_wash|car_rental|fuel|driving_school|doctors|clinic|pharmacy|veterinary|dentist|place_of_worship)$"]["wheelchair"!~"."]["name"];
rel["tourism"~"^(zoo|aquarium|theme_park|gallery|attraction|viewpoint|museum|hotel|guest_house|hostel|motel|apartment|chalet)$"]["wheelchair"!~"."]["name"];
rel["leisure"~"^(golf_course|water_park|miniature_golf|dance|bowling_alley|horse_riding|sports_centre|fitness_centre|amusement_arcade|adult_gaming_centre|tanning_salon)$"]["wheelchair"!~"."]["name"];
rel["office"~"^(insurance|government|lawyer|estate_agent|political_party|travel_agent|tax_advisor|therapist|religion)$"]["wheelchair"!~"."]["name"];
);
out meta geom 2000;
md5-ade58d9cd00914d159b6902d0125bbbb
[bbox:{{bbox}}];
(
node["shop"~"^(mall|department_store)$"]["name"]["toilets"!~"."];
node["highway"~"^(services|rest_area)$"]["toilets"!~"."];
way["shop"~"^(mall|department_store)$"]["name"]["toilets"!~"."];
way["highway"~"^(services|rest_area)$"]["toilets"!~"."];
);
out meta geom 2000;
md5-fb7188ca5ad961d00eead09886918e09
[bbox:{{bbox}}];
(
way["route"="ferry"]["foot"!~"."];
rel["route"="ferry"]["foot"!~"."];
);
out meta geom 2000;
md5-b78b055d8382d0fc74967b6d097557fa
[bbox:{{bbox}}];
(
way["route"="ferry"]["motor_vehicle"!~"."];
rel["route"="ferry"]["motor_vehicle"!~"."];
);
out meta geom 2000;
md5-f271f4a49bc10ab170d0a2f412a4bf83
[bbox:{{bbox}}];
(
way["building"="yes"]["man_made"!~"."]["historic"!~"."]["military"!~"."]["power"!~"."]["location"!="underground"];
rel["building"="yes"]["man_made"!~"."]["historic"!~"."]["military"!~"."]["power"!~"."]["location"!="underground"];
);
out meta geom 2000;
md5-6186b3dea1f9de55113f5ab4afaa1194
[bbox:{{bbox}}];
(
way["highway"~"^(residential|living_street|pedestrian)$"]["lit"!~"."]["access"!~"^(private|no)$"];
way["highway"~"^(residential|living_street|pedestrian)$"]["lit"!~"."]["foot"]["foot"!~"^(private|no)$"];
way["highway"~"^(primary|secondary|tertiary|unclassified|service)$"]["sidewalk"~"^(both|left|right|yes|separate)$"]["lit"!~"."]["access"!~"^(private|no)$"];
way["highway"~"^(primary|secondary|tertiary|unclassified|service)$"]["sidewalk"~"^(both|left|right|yes|separate)$"]["lit"!~"."]["foot"]["foot"!~"^(private|no)$"];
way["highway"~"^(primary|secondary|tertiary|unclassified|service)$"]["source:maxspeed"~"^(.+:urban)$"]["lit"!~"."]["access"!~"^(private|no)$"];
way["highway"~"^(primary|secondary|tertiary|unclassified|service)$"]["source:maxspeed"~"^(.+:urban)$"]["lit"!~"."]["foot"]["foot"!~"^(private|no)$"];
way["highway"~"^(primary|secondary|tertiary|unclassified|service)$"]["maxspeed:type"~"^(.+:urban)$"]["lit"!~"."]["access"!~"^(private|no)$"];
way["highway"~"^(primary|secondary|tertiary|unclassified|service)$"]["maxspeed:type"~"^(.+:urban)$"]["lit"!~"."]["foot"]["foot"!~"^(private|no)$"];
way["highway"~"^(primary|secondary|tertiary|unclassified|service)$"]["zone:maxspeed"~"^(.+:urban)$"]["lit"!~"."]["access"!~"^(private|no)$"];
way["highway"~"^(primary|secondary|tertiary|unclassified|service)$"]["zone:maxspeed"~"^(.+:urban)$"]["lit"!~"."]["foot"]["foot"!~"^(private|no)$"];
way["highway"~"^(primary|secondary|tertiary|unclassified|service)$"]["zone:traffic"~"^(.+:urban)$"]["lit"!~"."]["access"!~"^(private|no)$"];
way["highway"~"^(primary|secondary|tertiary|unclassified|service)$"]["zone:traffic"~"^(.+:urban)$"]["lit"!~"."]["foot"]["foot"!~"^(private|no)$"];
way["highway"~"^(footway|cycleway|steps)$"]["lit"!~"."]["access"!~"^(private|no)$"];
way["highway"~"^(footway|cycleway|steps)$"]["lit"!~"."]["foot"]["foot"!~"^(private|no)$"];
way["highway"="path"]["foot"="designated"]["lit"!~"."]["access"!~"^(private|no)$"];
way["highway"="path"]["foot"="designated"]["lit"!~"."]["foot"]["foot"!~"^(private|no)$"];
way["highway"="path"]["bicycle"="designated"]["lit"!~"."]["access"!~"^(private|no)$"];
way["highway"="path"]["bicycle"="designated"]["lit"!~"."]["foot"]["foot"!~"^(private|no)$"];
);
out meta geom 2000;
md5-237067efdaac94501ab2c96c0dae5eda
[bbox:{{bbox}}];
(
node["amenity"="toilets"]["access"!~"^(private|customers)$"]["fee"!~"."];
way["amenity"="toilets"]["access"!~"^(private|customers)$"]["fee"!~"."];
);
out meta geom 2000;
md5-49f558e2c4028d62fe80007116ac65e4
[bbox:{{bbox}}];
(
node["amenity"~"^(restaurant|cafe|fuel|fast_food)$"]["name"]["toilets"="yes"]["diaper"!~"."]["changing_table"!~"."];
node["shop"~"^(mall|department_store)$"]["name"]["toilets"="yes"]["diaper"!~"."]["changing_table"!~"."];
node["amenity"="toilets"]["diaper"!~"."]["changing_table"!~"."];
way["amenity"~"^(restaurant|cafe|fuel|fast_food)$"]["name"]["toilets"="yes"]["diaper"!~"."]["changing_table"!~"."];
way["shop"~"^(mall|department_store)$"]["name"]["toilets"="yes"]["diaper"!~"."]["changing_table"!~"."];
way["amenity"="toilets"]["diaper"!~"."]["changing_table"!~"."];
);
out meta geom 2000;
md5-99c8dc78133b9c1ed541aac528a04092
[bbox:{{bbox}}];
(
node["amenity"="bicycle_parking"]["access"!~"^(private|no)$"]["covered"!~"."]["bicycle_parking"!~"^(shed|lockers|building)$"];
way["amenity"="bicycle_parking"]["access"!~"^(private|no)$"]["covered"!~"."]["bicycle_parking"!~"^(shed|lockers|building)$"];
);
out meta geom 2000;
md5-fcbe1aaf8da68fbdf9ba6a15809db0bd
[bbox:{{bbox}}];
node["highway"="crossing"]["crossing"="traffic_signals"]["traffic_signals:sound"!~"."];
out meta geom 2000;
md5-85aa0629d0428cb5de07b8d13736c425
[bbox:{{bbox}}];
(
way["roof:levels"]["roof:levels"!="0"]["roof:shape"!~"."]["3dr:type"!~"."]["3dr:roof"!~"."];
rel["roof:levels"]["roof:levels"!="0"]["roof:shape"!~"."]["3dr:type"!~"."]["3dr:roof"!~"."];
);
out meta geom 2000;
md5-0c7d8ea2027ffba7cac1f394407809c2
[bbox:{{bbox}}];
(
node["amenity"="bus_station"]["wheelchair"!~"."];
node["railway"~"^(station|subway_entrance)$"]["wheelchair"!~"."];
way["amenity"="bus_station"]["wheelchair"!~"."];
way["railway"~"^(station|subway_entrance)$"]["wheelchair"!~"."];
rel["amenity"="bus_station"]["wheelchair"!~"."];
rel["railway"~"^(station|subway_entrance)$"]["wheelchair"!~"."];
);
out meta geom 2000;
md5-160607d15f196a143972ca42665a3cbf
[bbox:{{bbox}}];
(
node["leisure"="dog_park"]["wheelchair"!~"."];
way["leisure"="dog_park"]["wheelchair"!~"."];
rel["leisure"="dog_park"]["wheelchair"!~"."];
);
out meta geom 2000;
md5-ea525eadb2c6c93b402fda808720af54
[bbox:{{bbox}}];
(
node["public_transport"="platform"]["tactile_paving"!~"."];
node["highway"="bus_stop"]["public_transport"!="stop_position"]["tactile_paving"!~"."];
way["public_transport"="platform"]["tactile_paving"!~"."];
way["highway"="bus_stop"]["public_transport"!="stop_position"]["tactile_paving"!~"."];
);
out meta geom 2000;
md5-9eef78ea8ce45e11bac7633d803db446
[bbox:{{bbox}}];
node["highway"="crossing"]["tactile_paving"!~"."]["foot"!="no"];
out meta geom 2000;
md5-988fc838c8b3687f38ecdc83ad2bd399
[bbox:{{bbox}}];
way["man_made"="bridge"]["bridge:structure"!~"."];
out meta geom 2000;
md5-419053b5a1ae2d780d52e64eedc9a45d
[bbox:{{bbox}}];
(
node["historic"="wayside_shrine"]["religion"!~"."]["access"!~"^(private|no)$"];
way["historic"="wayside_shrine"]["religion"!~"."]["access"!~"^(private|no)$"];
rel["historic"="wayside_shrine"]["religion"!~"."]["access"!~"^(private|no)$"];
);
out meta geom 2000;
md5-8f306dae4f1ed203a60eadd5944a1048
[bbox:{{bbox}}];
(
way["highway"="path"]["bicycle"="designated"]["foot"="designated"]["segregated"!~"."]["area"!="yes"]["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"];
way["highway"="footway"]["bicycle"="designated"]["segregated"!~"."]["area"!="yes"]["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"];
way["highway"="cycleway"]["foot"~"^(designated|yes)$"]["segregated"!~"."]["area"!="yes"]["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"];
);
out meta geom 2000;
md5-1a7eb6f976788cf0ee8f8ce03cbba32b
[bbox:{{bbox}}];
way[building=construction](if:!is_date(t['opening_date']) || date(t['opening_date'])<date('2019-08-02T00:00:00Z')) -> .construction_with_unknown_state;
(way[building=construction](newer: '2019-02-03T00:00:00Z');
relation[building=construction](newer: '2019-02-03T00:00:00Z');
) -> .recently_edited_construction;
(
.construction_with_unknown_state;
- .recently_edited_construction;
) -> .buildings_under_construction_ways;
relation[building=construction](if:!is_date(t['opening_date']) || date(t['opening_date'])<date('2019-08-02T00:00:00Z')) -> .construction_with_unknown_state;
(way[building=construction](newer: '2019-02-03T00:00:00Z');
relation[building=construction](newer: '2019-02-03T00:00:00Z');
) -> .recently_edited_construction;
(
.construction_with_unknown_state;
- .recently_edited_construction;
) -> .buildings_under_construction_relations;
(
.buildings_under_construction_ways;
.buildings_under_construction_relations;
);
out meta geom 2000;
md5-f57136a8e081231afea6888c60dffdef
[bbox:{{bbox}}];
(
node["amenity"="motorcycle_parking"]["access"!~"^(private|no)$"]["covered"!~"."]["motorcycle_parking"!~"^(shed|garage_boxes|building)$"];
way["amenity"="motorcycle_parking"]["access"!~"^(private|no)$"]["covered"!~"."]["motorcycle_parking"!~"^(shed|garage_boxes|building)$"];
);
out meta geom 2000;
md5-f77b5d21949d6acb19f1c56341a1d5a6
[bbox:{{bbox}}];
node["emergency"="fire_hydrant"]["fire_hydrant:type"!~"."];
out meta geom 2000;
md5-3dfc7d0494cb60b3ee27940bf67a3d8a
[bbox:{{bbox}}];
(
node["amenity"="parking"]["parking"!~"."];
way["amenity"="parking"]["parking"!~"."];
rel["amenity"="parking"]["parking"!~"."];
);
out meta geom 2000;
md5-7a3051b8db3949d16cbe0864ba8781b4
[bbox:{{bbox}}];
node["power"="pole"]["material"!~"."];
out meta geom 2000;
md5-e3a7022645fc2b8573bdb5aec1c8930c
[bbox:{{bbox}}];
(
node["amenity"="car_wash"]["automated"!~"."]["self_service"!~"."];
way["amenity"="car_wash"]["automated"!~"."]["self_service"!~"."];
);
out meta geom 2000;
md5-f21fcadbb07763c3fb8dd16d6403a119
[bbox:{{bbox}}];
node["amenity"="bench"]["backrest"!~"."];
out meta geom 2000;
md5-9eedadab861599857148e7d5b1983141
[bbox:{{bbox}}];
node["highway"="crossing"]["crossing"="traffic_signals"]["button_operated"!~"."];
out meta geom 2000;
Wow, thanks a lot, that's a lot to go through. I will update this comment over time:
See https://github.com/westnordost/StreetComplete/issues/1457#issuecomment-513540882
Use nwr instead of node/way/relation, move name check at the end.
https://github.com/westnordost/StreetComplete/issues/1457#issuecomment-517664263
[bbox:{{bbox}}];
(
nwr["shop"]["shop"!~"^(no|vacant)$"];
nwr["tourism"="information"]["information"="office"];
nwr["amenity"~"^(restaurant|cafe|ice_cream|fast_food|bar|pub|biergarten|food_court|nightclub|cinema|theatre|planetarium|arts_centre|studio|events_venue|conference_centre|exhibition_centre|music_venue|townhall|prison|courthouse|embassy|police|fire_station|ranger_station|bank|bureau_de_change|money_transfer|post_office|library|marketplace|internet_cafe|community_centre|social_facility|nursing_home|childcare|retirement_home|social_centre|youth_centre|car_wash|car_rental|boat_rental|fuel|ferry_terminal|dentist|doctors|clinic|pharmacy|hospital|place_of_worship|monastery|kindergarten|school|college|university|research_institute|driving_school|dive_centre|language_school|music_school|casino|brothel|gambling|love_hotel|stripclub|animal_boarding|animal_shelter|animal_breeding|veterinary)$"];
nwr["tourism"~"^(attraction|zoo|aquarium|theme_park|gallery|museum|hotel|guest_house|motel|hostel|alpine_hut|apartment|resort|camp_site|caravan_site)$"];
nwr["leisure"~"^(nature_reserve|sports_centre|fitness_centre|dance|golf_course|water_park|miniature_golf|stadium|marina|bowling_alley|amusement_arcade|adult_gaming_centre|tanning_salon|horse_riding)$"];
nwr["office"~"^(insurance|estate_agent|travel_agent)$"];
)->.set;
nwr.set[!name][!brand]["noname"!="yes"];
out meta geom 2000;
I'm using two intermediate inputsets for this one, also adding regular expressions for keys.
[bbox:{{bbox}}];
(
way[!"foot"]
["motorroad"!="yes"]
["access"!~"^(private|no)$"]
[~"^sidewalk(:both|:left|:right)?$"~"^(none|no)$"] // regular expression for keys
["highway"~"^(trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$"]
["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"];)->.w1;
(
way.w1[~"^sidewalk(:both)?$"~"^(none|no)$"];
way.w1["sidewalk:left"~"^(none|no)$"]["sidewalk:right"~"^(none|no)$"]; // both tags need to be present
)->.w2;
(
way.w2["oneway"~"^(yes|-1)$"];
way.w2["bridge"="yes"];
way.w2["tunnel"="yes"];
way.w2["bicycle"~"^(no|use_sidepath)$"];
way.w2["lit"="yes"];
);
out meta geom 2000;
Depends on optimization in https://github.com/drolbr/Overpass-API/pull/167
@mmd-osm For the AddProhibitedForPedestrians query, I'm surprised you included surface after highway rather than before. I'd've guessed that highway matching would dominate over surface -- doing spot checks, highway is a combination for sidewalk~(none|no) 99.97% of the time. (sidewalk:(both|left|right) has about 3000 instances total.) But I admittedly didn't check highway=residential and more minor roads (or, for that matter, any values), which are excluded from the query.
I'd expect the following to be a better first part, although admittedly it's not as friendly.
[bbox:{{bbox}}];
(
way[!"foot"]
["motorroad"!="yes"]
[~"^sidewalk(:both|:left|:right)?$"~"^(none|no)$"] // regular expression for keys
["surface"~"^(paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone)$"];
["access"!~"^(private|no)$"]
["highway"~"^(trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$"]
)->.w1;
@westnordost Additionally, after looking at the AddMaxHeight query, perhaps the way.w2["tunnel"="yes"]; line should be changed to way.w2["tunnel"~"^(yes|building_passage|avalanche_protector)$"]; ? (I wasn't sure if building passages had sidewalks very often, but I'd expect many avalanche protectors to have them.)
No performance gain, but for better readability:
nwra_key !~ . -> !a_keyPerformance gain:
~key~value expressions and use them in AddBusStopName, AddBusStopShelter, AddWayLit, AddProhibitedForPedestriansQuest type | Response time
---------- | ---------------
AddPlaceName | 28s
AddBusStopName | 16s
AddOpeningHours | 25s
AddCycleway | 59s
AddSidewalk | 66s
AddProhibitedForPedestrians | 39s
Many more at 4-8s. If all can be optimized with the same method, will also boost performance of the queries.
[bbox:{{bbox}}];
(
nwr[!name][!brand][noname != yes][shop][shop !~ '^no|vacant$'];
nwr[!name][!brand][noname != yes][tourism = information][information = office];
nwr[!name][!brand][noname != yes][amenity ~ '^restaurant|cafe|ice_cream|fast_food|bar|pub|biergarten|food_court|nightclub|cinema|theatre|planetarium|arts_centre|studio|events_venue|conference_centre|exhibition_centre|music_venue|townhall|prison|courthouse|embassy|police|fire_station|ranger_station|bank|bureau_de_change|money_transfer|post_office|library|marketplace|internet_cafe|community_centre|social_facility|nursing_home|childcare|retirement_home|social_centre|youth_centre|car_wash|car_rental|boat_rental|fuel|ferry_terminal|dentist|doctors|clinic|pharmacy|hospital|place_of_worship|monastery|kindergarten|school|college|university|research_institute|driving_school|dive_centre|language_school|music_school|casino|brothel|gambling|love_hotel|stripclub|animal_boarding|animal_shelter|animal_breeding|veterinary$'];
nwr[!name][!brand][noname != yes][tourism ~ '^attraction|zoo|aquarium|theme_park|gallery|museum|hotel|guest_house|motel|hostel|alpine_hut|apartment|resort|camp_site|caravan_site$'];
nwr[!name][!brand][noname != yes][leisure ~ '^nature_reserve|sports_centre|fitness_centre|dance|golf_course|water_park|miniature_golf|stadium|marina|bowling_alley|amusement_arcade|adult_gaming_centre|tanning_salon|horse_riding$'];
nwr[!name][!brand][noname != yes][office ~ '^insurance|estate_agent|travel_agent$'];
);
out meta geom 2000;
[bbox:{{bbox}}];
(
node[public_transport = platform][~'^bus|trolleybus|tram$' ~ '^yes$'][!name][noname != yes];
node[highway = bus_stop][public_transport != stop_position][!name][noname != yes];
);
out meta geom 2000;
[bbox:{{bbox}}];
(
nwr[shop][shop !~ '^no|vacant$'][!opening_hours][name]['opening_hours:signed' != no][access !~ '^private|no$'];
nwr[amenity = bicycle_parking][bicycle_parking = building][!opening_hours][name]['opening_hours:signed' != no][access !~ '^private|no$'];
nwr[amenity = parking][parking = 'multi-storey'][!opening_hours][name]['opening_hours:signed' != no][access !~ '^private|no$'];
nwr[amenity = recycling][recycling_type = centre][!opening_hours][name]['opening_hours:signed' != no][access !~ '^private|no$'];
nwr[tourism = information][information = office][!opening_hours][name]['opening_hours:signed' != no][access !~ '^private|no$'];
nwr[amenity ~ '^restaurant|cafe|ice_cream|fast_food|bar|pub|biergarten|food_court|nightclub|cinema|planetarium|casino|library|townhall|courthouse|embassy|community_centre|youth_centre|bank|bureau_de_change|money_transfer|post_office|marketplace|internet_cafe|car_wash|car_rental|boat_rental|fuel|dentist|doctors|clinic|pharmacy|veterinary$'][!opening_hours][name]['opening_hours:signed' != no][access !~ '^private|no$'];
nwr[tourism ~ '^zoo|aquarium|theme_park|gallery|museum$'][!opening_hours][name]['opening_hours:signed' != no][access !~ '^private|no$'];
nwr[leisure ~ '^fitness_centre|dance|golf_course|water_park|miniature_golf|bowling_alley|horse_riding|amusement_arcade|adult_gaming_centre|tanning_salon$'][!opening_hours][name]['opening_hours:signed' != no][access !~ '^private|no$'];
nwr[office ~ '^insurance|government|estate_agent|travel_agent|religion$'][!opening_hours][name]['opening_hours:signed' != no][access !~ '^private|no$'];
);
out meta geom 2000;
[bbox:{{bbox}}];
way[highway ~ '^(primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$'][area != yes][motorroad != yes][!cycleway][!'cycleway:left'][!'cycleway:right'][!'cycleway:both'][!'sidewalk:bicycle'][!'sidewalk:both:bicycle'][!'sidewalk:left:bicycle'][!'sidewalk:right:bicycle'][maxspeed !~ '^(20|15|10|8|7|6|5|10 mph|5 mph|walk)$'][surface !~ '^(unpaved|compacted|gravel|fine_gravel|pebblestone|grass_paver|ground|earth|dirt|grass|sand|mud|ice|salt|snow|woodchips)$'][bicycle != no][access !~ '^private|no$'][bicycle != use_sidepath]['bicycle:backward' != use_sidepath]['bicycle:forward' != use_sidepath] -> .streets;
(
way[highway=cycleway](around.streets: 15);
way[highway ~ '^(path|footway)$'](around.streets: 15);
) -> .cycleways;
way.streets(around.cycleways: 15) -> .streets_near_cycleways;
(
.streets;
- .streets_near_cycleways;
);
out meta geom 2000;
[bbox:{{bbox}}];
way[highway ~ '^(primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential)$'][area != yes][motorroad != yes][!sidewalk][!'sidewalk:left'][!'sidewalk:right'][!'sidewalk:both'][maxspeed !~ '^(8|7|6|5|5 mph|walk)$'][surface !~ '^(unpaved|compacted|gravel|fine_gravel|pebblestone|grass_paver|ground|earth|dirt|grass|sand|mud|ice|salt|snow|woodchips)$'][lit = yes][foot != no][access !~ '^private|no$'][foot != use_sidepath] -> .streets;
way[highway ~ '^(path|footway|cycleway)$'](around.streets: 15) -> .ways;
way.streets(around.ways: 15) -> .streets_near_ways;
(
.streets;
- .streets_near_ways;
);
out meta geom 2000;
[bbox:{{bbox}}];
(
way[!foot][~'^sidewalk(:both)?$' ~ '^none|no$'][access !~ '^private|no$'][motorroad != yes][highway ~ '^trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified$'][surface ~ '^paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone$'][oneway ~ '^yes|-1$'];
way[!foot][~'^sidewalk(:both)?$' ~ '^none|no$'][access !~ '^private|no$'][motorroad != yes][highway ~ '^trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified$'][surface ~ '^paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone$'][bridge = yes];
way[!foot][~'^sidewalk(:both)?$' ~ '^none|no$'][access !~ '^private|no$'][motorroad != yes][highway ~ '^trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified$'][surface ~ '^paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone$'][tunnel = yes];
way[!foot][~'^sidewalk(:both)?$' ~ '^none|no$'][access !~ '^private|no$'][motorroad != yes][highway ~ '^trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified$'][surface ~ '^paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone$'][bicycle ~ '^no|use_sidepath$'];
way[!foot][~'^sidewalk(:both)?$' ~ '^none|no$'][access !~ '^private|no$'][motorroad != yes][highway ~ '^trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified$'][surface ~ '^paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone$'][lit = yes];
way[!foot]['sidewalk:left' ~ '^none|no$']['sidewalk:right' ~ '^none|no$'][access !~ '^private|no$'][motorroad != yes][highway ~ '^trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified$'][surface ~ '^paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone$'][oneway ~ '^yes|-1$'];
way[!foot]['sidewalk:left' ~ '^none|no$']['sidewalk:right' ~ '^none|no$'][access !~ '^private|no$'][motorroad != yes][highway ~ '^trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified$'][surface ~ '^paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone$'][bridge = yes];
way[!foot]['sidewalk:left' ~ '^none|no$']['sidewalk:right' ~ '^none|no$'][access !~ '^private|no$'][motorroad != yes][highway ~ '^trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified$'][surface ~ '^paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone$'][tunnel = yes];
way[!foot]['sidewalk:left' ~ '^none|no$']['sidewalk:right' ~ '^none|no$'][access !~ '^private|no$'][motorroad != yes][highway ~ '^trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified$'][surface ~ '^paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone$'][bicycle ~ '^no|use_sidepath$'];
way[!foot]['sidewalk:left' ~ '^none|no$']['sidewalk:right' ~ '^none|no$'][access !~ '^private|no$'][motorroad != yes][highway ~ '^trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified$'][surface ~ '^paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone$'][lit = yes];
);
out meta geom 2000;
@mmd-osm Regarding putting the name later: You said in https://github.com/westnordost/StreetComplete/issues/1457#issuecomment-513574779
Different filter criteria are not executed in the exact sequence given in the query, in particular they are grouped by the type of filter first. Different types are: key only, exact key value, key w/ negated value, key w/ value regex, key w/ negated value regex, key regex w/ value regex. There’s a heuristic in place which aims at cutting down the number of objects as early as possible.
If the heuristic is there to cut down the number of objects as early as possible, why does it not work in the cases mentioned above? Is it because the grouping by filter type comes first and only then within these groups, the filters are sorted by that heuristic?
If I understand correctly, this query would not be very optimized because it pulls in first all elements with no name, even though pulling in only elements with superspecialkey would be the better strategy.
way[superspecialkey ~ "right|okay"][!name];
Did I understand this correctly?
If yes, isn't this then a topic that should better be handled upstream (at Overpass)?
Is it because the grouping by filter type comes first and only then within these groups, the filters are sorted by that heuristic?
No, what I meant by the heuristic is a certain sequence in which those different groups are being evaluated. Although a bit dated and somewhat high level, Roland gave a presentation at FOSSGIS2013 on how the evaluation works, starting on slide 23: https://www.fossgis.de/konferenz/2013/programm/attachments/428_workshop.odp / https://www.fossgis.de/konferenz/2013/programm/events/520.de.html
Some of the filters take size of the bounding box into account, or switch evaluation strategy on the fly, if one approach produces too much data during evaluation. I'm not aware of a concise description on all the details (and there are many more, which I didn't mention yet), except for the source code.
If I understand correctly, this query would not be very optimized because it pulls in first all elements with no name, even though pulling in only elements with superspecialkey would be the better strategy.
The major issue here is that there's no statistical information available on local or even global tag distribution and frequency, i.e. it is not known up front that superspecialkey is quite rare, and name is very frequent.
By forcing a different evaluation sequence, I'm bringing in my own knowledge about tag frequency - which should be fairly universal in case of a name tag. On the other hand, this makes it hard to generalize this optimization approach, as you would need to keep some statistical information around to decide if this is worthwhile or even counterproductive.
The major issue here is that there's no statistical information available on local or even global tag distribution and frequency, i.e. it is not known up front that superspecialkey is quite rare, and name is very frequent.
But that could be done, in the future, right? A server-local taginfo of the like. After all, the data is all already there and overpass itself has the best means to acquire this data (quickly).
Uhm, did I miss something or how did you extract the compiled overpass queries now?
In the OP you stated:
First step here is to create a little program in the tests/ directory that iterates through the quest type list and outputs the compiled overpass query for each for some bbox to console.
… but then you just came up with the results (out of nowhere). I also checked the tests dir and could not find anything… :thinking:
I wrote it, but did not commit it yet, work in progress. If you intend to copy&paste the queries to the wiki page, better wait until I am through with the optimizations. Minus imports, it is less than 30 lines of code.
@mmd-osm : I took your proposed query for AddPlaceName and turned it around - first nwr[!name][!brand]["noname"!="yes"] -> .set; and then the rest. It turned out that the runtime of that query is still in the same dimension as your proposal. So, maybe the heuristic isn't the problem after all, but that the whole query pulls in the mountain of data not once (as in your proposal) but 6 times (as it is currently) - in other words, the ors being expanded is the problem.
Maybe I can write a transpiler that automatically converts a boolean expression like this:
addr:housenumber or (((shop and opening_hours) or amenity) and name)
into an efficient overpass query. This is the way the queries are defined in StreetComplete.
Currently, a boolean expression like this is expanded (_=ausmultipliziert_) before conversion, so that the ors are all at top level. So the above query becomes
(
node['addr:housenumber'];
node[shop][opening_hours][name];
node[amenity][name];
);
This works, but experienced especially for deeper nested expressions, it is not so efficient.
With the intersection operator, it is perhaps possible to convert expressions into overpass syntax without having to expand it. So, I am looking for automatically appliable rules. ands on leaf-level and ors one level above are already no problem. For example.. (shop and opening_hours) or amenity already converts fine to ( node[shop][opening_hours]; node[amenity]; );. The hard part is to find rules for how to handle ands on higher levels, that is, ands that contain nested ors.
So, for and chains which are not at leaf-level (= contain ored sub-expressions), the following rules could be used:
The boolean expression mentioned at the beginning could be expressed like this:
(
node['addr:housenumber'];
(
node[shop][opening_hours];
node[amenity];
) -> .n1;
node.n1[name];
);
An expression like this
addr:housenumber or (name and ((shop and opening_hours) or amenity))
could look like this:
(
node['addr:housenumber'];
node[name] -> .n1;
(
node.n1[shop][opening_hours];
node.n1[amenity];
);
);
An expression like this
addr:housenumber or ((name or noname) and ((shop and opening_hours) or amenity))
could look like this:
(
node['addr:housenumber'];
(
node[shop][opening_hours];
node[amenity];
) -> .n1;
(
node.n1[name];
node.n1[noname];
);
);
So, rules are:
ands can be combined. I.e. in A and B and (X or Y or Z), A and B can be combined to node[A][B]and chain contains nested ors, the result of the first expression in that chain is put into a named result set. All consecutive expressions on that level work on that named result set and save their result back into that result set. The last expression within such a chain saves the result back to the default result set.@mmd-osm Does sind sound right?
You have to be careful with union statements: Z and (X or Y) will not work in your example, as node[name] -> .n1; is also included in the result. Inside a union statement, every single statement's result is also added to final union result, regardless of the inputset it is assigned to (here: .n1).
[bbox:{{bbox}}];
(
node[name] -> .n1;
(
node.n1[shop][opening_hours];
node.n1[amenity];
);
);
node._[!shop][!opening_hours][!amenity];
out;
-> query shows some results!
Oh, thank you for that remark! Too bad though. So, the only way to solve this is to pull out all the things that should not work on the default input set out of the union statement and to the top of the statement.
This makes it more difficult because I can not simply recurse through the expression.
Right, maybe this isn't too bad by using different inputsets to store intermediate resutls:
[bbox:{{bbox}}];
node['addr:housenumber']->.res1;
node[name] -> .n1;
(
node.n1[shop][opening_hours];
node.n1[amenity];
) -> .res2;
(.res1; .res2;);
out;
or maybe better:
node['addr:housenumber']->.res1;
(
node[shop][opening_hours];
node[amenity];
)->.n1;
node.n1[name] -> .res2;
(.res1; .res2;);
out;
I took your proposed query for AddPlaceName and turned it around - first nwr[!name][!brand]["noname"!="yes"] -> .set; and then the rest. It turned out that the runtime of that query is still in the same dimension as your proposal
I don't think this is a good idea, as you need much more memory this way to store _all_ objects which don't fulfill those properties. By applying the name filter towards the end (as in my example), we already have a fairly small number of objects.
I'd recommend to add a few out count; or (.n1 out count;) here and there for testing, to see how large intermediate results are:
[bbox:{{bbox}}];
nwr[!name][!brand]["noname"!="yes"];
out count;
Re myself @westnordost : This means though, that any and-expression deeply nested in the whole boolean expression always works on the full data set instead of whatever is left after other filters reduced the result.
It's quite a brain teaser to find an algorithm to convert any boolean expression to overpass syntax. Though I may have cracked it now. Here is a teaser of an automatically generated query:
Tag Filters
nodes with
((public_transport = platform and ~bus|trolleybus|tram ~ yes)
or
(highway = bus_stop and public_transport != stop_position))
and !name and noname != yes
[bbox:{{bbox}}];
node[!name][noname != yes] -> .n1;
node.n1[public_transport = platform][~'^bus|trolleybus|tram$' ~ '^yes$'] -> .n2;
node.n1[highway = bus_stop][public_transport != stop_position] -> .n3;
(.n2; .n3;) -> .n1;
out meta geom;
Both queries look surprisingly similar 😎
A quick comment,though: You really need to double check if moving the second line (producing .n1) towards the end helps avoiding excessive memory consumption, see https://github.com/westnordost/StreetComplete/issues/1514#issuecomment-517916909
Example:
[bbox:50.04559282551578,19.9237060546875,50.070472406781924,19.967780113220215];
node[!name][noname != yes] -> .n1;
node.n1[public_transport = platform][~'^bus|trolleybus|tram$' ~ '^yes$'] -> .n2;
node.n1[highway = bus_stop][public_transport != stop_position] -> .n3;
.n1 out count;
.n2 out count;
.n3 out count;
.n1 has 172850 nodes in this case... this will not really fly. node[!name][noname != yes] is a very weak filter, and will include almost all nodes in a bounding box, even all those nodes that don't have any tags at all(!). The idea should be to move weak filters to the end, when the strong filters already removed most of the data.
vs:
[bbox:50.04559282551578,19.9237060546875,50.070472406781924,19.967780113220215];
(node[public_transport = platform][~'^bus|trolleybus|tram$' ~ '^yes$'];
node[highway = bus_stop][public_transport != stop_position];
)->.n2;
node.n2[!name][noname != yes] -> .n1;
.n1 out count;
.n2 out count;
@mmd-osm Okay, two things.
Is it possible to query only elements that have any tags? That would be another angle how to increase query performance by reducing the number of elements as the first thing in the generated query. (The algorithm could be: If the first tag filter is not by-key or by-key-value, put a "has any tags" in front)
Actually, I am really not sure about that the second query is better. I tried out both variants on large areas and the number of seconds it takes for overpass to reply is always longer for the second variant. For example 5s vs 7s. I know the response time is a very rough measure, maybe you have access to more precise ones?
My attempt to explain why the first may actually be more performant:
!name is a cheap operation, but only removes few elements from the input set. While a merge plus regex are expensive operations.Is it possible to query only elements that have any tags?
Yes, that's possible, although we need to check what it means from a performance pov. ((if:count_tags() > 0)).
I tried out both variants on large areas and the number of seconds it takes for overpass to reply is always longer for the second variant. For example 5s vs 7s
My results are pretty much the oppositie, both in memory consumption and CPU consumption.
Can you share the exact bbox and server instance you were using for testing? When testing on the public instances, keep an eye on CPU utilization (https://lz4.overpass-api.de/munin/localdomain/localhost.localdomain/cpu.html), as high CPU utilization heavily skews your measurements. Also, always try several measurements, and discard outliers (slowest and fastest ones).
I'm testing this both on lz4.overpass-api.de and the dev instance. On the dev instance (that's on my branch), I'm getting:
[bbox:50.04559282551578,19.9237060546875,50.070472406781924,19.967780113220215];
(node[public_transport = platform][~'^bus|trolleybus|tram$' ~ '^yes$'];
node[highway = bus_stop][public_transport != stop_position];
)->.n1;
node.n1[!name][noname != yes];
out meta geom;
[bbox:50.04559282551578,19.9237060546875,50.070472406781924,19.967780113220215];
node[!name][noname != yes] -> .n1;
node.n1[public_transport = platform][~'^bus|trolleybus|tram$' ~ '^yes$'] -> .n2;
node.n1[highway = bus_stop][public_transport != stop_position] -> .n3;
(.n2; .n3;) -> .n1;
.n1 out meta geom;
Not really in scope for StreetComplete: if you like you can try a much larger bbox: 49.82292311172603,19.41009521484375,50.35159464074624,20.820465087890625 to see a much larger runtime difference between both queries.
Now, it looks like it is faster to apply the cheap operation on the full 100k elements in order to apply the expensive operations on a few less elements than the other way round. I think that makes sense. In the query above, it is a regex in a merge.
Both [public_transport = platform] and [highway = bus_stop] will be evaluated first, and they're already very selective. Regex will be applied on this result only.
[bbox:50.04559282551578,19.9237060546875,50.070472406781924,19.967780113220215];
node[public_transport = platform]; out count;
node[highway = bus_stop]; out count;
I used this bbox: [bbox:50.1289423,18.7158966,50.4522579,19.3167114]
After doing more runs to even out outliers, the results are inconclusive after all. Looks pretty much the same:
!name in front: 4s 5s 10s 7s 12s 13s 4s 3sOk, dev instance reports back 2s for !name in front, and 350ms with union in front.
lz4.overpass-api.de is currently not suitable for performance measurements due to the high system load (as can be seen in the largely varying numbers). Also, please make sure that you don't use overpass-api.de, as it points to both z.overpass-api.de and lz4.overpass-api.de with very different performance characteristics.
Instead, I tried https://overpass.maptime.in/api/ (which is used for OSMCha and has rather little load atm). Figures were fairly stable across 5-10 measurements:
!name is front: 3.4s
union in front: 2.5s
Ok, so I/we can conclude that you are right and I need to change the implementation of the generator. Currently, the generator just puts all leaves (non-unions) in front of the generated overpass query, regardless of the order defined in Streetcomplete's "tag filter" syntax.
Alrighty, this is the final syntax:
[bbox:{{bbox}}];
way[highway~"^(primary|secondary|tertiary|unclassified|residential|living_street|pedestrian)$"][!name][!ref][noname != yes][!junction][area != yes]->.unnamed;
(
way.unnamed['access' !~ '^private|no$'];
way.unnamed['foot']['foot' !~ '^private|no$'];
); out meta geom;
[bbox:{{bbox}}];
way[highway~"^(primary|secondary|tertiary|unclassified|residential|living_street|pedestrian)$"][!name][!ref][noname != yes][!junction][area != yes] -> .without_names;
way[highway~"^(primary|secondary|tertiary|unclassified|residential|living_street|pedestrian)$"][name] -> .with_names;
way.with_names(around.without_names: 30.0 );
out body geom;
md5-af02579c1d85f8f083ac75959ce0bbc9
[bbox:{{bbox}}];
nwr[shop][shop !~ '^no|vacant$'] -> .e2;
nwr[craft] -> .e3;
nwr[office] -> .e4;
nwr[tourism = information][information = office] -> .e5;
nwr[amenity ~ '^restaurant|cafe|ice_cream|fast_food|bar|pub|biergarten|food_court|nightclub|cinema|theatre|planetarium|arts_centre|studio|events_venue|conference_centre|exhibition_centre|music_venue|townhall|prison|courthouse|embassy|police|fire_station|ranger_station|bank|bureau_de_change|money_transfer|post_office|library|marketplace|internet_cafe|community_centre|social_facility|nursing_home|childcare|retirement_home|social_centre|youth_centre|car_wash|car_rental|boat_rental|fuel|ferry_terminal|dentist|doctors|clinic|pharmacy|hospital|place_of_worship|monastery|kindergarten|school|college|university|research_institute|driving_school|dive_centre|language_school|music_school|casino|brothel|gambling|love_hotel|stripclub|animal_boarding|animal_shelter|animal_breeding|veterinary$'] -> .e6;
nwr[tourism ~ '^attraction|zoo|aquarium|theme_park|gallery|museum|hotel|guest_house|motel|hostel|alpine_hut|apartment|resort|camp_site|caravan_site|chalet$'] -> .e7;
nwr[leisure ~ '^nature_reserve|sports_centre|fitness_centre|dance|golf_course|water_park|miniature_golf|stadium|marina|bowling_alley|amusement_arcade|adult_gaming_centre|tanning_salon|horse_riding$'] -> .e8;
(.e2; .e3; .e4; .e5; .e6; .e7; .e8;) -> .e1;
nwr.e1[!name][!brand][noname != yes];
out meta geom;
md5-1a55ff595ae168beaba1eb44446b56cd
nodes with
((public_transport = platform and ~bus|trolleybus|tram ~ yes)
or
(highway = bus_stop and public_transport != stop_position))
and !name and noname != yes
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[public_transport = platform][~'^bus|trolleybus|tram$' ~ '^yes$'] -> .n2;
node[highway = bus_stop][public_transport != stop_position] -> .n3;
(.n2; .n3;) -> .n1;
node.n1[!name][noname != yes];
out meta geom;
md5-b578649237fc7fb0f86d82c99e17c2af
ways, relations with building and !location and layer~-[0-9]+
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
way[building][!location][layer ~ '^-[0-9]+$'] -> .w1;
rel[building][!location][layer ~ '^-[0-9]+$'] -> .r1;
(.w1; .r1;);
out meta geom;
md5-c441e01d1f2c5d23b889fb1a832a0856
(
way['building'~'^(house|residential|apartments|detached|terrace|dormitory|semi|semidetached_house|farm|school|civic|college|university|public|hospital|kindergarten|train_station|hotel|retail|commercial)$'][location!=underground][ruins!=yes][!'addr:housenumber'][!'addr:housename'][!'addr:conscriptionnumber'][!'addr:streetnumber'][!noaddress]({{bbox}});
rel['building'~'^(house|residential|apartments|detached|terrace|dormitory|semi|semidetached_house|farm|school|civic|college|university|public|hospital|kindergarten|train_station|hotel|retail|commercial)$'][location!=underground][ruins!=yes][!'addr:housenumber'][!'addr:housename'][!'addr:conscriptionnumber'][!'addr:streetnumber'][!noaddress]({{bbox}});
) -> .buildings;
.buildings > -> .building_nodes;
node.building_nodes[~'^addr:(housenumber|housename|conscriptionnumber|streetnumber)$'~'.']; < -> .buildings_with_addr_nodes;
(.buildings; - .buildings_with_addr_nodes;);
out meta geom;
md5-cfc0a971eb72e1cd15362e8ee3eb29e0
[bbox:{{bbox}}];way[highway = construction](if:!is_date(t['opening_date']) || date(t['opening_date']) < date('2019-09-01T00:00:00Z')) -> .construction_with_unknown_state;
(
way[highway=construction](newer: '2019-08-18T00:00:00Z');
relation[highway=construction](newer: '2019-08-18T00:00:00Z');
) -> .recently_edited_construction;
(.construction_with_unknown_state; - .recently_edited_construction;) -> .roads_for_review;
.roads_for_review out meta geom;
md5-bce2fffd288c59691fd6a45477c32e58
nodes, ways, relations with amenity=place_of_worship and !religion and name
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
nwr[amenity = place_of_worship][!religion][name];
out meta geom;
md5-3949d4fc96c0c2565d40dfaf95cc7063
nodes, ways, relations with amenity=parking and (!access or access=unknown)
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
nwr[amenity = parking] -> .e1;
nwr.e1[!access] -> .e2;
nwr.e1[access = unknown] -> .e3;
(.e2; .e3;);
out meta geom;
md5-3c733210d89dcafd40e4fa5d2f5f2345
nodes, ways, relations with amenity = recycling and !recycling_type
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
nwr[amenity = recycling][!recycling_type];
out meta geom;
md5-b9c916c2caa6503b78b2f527506a8ecd
nodes, ways with leisure=pitch and
(!sport or sport ~ team_handball|hockey|skating|football )
and (access !~ private|no)
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[leisure = pitch] -> .n1;
node.n1[!sport] -> .n2;
node.n1[sport ~ '^team_handball|hockey|skating|football$'] -> .n3;
(.n2; .n3;) -> .n1;
node.n1[access !~ '^private|no$'] -> .n1;
way[leisure = pitch] -> .w1;
way.w1[!sport] -> .w2;
way.w1[sport ~ '^team_handball|hockey|skating|football$'] -> .w3;
(.w2; .w3;) -> .w1;
way.w1[access !~ '^private|no$'] -> .w1;
(.n1; .w1;);
out meta geom;
md5-41d17ee0de018ae98b83abdd82ba0cd7
ways with highway ~ primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential|living_street|pedestrian|track|road and !surface
and (access !~ private|no or (foot and foot !~ private|no))
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
way[highway ~ '^primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential|living_street|pedestrian|track|road$'][!surface] -> .w1;
way.w1[access !~ '^private|no$'] -> .w2;
way.w1[foot][foot !~ '^private|no$'] -> .w3;
(.w2; .w3;);
out meta geom;
md5-085da271d9fa2db4ee5040a498f37919
ways with highway ~ motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential
and !maxspeed and !maxspeed:forward and !maxspeed:backward
and !source:maxspeed and !zone:maxspeed and !maxspeed:type and !zone:traffic
and surface !~ unpaved|compacted|gravel|fine_gravel|pebblestone|grass_paver|ground|earth|dirt|grass|sand|mud|ice|salt|snow|woodchips
and motor_vehicle !~ private|no
and vehicle !~ private|no
and area != yes
and (access !~ private|no or (foot and foot !~ private|no))
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
way[highway ~ '^motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential$'][!maxspeed][!'maxspeed:forward'][!'maxspeed:backward'][!'source:maxspeed'][!'zone:maxspeed'][!'maxspeed:type'][!'zone:traffic'][surface !~ '^unpaved|compacted|gravel|fine_gravel|pebblestone|grass_paver|ground|earth|dirt|grass|sand|mud|ice|salt|snow|woodchips$'][motor_vehicle !~ '^private|no$'][vehicle !~ '^private|no$'][area != yes] -> .w1;
way.w1[access !~ '^private|no$'] -> .w2;
way.w1[foot][foot !~ '^private|no$'] -> .w3;
(.w2; .w3;);
out meta geom;
md5-001056b9b3066184e7d6403e2fb826b2
[bbox:{{bbox}}];
node[barrier = height_restrictor] -> .n2;
node[amenity = parking_entrance][parking ~ '^underground|multi-storey$'] -> .n3;
(.n2; .n3;) -> .n1;
node.n1[!maxheight][!'maxheight:physical'];
out meta geom;
md5-3709c7a36f15564df26be765bf527245
[bbox:{{bbox}}];
way[highway ~ '^motorway|motorway_link|trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential|living_street|track|road$'] -> .w2;
way[highway = service][access !~ '^private|no$'][vehicle !~ '^private|no$'] -> .w3;
(.w2; .w3;) -> .w1;
way.w1[covered = yes] -> .w4;
way.w1[tunnel ~ '^yes|building_passage|avalanche_protector$'] -> .w5;
(.w4; .w5;) -> .w1;
way.w1[!maxheight][!'maxheight:physical'];
out meta geom;
md5-850e6b724a35fb6c051f95a50c9b3bb9
[bbox:{{bbox}}];
way[highway][access ~ '^private|no$'];
node(w) -> .private_roads;
way[railway ~ '^tram|abandoned$'];
node(w) -> .excluded_railways;
node[railway = level_crossing][!'crossing:barrier'];
(._; - .private_roads; );
(._; - .excluded_railways; );
out meta geom;
md5-b3fae9e950094a6ef6828428edc2b295
nodes with amenity=post_box and !collection_times
and collection_times:signed != no and access !~ private|no
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[amenity = post_box][!collection_times]['collection_times:signed' != no][access !~ '^private|no$'];
out meta geom;
md5-535072d2ca06c43c54bb437470be62c3
nodes, ways, relations with
(
shop and shop !~ no|vacant
or amenity = bicycle_parking and bicycle_parking = building
or amenity = parking and parking = multi-storey
or amenity = recycling and recycling_type = centre
or tourism = information and information = office
or amenity ~ restaurant|cafe|ice_cream|fast_food|bar|pub|biergarten|food_court|nightclub|cinema|planetarium|casino|library|townhall|courthouse|embassy|community_centre|youth_centre|bank|bureau_de_change|money_transfer|post_office|marketplace|internet_cafe|car_wash|car_rental|boat_rental|fuel|dentist|doctors|clinic|pharmacy|veterinary
or tourism ~ zoo|aquarium|theme_park|gallery|museum
or leisure ~ fitness_centre|dance|golf_course|water_park|miniature_golf|bowling_alley|horse_riding|amusement_arcade|adult_gaming_centre|tanning_salon
or office ~ insurance|government|travel_agent|tax_advisor|religion|employment_agency
or craft ~ carpenter|shoemaker|tailor|photographer|dressmaker|electronics_repair|key_cutter|stonemason
)
and !opening_hours and name and opening_hours:signed != no
and (access !~ private|no)
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
nwr[shop][shop !~ '^no|vacant$'] -> .e2;
nwr[amenity = bicycle_parking][bicycle_parking = building] -> .e3;
nwr[amenity = parking][parking = 'multi-storey'] -> .e4;
nwr[amenity = recycling][recycling_type = centre] -> .e5;
nwr[tourism = information][information = office] -> .e6;
nwr[amenity ~ '^restaurant|cafe|ice_cream|fast_food|bar|pub|biergarten|food_court|nightclub|cinema|planetarium|casino|library|townhall|courthouse|embassy|community_centre|youth_centre|bank|bureau_de_change|money_transfer|post_office|marketplace|internet_cafe|car_wash|car_rental|boat_rental|fuel|dentist|doctors|clinic|pharmacy|veterinary$'] -> .e7;
nwr[tourism ~ '^zoo|aquarium|theme_park|gallery|museum$'] -> .e8;
nwr[leisure ~ '^fitness_centre|dance|golf_course|water_park|miniature_golf|bowling_alley|horse_riding|amusement_arcade|adult_gaming_centre|tanning_salon$'] -> .e9;
nwr[office ~ '^insurance|government|travel_agent|tax_advisor|religion|employment_agency$'] -> .e10;
nwr[craft ~ '^carpenter|shoemaker|tailor|photographer|dressmaker|electronics_repair|key_cutter|stonemason$'] -> .e11;
(.e2; .e3; .e4; .e5; .e6; .e7; .e8; .e9; .e10; .e11;) -> .e1;
nwr.e1[!opening_hours][name]['opening_hours:signed' != no][access !~ '^private|no$'];
out meta geom;
md5-f5ce92707aaa83a89bd3654461a8a5e0
nodes, ways with amenity=bicycle_parking and !capacity and access !~ private|no
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[amenity = bicycle_parking][!capacity][access !~ '^private|no$'] -> .n1;
way[amenity = bicycle_parking][!capacity][access !~ '^private|no$'] -> .w1;
(.n1; .w1;);
out meta geom;
md5-7d296c2b867ff0f1bbe160703391a8bd
ways, relations with landuse = orchard and !trees and !produce and !crop
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
way[landuse = orchard][!trees][!produce][!crop] -> .w1;
rel[landuse = orchard][!trees][!produce][!crop] -> .r1;
(.w1; .r1;);
out meta geom;
md5-ded1e5bf18ed4401b5200699b45c0d59
[bbox:{{bbox}}];
way[highway ~ '^(primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified)$'][area != yes][motorroad != yes][!cycleway][!'cycleway:left'][!'cycleway:right'][!'cycleway:both'][!'sidewalk:bicycle'][!'sidewalk:both:bicycle'][!'sidewalk:left:bicycle'][!'sidewalk:right:bicycle'][maxspeed !~ '^(20|15|10|8|7|6|5|10 mph|5 mph|walk)$'][surface !~ '^(unpaved|compacted|gravel|fine_gravel|pebblestone|grass_paver|ground|earth|dirt|grass|sand|mud|ice|salt|snow|woodchips)$'][bicycle != no][access !~ '^private|no$'][bicycle != use_sidepath]['bicycle:backward' != use_sidepath]['bicycle:forward' != use_sidepath] -> .streets;
(
way[highway=cycleway](around.streets: 15);
way[highway ~ '^(path|footway)$'](around.streets: 15);
) -> .cycleways;
way.streets(around.cycleways: 15) -> .streets_near_cycleways;
(.streets; - .streets_near_cycleways;);
out meta geom;
md5-009178e44173c74b45f6c50f826f2d23
[bbox:{{bbox}}];
way[highway ~ '^(primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|residential)$'][area != yes][motorroad != yes][!sidewalk][!'sidewalk:left'][!'sidewalk:right'][!'sidewalk:both'][maxspeed !~ '^(8|7|6|5|5 mph|walk)$'][surface !~ '^(unpaved|compacted|gravel|fine_gravel|pebblestone|grass_paver|ground|earth|dirt|grass|sand|mud|ice|salt|snow|woodchips)$'][lit = yes][foot != no][access !~ '^private|no$'][foot != use_sidepath] -> .streets;
way[highway ~ '^(path|footway|cycleway)$'](around.streets: 15) -> .ways;
way.streets(around.ways: 15) -> .streets_near_ways;
(.streets; - .streets_near_ways;);
out meta geom;
md5-aef7aa7cc399c9613ebf04fc6f780f68
ways with (
~'sidewalk(:both)?' ~ none|no or
(sidewalk:left ~ none|no and sidewalk:right ~ none|no)
)
and !foot
and access !~ private|no
and motorroad != yes and highway ~ trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified and surface ~ paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone and ( oneway~yes|-1 or bridge=yes or tunnel=yes or bicycle~no|use_sidepath or lit=yes )
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
way[~'^sidewalk(:both)?$' ~ '^none|no$'] -> .w2;
way['sidewalk:left' ~ '^none|no$']['sidewalk:right' ~ '^none|no$'] -> .w3;
(.w2; .w3;) -> .w1;
way.w1[!foot][access !~ '^private|no$'][motorroad != yes][highway ~ '^trunk|trunk_link|primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified$'][surface ~ '^paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone$'] -> .w1;
way.w1[oneway ~ '^yes|-1$'] -> .w4;
way.w1[bridge = yes] -> .w5;
way.w1[tunnel = yes] -> .w6;
way.w1[bicycle ~ '^no|use_sidepath$'] -> .w7;
way.w1[lit = yes] -> .w8;
(.w4; .w5; .w6; .w7; .w8;);
out meta geom;
md5-14e4bd06710b3c858406d18c5c947ffb
nodes with highway=crossing and !crossing
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[highway = crossing][!crossing];
out meta geom;
md5-fea3975a24063d370b8c34b3a34a48ca
ways, relations with
building ~ house|residential|apartments|detached|terrace|dormitory|semi|semidetached_house|bungalow|school|civic|college|university|public|hospital|kindergarten|transportation|train_station|hotel|retail|commercial|office|warehouse|industrial|manufacture|parking|farm|farm_auxiliary|barn|cabin
and !building:levels and !height and !building:height
and !man_made and location!=underground and ruins!=yes
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
way[building ~ '^house|residential|apartments|detached|terrace|dormitory|semi|semidetached_house|bungalow|school|civic|college|university|public|hospital|kindergarten|transportation|train_station|hotel|retail|commercial|office|warehouse|industrial|manufacture|parking|farm|farm_auxiliary|barn|cabin$'][!'building:levels'][!height][!'building:height'][!man_made][location != underground][ruins != yes] -> .w1;
rel[building ~ '^house|residential|apartments|detached|terrace|dormitory|semi|semidetached_house|bungalow|school|civic|college|university|public|hospital|kindergarten|transportation|train_station|hotel|retail|commercial|office|warehouse|industrial|manufacture|parking|farm|farm_auxiliary|barn|cabin$'][!'building:levels'][!height][!'building:height'][!man_made][location != underground][ruins != yes] -> .r1;
(.w1; .r1;);
out meta geom;
md5-ed9e9003c45b60fb373fa438c56f0ddc
nodes with
((public_transport = platform and ~bus|trolleybus|tram ~ yes)
or
(highway = bus_stop and public_transport != stop_position))
and !shelter and !covered
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[public_transport = platform][~'^bus|trolleybus|tram$' ~ '^yes$'] -> .n2;
node[highway = bus_stop][public_transport != stop_position] -> .n3;
(.n2; .n3;) -> .n1;
node.n1[!shelter][!covered];
out meta geom;
md5-0639fa0afa1589bc26ba52a1068af623
nodes, ways with amenity ~ restaurant|cafe|fast_food
and name and !diet:vegetarian
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[amenity ~ '^restaurant|cafe|fast_food$'][name][!'diet:vegetarian'] -> .n1;
way[amenity ~ '^restaurant|cafe|fast_food$'][name][!'diet:vegetarian'] -> .w1;
(.n1; .w1;);
out meta geom;
md5-c06c876739f400611651cbc94d4d47be
nodes, ways with amenity ~ restaurant|cafe|fast_food
and name and diet:vegetarian ~ yes|only and !diet:vegan
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[amenity ~ '^restaurant|cafe|fast_food$'][name]['diet:vegetarian' ~ '^yes|only$'][!'diet:vegan'] -> .n1;
way[amenity ~ '^restaurant|cafe|fast_food$'][name]['diet:vegetarian' ~ '^yes|only$'][!'diet:vegan'] -> .w1;
(.n1; .w1;);
out meta geom;
md5-c29b17b1badb640ea0f17eecb69ccd21
nodes, ways, relations with (amenity=library or tourism ~ hotel|guest_house|hostel|motel)
and !internet_access and !wifi and name
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
nwr[amenity = library] -> .e2;
nwr[tourism ~ '^hotel|guest_house|hostel|motel$'] -> .e3;
(.e2; .e3;) -> .e1;
nwr.e1[!internet_access][!wifi][name];
out meta geom;
md5-8513be8646061c4c9f848fe0e4573a0a
nodes, ways, relations with
amenity = parking and !fee and !fee:conditional and
access ~ yes|customers|public
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
nwr[amenity = parking][!fee][!'fee:conditional'][access ~ '^yes|customers|public$'];
out meta geom;
md5-fec57df14586ecf3e31a8b08360b795e
nodes, ways with amenity=motorcycle_parking and !capacity and access !~ private|no
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[amenity = motorcycle_parking][!capacity][access !~ '^private|no$'] -> .n1;
way[amenity = motorcycle_parking][!capacity][access !~ '^private|no$'] -> .w1;
(.n1; .w1;);
out meta geom;
md5-0da8aeea758b15f15e7d46473ac1c632
ways with highway ~ path|footway|cycleway|bridleway|steps
and !surface and access !~ private|no
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
way[highway ~ '^path|footway|cycleway|bridleway|steps$'][!surface][access !~ '^private|no$'];
out meta geom;
md5-5b94d28ae5334e4c6bedd6a524d1a715
ways with highway=track and !tracktype
and (access !~ private|no or (foot and foot !~ private|no))
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
way[highway = track][!tracktype] -> .w1;
way.w1[access !~ '^private|no$'] -> .w2;
way.w1[foot][foot !~ '^private|no$'] -> .w3;
(.w2; .w3;);
out meta geom;
md5-d0de01142e9088bc29c0c5b11ef4abd2
[bbox:{{bbox}}];(way[landuse=forest][!leaf_type](if: length()<700.0);
relation[landuse=forest][!leaf_type](if: length()<700.0);
way[natural=wood][!leaf_type](if: length()<700.0);
relation[natural=wood][!leaf_type](if: length()<700.0);
);out meta geom;
md5-ee7d2d5651242a402c5baf078201f5c9
nodes, ways with amenity=bicycle_parking and access !~ private|no and !bicycle_parking
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[amenity = bicycle_parking][access !~ '^private|no$'][!bicycle_parking] -> .n1;
way[amenity = bicycle_parking][access !~ '^private|no$'][!bicycle_parking] -> .w1;
(.n1; .w1;);
out meta geom;
md5-65986b4ee18db1356f61bf6e369b19c8
nodes, ways with amenity=toilets and access !~ private|customers and !wheelchair
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[amenity = toilets][access !~ '^private|customers$'][!wheelchair] -> .n1;
way[amenity = toilets][access !~ '^private|customers$'][!wheelchair] -> .w1;
(.n1; .w1;);
out meta geom;
md5-ffd53d6a87e26fd49e93b8ebcc03252c
nodes, ways, relations with leisure = playground and (!access or access = unknown)
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
nwr[leisure = playground] -> .e1;
nwr.e1[!access] -> .e2;
nwr.e1[access = unknown] -> .e3;
(.e2; .e3;);
out meta geom;
md5-c2b0d8cb60219db826586a34ad772974
nodes, ways, relations with
(
shop and shop !~ no|vacant
or amenity = parking and parking = multi-storey
or amenity = recycling and recycling_type = centre
or tourism = information and information = office
or amenity ~ restaurant|cafe|ice_cream|fast_food|bar|pub|biergarten|food_court|nightclub|cinema|library|theatre|arts_centre|casino|conference_centre|bank|bureau_de_change|money_transfer|post_office|internet_cafe|marketplace|police|ranger_station|courthouse|embassy|townhall|community_centre|youth_centre|car_wash|car_rental|fuel|driving_school|doctors|clinic|pharmacy|veterinary|dentist|place_of_worship
or tourism ~ zoo|aquarium|theme_park|gallery|attraction|viewpoint|museum|hotel|guest_house|hostel|motel|apartment|chalet
or leisure ~ golf_course|water_park|miniature_golf|dance|bowling_alley|horse_riding|sports_centre|fitness_centre|amusement_arcade|adult_gaming_centre|tanning_salon
or office ~ insurance|government|travel_agent|tax_advisor|religion|employment_agency|lawyer|estate_agent|political_party|therapist
or craft ~ carpenter|shoemaker|tailor|photographer|dressmaker|electronics_repair|key_cutter|stonemason|winery
) and !wheelchair and name
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
nwr[shop][shop !~ '^no|vacant$'] -> .e2;
nwr[amenity = parking][parking = 'multi-storey'] -> .e3;
nwr[amenity = recycling][recycling_type = centre] -> .e4;
nwr[tourism = information][information = office] -> .e5;
nwr[amenity ~ '^restaurant|cafe|ice_cream|fast_food|bar|pub|biergarten|food_court|nightclub|cinema|library|theatre|arts_centre|casino|conference_centre|bank|bureau_de_change|money_transfer|post_office|internet_cafe|marketplace|police|ranger_station|courthouse|embassy|townhall|community_centre|youth_centre|car_wash|car_rental|fuel|driving_school|doctors|clinic|pharmacy|veterinary|dentist|place_of_worship$'] -> .e6;
nwr[tourism ~ '^zoo|aquarium|theme_park|gallery|attraction|viewpoint|museum|hotel|guest_house|hostel|motel|apartment|chalet$'] -> .e7;
nwr[leisure ~ '^golf_course|water_park|miniature_golf|dance|bowling_alley|horse_riding|sports_centre|fitness_centre|amusement_arcade|adult_gaming_centre|tanning_salon$'] -> .e8;
nwr[office ~ '^insurance|government|travel_agent|tax_advisor|religion|employment_agency|lawyer|estate_agent|political_party|therapist$'] -> .e9;
nwr[craft ~ '^carpenter|shoemaker|tailor|photographer|dressmaker|electronics_repair|key_cutter|stonemason|winery$'] -> .e10;
(.e2; .e3; .e4; .e5; .e6; .e7; .e8; .e9; .e10;) -> .e1;
nwr.e1[!wheelchair][name];
out meta geom;
md5-26363a987ab59ece1cc0600dd0981596
nodes, ways with
( (shop ~ mall|department_store and name) or highway ~ services|rest_area )
and !toilets
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[shop ~ '^mall|department_store$'][name] -> .n2;
node[highway ~ '^services|rest_area$'] -> .n3;
(.n2; .n3;) -> .n1;
node.n1[!toilets] -> .n1;
way[shop ~ '^mall|department_store$'][name] -> .w2;
way[highway ~ '^services|rest_area$'] -> .w3;
(.w2; .w3;) -> .w1;
way.w1[!toilets] -> .w1;
(.n1; .w1;);
out meta geom;
md5-7186882e49274698e4cca213a3bad24a
ways, relations with route=ferry and !foot
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
way[route = ferry][!foot] -> .w1;
rel[route = ferry][!foot] -> .r1;
(.w1; .r1;);
out meta geom;
md5-edba9dc74b3dd0958c3742163e12e8e4
ways, relations with route=ferry and !motor_vehicle
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
way[route = ferry][!motor_vehicle] -> .w1;
rel[route = ferry][!motor_vehicle] -> .r1;
(.w1; .r1;);
out meta geom;
md5-59ede66de7892e74caaf81d915efa3ff
ways, relations with building = yes
and !man_made and !historic and !military and !power and location!=underground and ruins!=yes
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
way[building = yes][!man_made][!historic][!military][!power][location != underground][ruins != yes] -> .w1;
rel[building = yes][!man_made][!historic][!military][!power][location != underground][ruins != yes] -> .r1;
(.w1; .r1;);
out meta geom;
md5-42ad4dc6c2a6ade68cb1435beebb89af
ways with (
highway ~ residential|living_street|pedestrian
or highway ~ primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|service and (
sidewalk ~ both|left|right|yes|separate
or ~source:maxspeed|maxspeed:type|zone:maxspeed|zone:traffic ~ .+:urban
)
or highway ~ footway|cycleway|steps
or highway = path and (foot = designated or bicycle = designated)
)
and !lit
and (access !~ private|no or (foot and foot !~ private|no))
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
way[highway ~ '^residential|living_street|pedestrian$'] -> .w2;
way[highway ~ '^primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|service$'] -> .w3;
way.w3[sidewalk ~ '^both|left|right|yes|separate$'] -> .w4;
way.w3[~'^source:maxspeed|maxspeed:type|zone:maxspeed|zone:traffic$' ~ '^.+:urban$'] -> .w5;
(.w4; .w5;) -> .w3;
way[highway ~ '^footway|cycleway|steps$'] -> .w6;
way[highway = path] -> .w7;
way.w7[foot = designated] -> .w8;
way.w7[bicycle = designated] -> .w9;
(.w8; .w9;) -> .w7;
(.w2; .w3; .w6; .w7;) -> .w1;
way.w1[!lit] -> .w1;
way.w1[access !~ '^private|no$'] -> .w10;
way.w1[foot][foot !~ '^private|no$'] -> .w11;
(.w10; .w11;);
out meta geom;
md5-18169027c408289846d013d4534ee662
nodes, ways with amenity = toilets and access !~ private|customers and !fee
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[amenity = toilets][access !~ '^private|customers$'][!fee] -> .n1;
way[amenity = toilets][access !~ '^private|customers$'][!fee] -> .w1;
(.n1; .w1;);
out meta geom;
md5-f11b2d640ffa69977ef552e1595d1f6a
nodes, ways with (((amenity ~ restaurant|cafe|fuel|fast_food or shop ~ mall|department_store)
and name and toilets=yes) or amenity=toilets) and !diaper and !changing_table
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[amenity ~ '^restaurant|cafe|fuel|fast_food$'] -> .n3;
node[shop ~ '^mall|department_store$'] -> .n4;
(.n3; .n4;) -> .n2;
node.n2[name][toilets = yes] -> .n2;
node[amenity = toilets] -> .n5;
(.n2; .n5;) -> .n1;
node.n1[!diaper][!changing_table] -> .n1;
way[amenity ~ '^restaurant|cafe|fuel|fast_food$'] -> .w3;
way[shop ~ '^mall|department_store$'] -> .w4;
(.w3; .w4;) -> .w2;
way.w2[name][toilets = yes] -> .w2;
way[amenity = toilets] -> .w5;
(.w2; .w5;) -> .w1;
way.w1[!diaper][!changing_table] -> .w1;
(.n1; .w1;);
out meta geom;
md5-389959ccec83549717e043d80d43c0bb
nodes, ways with amenity=bicycle_parking and access !~ private|no and !covered
and bicycle_parking !~ shed|lockers|building
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[amenity = bicycle_parking][access !~ '^private|no$'][!covered][bicycle_parking !~ '^shed|lockers|building$'] -> .n1;
way[amenity = bicycle_parking][access !~ '^private|no$'][!covered][bicycle_parking !~ '^shed|lockers|building$'] -> .w1;
(.n1; .w1;);
out meta geom;
md5-6c70d3855e0ba2d0d8b5502041fffb19
nodes with highway = crossing and crossing = traffic_signals and !traffic_signals:sound
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[highway = crossing][crossing = traffic_signals][!'traffic_signals:sound'];
out meta geom;
md5-872e3c0280c75006088b1b82c99a8de0
ways, relations with roof:levels
and roof:levels!=0 and !roof:shape and !3dr:type and !3dr:roof
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
way['roof:levels']['roof:levels' != 0][!'roof:shape'][!'3dr:type'][!'3dr:roof'] -> .w1;
rel['roof:levels']['roof:levels' != 0][!'roof:shape'][!'3dr:type'][!'3dr:roof'] -> .r1;
(.w1; .r1;);
out meta geom;
md5-9eb28f789bbfd078623764320cdbb6a1
nodes, ways, relations with (amenity = bus_station or railway ~ station|subway_entrance)
and !wheelchair
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
nwr[amenity = bus_station] -> .e2;
nwr[railway ~ '^station|subway_entrance$'] -> .e3;
(.e2; .e3;) -> .e1;
nwr.e1[!wheelchair];
out meta geom;
md5-0d0df48b8b98765651d064d4ccde9eb3
nodes, ways, relations with leisure=dog_park and !wheelchair
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
nwr[leisure = dog_park][!wheelchair];
out meta geom;
md5-ec80401ae1b6523f556de7a0b0b37eb9
nodes, ways with
(public_transport = platform or (highway = bus_stop and public_transport != stop_position))
and !tactile_paving
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[public_transport = platform] -> .n2;
node[highway = bus_stop][public_transport != stop_position] -> .n3;
(.n2; .n3;) -> .n1;
node.n1[!tactile_paving] -> .n1;
way[public_transport = platform] -> .w2;
way[highway = bus_stop][public_transport != stop_position] -> .w3;
(.w2; .w3;) -> .w1;
way.w1[!tactile_paving] -> .w1;
(.n1; .w1;);
out meta geom;
md5-c311e006b6c82b83385845f21700871d
nodes with highway = crossing and !tactile_paving and foot != no
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[highway = crossing][!tactile_paving][foot != no];
out meta geom;
md5-ddafda0bbe4e5c350745b4791b52f17a
ways with man_made=bridge and !bridge:structure
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
way[man_made = bridge][!'bridge:structure'];
out meta geom;
md5-309960517f561e03be56afd17bf29550
nodes, ways, relations with historic=wayside_shrine and !religion and (access !~ private|no)
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
nwr[historic = wayside_shrine][!religion][access !~ '^private|no$'];
out meta geom;
md5-4bef03e3c44bd27dba20c1d44396f37b
ways with
(
(highway = path and bicycle = designated and foot = designated)
or (highway = footway and bicycle = designated)
or (highway = cycleway and foot ~ designated|yes)
)
and !segregated and area != yes
and surface ~ paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
way[highway = path][bicycle = designated][foot = designated] -> .w2;
way[highway = footway][bicycle = designated] -> .w3;
way[highway = cycleway][foot ~ '^designated|yes$'] -> .w4;
(.w2; .w3; .w4;) -> .w1;
way.w1[!segregated][area != yes][surface ~ '^paved|asphalt|cobblestone|cobblestone:flattened|sett|concrete|concrete:lanes|concrete:plates|paving_stones|metal|wood|unhewn_cobblestone$'];
out meta geom;
md5-1e790868ab3061de6ef51aca15af3fb2
[bbox:{{bbox}}];
way[building = construction](if:!is_date(t['opening_date']) || date(t['opening_date']) < date('2019-09-01T00:00:00Z')) -> .construction_with_unknown_state;
(
way[building=construction](newer: '2019-03-05T00:00:00Z');
relation[building=construction](newer: '2019-03-05T00:00:00Z');
) -> .recently_edited_construction;
(.construction_with_unknown_state; - .recently_edited_construction;) -> .buildings_under_construction_ways;
relation[building = construction](if:!is_date(t['opening_date']) || date(t['opening_date']) < date('2019-09-01T00:00:00Z')) -> .construction_with_unknown_state;
(
way[building=construction](newer: '2019-03-05T00:00:00Z');
relation[building=construction](newer: '2019-03-05T00:00:00Z');
) -> .recently_edited_construction;
(.construction_with_unknown_state; - .recently_edited_construction;) -> .buildings_under_construction_relations;
(.buildings_under_construction_ways; .buildings_under_construction_relations;);
out meta geom;
md5-29fb6564a0dc699edea56ce08e694825
ways with highway ~ path|footway|cycleway|bridleway and surface = paved and bicycle ~ designated|yes and segregated=yes
and !cycleway:surface and !surface:cycleway
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
way[highway ~ '^path|footway|cycleway|bridleway$'][surface = paved][bicycle ~ '^designated|yes$'][segregated = yes][!'cycleway:surface'][!'surface:cycleway'];
out meta geom;
md5-6e12356934856b861b1b3c709203bf6e
ways with highway ~ path|footway|cycleway|bridleway and surface = paved and foot ~ designated|yes and segregated=yes
and !footway:surface and !surface:footway
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
way[highway ~ '^path|footway|cycleway|bridleway$'][surface = paved][foot ~ '^designated|yes$'][segregated = yes][!'footway:surface'][!'surface:footway'];
out meta geom;
md5-8b5f3bd0b6a2727f4d9f9c98ad20ab2d
nodes, ways with amenity = motorcycle_parking
and access !~ private|no and !covered and motorcycle_parking !~ shed|garage_boxes|building
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[amenity = motorcycle_parking][access !~ '^private|no$'][!covered][motorcycle_parking !~ '^shed|garage_boxes|building$'] -> .n1;
way[amenity = motorcycle_parking][access !~ '^private|no$'][!covered][motorcycle_parking !~ '^shed|garage_boxes|building$'] -> .w1;
(.n1; .w1;);
out meta geom;
md5-1c2bd075b5de44b161414d0663be10fb
nodes with emergency = fire_hydrant and !fire_hydrant:type
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[emergency = fire_hydrant][!'fire_hydrant:type'];
out meta geom;
md5-a4511271b6c985e2dfef86ed4297de16
nodes, ways, relations with amenity = parking and !parking
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
nwr[amenity = parking][!parking];
out meta geom;
md5-486a1b5358552d8e3fd148d3f7331d7c
nodes with power = pole and !material
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[power = pole][!material];
out meta geom;
md5-10e106a122262c20affbaf5d962f622c
nodes, ways with amenity = car_wash and !automated and !self_service
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[amenity = car_wash][!automated][!self_service] -> .n1;
way[amenity = car_wash][!automated][!self_service] -> .w1;
(.n1; .w1;);
out meta geom;
md5-8fd19d5ceb4c79bf5f26150c0683a8cd
nodes with amenity = bench and !backrest
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[amenity = bench][!backrest];
out meta geom;
md5-2dbe01ba155fe4e58139cceb3d6a3132
nodes with highway = crossing and crossing = traffic_signals and !button_operated
md5-cc05fd501b5fb06e96e5903e513b823b
[bbox:{{bbox}}];
node[highway = crossing][crossing = traffic_signals][!button_operated];
out meta geom;
The following times are from https://overpass.maptime.in/api/ which has little load, so the times are more stable (and probably less than one can expect from the main instance). The bbox used was [bbox:53.5, 9.9, 53.6, 10.0]
Quest Type | Old Time | New Time | 😀
-----------|----------|----------|----
AddRoadName| 4.0s | 3.7s |
AddPlaceName| 23.4s | 4.4s | 🏎️
AddOneway| |
AddBusStopName| 23.8s | 1.3s | 🏎️
AddIsBuildingUnderground| 1.3s | 1.3s |
AddHousenumber| 1.8s | 1.9s |
MarkCompletedHighwayConstruction| 1.1s | 1.1s |
AddReligionToPlaceOfWorship| 1.2s | 1.2s |
AddParkingAccess| 1.8s | 1.5s |
AddRecyclingType| 1.2s | 1.1s |
AddSport| 1.6s | 1.3s |
AddRoadSurface| 1.4s | 1.3s |
AddMaxSpeed| 1.4s | 1.2s |
AddMaxHeight| 2.1s | 2.4s |
AddRailwayCrossingBarrier| 1.5s | 1.4s |
AddPostboxCollectionTimes| 1.0s | 1.0s |
AddOpeningHours| 13.4s | 5.5s | 🚗
AddBikeParkingCapacity| 0.9s | 0.9s |
AddOrchardProduce| 1.1s | 1.1s |
AddCycleway| 25.9s | 25.8s | 🐌
AddSidewalk| 31.4s | 31.4s | 🐌
AddProhibitedForPedestrians| 22.5s | 1.7s | 🏎️
AddCrossingType| 0.9s | 0.9s |
AddBuildingLevels| 1.5s | 1.5s |
AddBusStopShelter| 1.7s | 1.2s |
AddVegetarian| 1.2s | 1.2s |
AddVegan| 1.1s | 1.1s |
AddInternetAccess| 1.9s | 1.8s |
AddParkingFee| 1.4s | 1.4s |
AddMotorcycleParkingCapacity| 0.9s | 0.9s |
AddPathSurface| 1.1s | 1.1s |
AddTracktype| 1.4s | 1.1s |
AddBikeParkingType| 1.6s | 1.6s |
AddWheelChairAccessToilets| 0.9s | 1.0s |
AddPlaygroundAccess| 1.3s | 1.3s |
AddWheelchairAccessBusiness| 6.3s | 5.6s | 🚗
AddToiletAvailability| 1.5s | 1.4s |
AddFerryAccessPedestrian| 1.2s | 1.2s |
AddFerryAccessMotorVehicle| 1.3s | 1.3s |
AddBuildingType| 2.1s | 2.1s |
AddWayLit| 7.1s | 2.7s | 🚗
AddToiletsFee| 0.9s | 0.9s |
AddBabyChangingTable| 1.4s | 1.8s |
AddBikeParkingCover| 1.0s | 1.0s |
AddTrafficSignalsSound| 0.9s | 0.9s |
AddRoofShape| 1.4s | 1.4s |
AddWheelChairAccessPublicTransport| 1.7s | 1.7s |
AddWheelchairAccessOutside| 0.9s | 0.9s |
AddTactilePavingBusStop| 1.6s | 1.6s |
AddTactilePavingCrosswalk| 1.0s | 1.0s |
AddBridgeStructure| 0.9s | 0.9s |
AddReligionToWaysideShrine| 0.9s | 0.9s |
AddCyclewaySegregation| 2.4s | 1.7s | 🚗
MarkCompletedBuildingConstruction| 1.7s | 1.7s |
AddMotorcycleParkingCover| 0.8s | 0.8s |
AddFireHydrantType| 0.9s | 0.9s |
AddParkingType| 1.5s | 1.5s |
AddPowerPolesMaterial| 0.9s | 0.9s |
AddCarWashType| 0.9s | 0.9s |
AddBenchBackrest| 0.9s | 0.8s |
AddTrafficSignalsButton| 0.9s | 0.9s |
Total response time | 223s | 146s
So, this is in waiting for the response time alone, almost 1.5 minutes, or overall, 53% faster.
To summarize, the following queries are above average (of 2.4s):
Quest Type | Time
-----------|----------
AddSidewalk | 31.4s
AddCycleway | 25.8s
AddWheelcharAccessBusiness | 5.6s
AddOpeningHours | 5.5s
AddPlaceName | 4.4s
AddRoadName | 3.7s
AddWayLit | 2.7s
By the way, how come that the pull request you mentioned https://github.com/drolbr/Overpass-API/pull/167 has not been merged after more than 4 years? That's a pretty long time.
By the way, how come that the pull request you mentioned drolbr/Overpass-API#167 has not been merged after more than 4 years? That's a pretty long time.
Though, I noticed that there hasn't been any activity neither on drolbr's nor on your fork in the last year or so. Did development on overpass cease and it is considered done?
I think you're looking at the wrong branches: both https://github.com/mmd-osm/Overpass-API/commits/test759 and https://github.com/drolbr/Overpass-API/tree/minor_issues have activity this year. So no, we're not yet done...
Good to hear :-)
I was looking on GitHub at https://github.com/mmd-osm/Overpass-API/graphs/contributors
and https://github.com/mmd-osm/Overpass-API/branches/active , apparently activity on branches is not counted properly.
By the way, which bbox did you use for AddSidewalk and AddCycleway? I can do a quick retest on our dev instance, to see where would be at with additional patches in place.
AddWheelchairAccessBuisness is also above average, just pointing this out
@mmd-osm I used [bbox:50.1289423,18.7158966,50.4522579,19.3167114]
Maybe I'm missing something here. I'm unable to reproduce those runtime measurements. AddSidewalk runs for several minutes here: https://overpass-turbo.eu/s/Lna - Even on the dev instance this query takes 53s, using optimizations that aren't available elsewhere.
Are you maybe splitting the bbox into smaller chunks and send several requests instead?
Oh, I am sorry, I told you the wrong bbox! The bbox used in the tests above is actually the city center of Hamburg, 53.5, 9.9, 53.6, 10.0, here is the code.
Thanks, AddSidewalk currently takes 1s on the dev instance with the new bbox. Let's see how we can move those changes into master branch over time.
Wow, that's pretty cool!
That, together with my optimizations, would make the whole process take only 40% of the time (or in other words, makes it 150% faster) than it does at the moment.
By the way, do you know who hosts https://overpass.maptime.in/api/ ? I would like to ask, if it is okay to add it to StreetComplete's alternative overpass servers list
AFAIK it was set up for OSMCha by the Mapbox team in India. I don't know exactly if the team is stilll around or who currently maintains the box. I think @willemarcel should have more details.
I did the above performance test also on other servers, the results are:
Overpass server | Total response time for downloading all quests
-----|-----
maptime.in | 146s
kumi systems | 248s
lz4.overpass-api.de | 304s
z.overpass-api.de | 795s (+ 595s waiting for quota = 1390s)
So even simply switching away from the default overpass instance, of which at least z.overpass-api.de seems to be hopelessly overloaded, will lead to a massive time reduction in download. Something between 3x to 6x faster.
Is it "ok" to use lz4.overpass-api.de as the default server, or may the server name change any time or is otherwise only intended to be used behind the load balancer? z.overpass-api.de seems to be the only server that imposes a quota on the requests.
lz4 has seen a massive increase in load during the last two weeks and has higher than expected response times., z.* uses a slower compression, and is expected to be slower. one of the 4 kumi boxes lags behind by 7 years, another one is currently unavailable.
overpass-api.de uses DNS round robin rather than a load balancer, i.e. the server has two DNS entries, one pointing to the z.* IP address, the other one to lz4.*. And yes, this might change...
I think both servers have rate limiting in place: http://lz4.overpass-api.de/api/status
I figure they have both rate limiting in place, but the test did not run into any rate limiting, I guess because it is has enough free capacities.
So, can you confirm that lz4 may be used and is also intended to be used directly, without the DNS round robin / load balancer in between? Not querying the overloaded server every ~second time would already increase the speed the quests are downloaded three-fold.
StreetComplete always correctly sets the user agent for every request it makes. Can it be ascertained from munin or other statistics for how many % of requests / for how much load the app is actually responsible for?
can you confirm that lz4 may be used and is also intended to be used directly, without the DNS round robin / load balancer in between?
If you manage a list of servers in your app and fall back to other servers if one turns out to be unavailable, that should be ok. Ideally, that would be part of some configuration that won't require users to download a new version of the app, in case some changes are needed.
I can't really help with the question re. production, you need to get in touch with Roland by email.
So may I use the queries from https://github.com/westnordost/StreetComplete/issues/1514#issuecomment-518362266 for updating the wiki now?
Absolutely! I ran the script again in case there were small changes and changed my comment above.
You can also run the program later in case things get changed or new quests added. It is a simple Java program that prints all the things. To run it yourself in Android Studio, just press this button:

If you change your script a bit, you can create a wiki page with links to overpass turbo: https://wiki.openstreetmap.org/wiki/User:Mmd/Test_SC
(btw: dev branch runs all queries in 24s)
Cool, nice Page!
@rugk keeps links to all the overpass queries on this page https://wiki.openstreetmap.org/wiki/StreetComplete/Quests
What, you mean, all of them together in 24s??
Yeah, I know this page, I thought it might be easier to just generate the content based on the existing quests in the code.
That’s the “Total response time for downloading all quests” as before.
How can the dev instance be 12 times faster than lz4?
It runs a different fork/branch with performance fixes.
That's pretty incredible
On September 17, 2019 7:22:04 AM GMT+02:00, mmd notifications@github.com wrote:
It runs a different codeline with performance fixes.
It runs a different fork/branch with performance fixes.
So would not it be useful to contribute these back upstream? 😄
Sure, that’s ongoing...
I've noticed that in the resulting regular expression syntax, some have the ORs in parentheses, most don't. For example, AddRoadName has both "^(primary|secondary|tertiary|unclassified|residential|living_street|pedestrian)$" and '^private|no$', and AddCycleway has them explicitly but AddWheelchairAccessBusiness doesn't have them. Is there a benefit to including the parentheses or detriment to avoiding them?
Hm, I think ^private|no$ may be a problem. Did you find it only in AddRoadName, or in other places as well?
See https://regexper.com/#%5Eprivate%7Cno%24
Right, the overpass query was generated without the parentheses. Should be fixed now.
Anyhow, a big thanks for noticing and notifying me about it! That's quite a big bug!
Testing the AddRoadName query I am surprised that Overpass Turbo actually highlights me the streets with names and not _without_ ones…
NB: It seems this is entirely unrelated to the Performance optimization in this issue. The original queries already had the same issue. As an example: https://github.com/westnordost/StreetComplete/commit/6d234a438021288d7334f2b004dbe3016063cf46
Thanks. Any possibility if you could yet again update the final syntax?
Most helpful comment
Sure, that’s ongoing...