diff --git a/ohsome_quality_api/topics/presets.yaml b/ohsome_quality_api/topics/presets.yaml index cc67bbb6c..8be6f763a 100644 --- a/ohsome_quality_api/topics/presets.yaml +++ b/ohsome_quality_api/topics/presets.yaml @@ -152,7 +152,7 @@ cycleway: endpoint: elements aggregation_type: length filter: >- - (cycleway=* and cycleway!=no) + ((cycleway=* and cycleway!=no) or (cycleway:both=*) or (cycleway:right=*) or (cycleway:left=*) @@ -164,7 +164,7 @@ cycleway: or (highway=cycleway) or (highway=path and bicycle=designated) or (bicycle_road=yes) - or (cyclestreet=yes) + or (cyclestreet=yes)) and geometry:line indicators: - mapping-saturation @@ -181,8 +181,8 @@ power_lines: endpoint: elements aggregation_type: length filter: >- - (power=line) - or (power=minor_line) + ((power=line) + or (power=minor_line)) and geometry:line indicators: - attribute-completeness @@ -200,7 +200,7 @@ power_substations: endpoint: elements aggregation_type: count filter: >- - power=substation + power=substation and (type:way or type:node) indicators: - attribute-completeness - mapping-saturation @@ -215,7 +215,6 @@ footpath: description: >- All linear OSM features commonly used for walking, including dedicated pedestrian paths, shared-use paths, and roads where foot traffic is allowed or sidewalks exist. - endpoint: elements aggregation_type: length filter: >- @@ -247,7 +246,7 @@ poi: aggregation_type: count source: https://github.com/GIScience/openpoiservice/blob/master/openpoiservice/server/categories/categories.yml filter: >- - (aeroway in (aerodrome, helipad, heliport)) + ((aeroway in (aerodrome, helipad, heliport)) or (amenity in (animal_boarding, animal_shelter, arts_centre, atm, baby_hatch, bank, bar, bbq, bench, bicycle_parking, bicycle_rental, bicycle_repair_station, biergarten, boat_sharing, brothel, bureau_de_change, bus_station, bus_stop, cafe, car_sharing, car_wash, casino, charging_station, cinema, clinic, clock, college, @@ -293,7 +292,8 @@ poi: tyres, variety_store, video, video_games, watches, weapons, wine, pet)) or (tourism in (alpine_hut, apartment, aquarium, artwork, attraction, camp_site, caravan_site, chalet, gallery, museum, guest_house, hostel, hotel, motel, picnic_site, theme_park, viewpoint, - wilderness_hut, zoo)) + wilderness_hut, zoo))) + and (type:way or type:node) indicators: - mapping-saturation - currentness @@ -307,7 +307,7 @@ schools: description: Count of schools. endpoint: elements aggregation_type: count - filter: amenity=school + filter: amenity=school and (type:way or type:node) source: https://wiki.openstreetmap.org/wiki/Tag:amenity%3Dschool indicators: - mapping-saturation @@ -324,7 +324,7 @@ kindergarten: description: Count of kindergartens. endpoint: elements aggregation_type: count - filter: amenity=kindergarten + filter: amenity=kindergarten and (type:way or type:node) source: https://wiki.openstreetmap.org/wiki/Tag:amenity%3Dkindergarten indicators: - mapping-saturation @@ -340,7 +340,7 @@ clinics: description: Count of clinics. endpoint: elements aggregation_type: count - filter: amenity=clinic or healthcare=clinic + filter: (amenity=clinic or healthcare=clinic) and (type:way or type:node) source: https://wiki.openstreetmap.org/wiki/Global_Healthsites_Mapping_Project indicators: - mapping-saturation @@ -356,7 +356,7 @@ doctors: description: Count of doctors. endpoint: elements aggregation_type: count - filter: amenity=doctors or healthcare=doctor + filter: (amenity=doctors or healthcare=doctor) and (type:way or type:node) source: https://wiki.openstreetmap.org/wiki/Global_Healthsites_Mapping_Project indicators: - mapping-saturation @@ -372,7 +372,7 @@ bus-stops: description: Count of bus stops. endpoint: elements aggregation_type: count - filter: highway=bus_stop + filter: highway=bus_stop and type:node source: https://wiki.openstreetmap.org/wiki/Tag:highway%3Dbus_stop indicators: - mapping-saturation @@ -388,7 +388,7 @@ tram-stops: description: Count of tram stops. endpoint: elements aggregation_type: count - filter: railway=tram_stop + filter: railway=tram_stop and type:node source: https://wiki.openstreetmap.org/wiki/Tag:railway%3Dtram_stop indicators: - mapping-saturation @@ -404,7 +404,7 @@ public-transport-stops: description: Count of public transport stops. endpoint: elements aggregation_type: count - filter: public_transport=platform + filter: public_transport=platform and (type:way or type:node) indicators: - mapping-saturation - currentness @@ -419,7 +419,7 @@ subway-stations: description: Count of subway stops. endpoint: elements aggregation_type: count - filter: station=subway + filter: station=subway and (type:way or type:node) source: https://wiki.openstreetmap.org/wiki/Tag:station%3Dsubway indicators: - mapping-saturation @@ -435,7 +435,7 @@ supermarkets: description: Count of supermarkets. endpoint: elements aggregation_type: count - filter: shop=supermarket or shop=convenience + filter: (shop=supermarket or shop=convenience) and (type:way or type:node) source: https://wiki.openstreetmap.org/wiki/Tag:shop%3Dsupermarket indicators: - mapping-saturation @@ -451,7 +451,7 @@ marketplaces: description: Count of marketplaces. endpoint: elements aggregation_type: count - filter: amenity=marketplace + filter: amenity=marketplace and (type:way or type:node) source: https://wiki.openstreetmap.org/wiki/Tag:amenity%3Dmarketplace indicators: - mapping-saturation @@ -467,7 +467,7 @@ parks: description: Count of parks. endpoint: elements aggregation_type: count - filter: leisure=park + filter: leisure=park and (type:way or type:node) source: https://wiki.openstreetmap.org/wiki/Tag:leisure%3Dpark indicators: - mapping-saturation @@ -483,7 +483,7 @@ sports-pitch: description: Count of sports pitches (an area designed for practising a particular sport). endpoint: elements aggregation_type: count - filter: leisure=pitch + filter: leisure=pitch and (type:way or type:node) source: https://wiki.openstreetmap.org/wiki/Tag:leisure%3Dpitch indicators: - mapping-saturation @@ -499,7 +499,7 @@ forests: description: Count of forests. endpoint: elements aggregation_type: count - filter: landuse=forest + filter: landuse=forest and geometry:polygon source: https://wiki.openstreetmap.org/wiki/Forest indicators: - mapping-saturation @@ -543,7 +543,7 @@ fitness-centres: description: Count of fitness centres. endpoint: elements aggregation_type: count - filter: leisure in (fitness_centre, sports_centre) + filter: leisure in (fitness_centre, sports_centre) and (type:way or type:node) source: https://wiki.openstreetmap.org/wiki/Gym_/_Fitness_centre indicators: - mapping-saturation @@ -559,7 +559,7 @@ fire-stations: description: Count of firestations. endpoint: elements aggregation_type: count - filter: amenity=fire_station + filter: amenity=fire_station and (type:way or type:node) source: https://wiki.openstreetmap.org/wiki/Tag:amenity%3Dfire_station indicators: - mapping-saturation @@ -574,7 +574,7 @@ hospitals: description: Count of hospitals. endpoint: elements aggregation_type: count - filter: amenity=hospital or healthcare=hospital + filter: (amenity=hospital or healthcare=hospital) and (type:way or type:node) source: https://wiki.openstreetmap.org/wiki/Tag:amenity%3Dhospital indicators: - mapping-saturation @@ -596,10 +596,10 @@ roads-unicef: aggregation_type: length filter: >- highway in (motorway, motorway_link, motorroad, trunk, trunk_link, primary, primary_link, secondary, secondary_link, - tertiary, tertiary_link, unclassified, residential, living_street, service, road, track) + tertiary, tertiary_link, unclassified, residential, living_street, service, road, track) and geometry:line ratio_filter: >- (highway in (motorway, motorway_link, motorroad, trunk, trunk_link, primary, primary_link, secondary, - secondary_link, tertiary, tertiary_link, unclassified, residential, living_street, service, road, track)) and name=* + secondary_link, tertiary, tertiary_link, unclassified, residential, living_street, service, road, track)) and name=* and geometry:line source: https://heigit.atlassian.net/wiki/spaces/GIS/pages/756645935/2024-10-01+Unicef+education+access indicators: - mapping-saturation @@ -615,7 +615,7 @@ healthcare-primary: description: Count of hospitals. endpoint: elements aggregation_type: count - filter: amenity in (clinic, doctors, health_post) or healthcare in (clinic, doctors, doctor, midwife, nurse, center) + filter: (amenity in (clinic, doctors, health_post) or healthcare in (clinic, doctors, doctor, midwife, nurse, center)) and (type:way or type:node) source: https://heigit.atlassian.net/wiki/spaces/GIS/pages/756645935/2024-10-01+Unicef+education+access indicators: - mapping-saturation @@ -755,7 +755,7 @@ local-food-shops: description: Count of local food shops. endpoint: elements aggregation_type: count - filter: shop=bakery or shop=butcher or shop=greengrocer or shop=seafood or shop=cheese or shop=dairy + filter: (shop=bakery or shop=butcher or shop=greengrocer or shop=seafood or shop=cheese or shop=dairy) and (type:way or type:node) indicators: - mapping-saturation - currentness @@ -768,7 +768,7 @@ fast-food-restaurants: description: Count of fast food restaurants. endpoint: elements aggregation_type: count - filter: amenity=fast_food + filter: amenity=fast_food and (type:way or type:node) indicators: - mapping-saturation - currentness @@ -781,7 +781,7 @@ restaurants: description: Count of restaurants. endpoint: elements aggregation_type: count - filter: amenity=restaurant or amenity=cafe + filter: (amenity=restaurant or amenity=cafe) and (type:way or type:node) indicators: - mapping-saturation - currentness @@ -794,7 +794,7 @@ convenience-stores: description: Count of convenience stores. endpoint: elements aggregation_type: count - filter: shop=convenience + filter: shop=convenience and (type:way or type:node) indicators: - mapping-saturation - currentness @@ -807,7 +807,7 @@ pubs-and-biergartens: description: Count of pubs and biergartens. endpoint: elements aggregation_type: count - filter: amenity=pub or amenity=biergarten or amenity=bar + filter: (amenity=pub or amenity=biergarten or amenity=bar) and (type:way or type:node) indicators: - mapping-saturation - currentness @@ -820,7 +820,7 @@ alcohol-and-beverages: description: Count of shops selling alcohol. endpoint: elements aggregation_type: count - filter: shop=alcohol or shop=beverages + filter: (shop=alcohol or shop=beverages) and (type:way or type:node) indicators: - mapping-saturation - currentness @@ -833,7 +833,7 @@ sweets-and-pasteries: description: Count of shops selling sweets and pastries. endpoint: elements aggregation_type: count - filter: shop=pastry or amenity=ice_cream or shop=confectionery + filter: (shop=pastry or amenity=ice_cream or shop=confectionery) and (type:way or type:node) indicators: - mapping-saturation - currentness diff --git a/tests/integrationtests/fixtures/vcr_cassettes/indicators/test_currentness.yaml b/tests/integrationtests/fixtures/vcr_cassettes/indicators/test_currentness.yaml index b152a9bf8..53bb56e12 100644 --- a/tests/integrationtests/fixtures/vcr_cassettes/indicators/test_currentness.yaml +++ b/tests/integrationtests/fixtures/vcr_cassettes/indicators/test_currentness.yaml @@ -2823,4 +2823,84 @@ interactions: status: code: 404 message: Not Found +- request: + body: filter=station%3Dsubway+and+%28type%3Away+or+type%3Anode%29&bpolys=%7B%22type%22%3A+%22FeatureCollection%22%2C+%22features%22%3A+%5B%7B%22type%22%3A+%22Feature%22%2C+%22geometry%22%3A+%7B%22type%22%3A+%22MultiPolygon%22%2C+%22coordinates%22%3A+%5B%5B%5B%5B7.818124%2C+13.859122%5D%2C+%5B7.835312%2C+13.859122%5D%2C+%5B7.835312%2C+13.872538%5D%2C+%5B7.818124%2C+13.872538%5D%2C+%5B7.818124%2C+13.859122%5D%5D%5D%5D%7D%2C+%22properties%22%3A+%7B%7D%7D%5D%7D&time=2008-08-20%2F2025-08-01%2FP1M&contributionType=geometryChange%2Ccreation%2CtagChange + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '545' + content-type: + - application/x-www-form-urlencoded + host: + - api.ohsome.org + user-agent: + - ohsome-quality-api/1.12.0 + method: POST + uri: https://api.ohsome.org/v1/contributions/latest/count + response: + body: + string: !!binary | + H4sIAAAAAAAA/6yby04UURgG9z7FZNZcug834R2MC4kLjQs0rUwC9KSnMRrCA/kaPpnDoG6sL56T + VDIbyKFqfha1+x5eLBbLq3meVh/v59V4t1xcLB62v9v+9n66efppeT3P683F4eF4vRlvh4Nx+nL4 + aVx/n1ZfrufNcu/58Tx8m3evf/5YvF4Pd2/maRjmV1frxafx7pk+Tpvl9vHj3k65Xr0dps1v47I/ + 6LuD4x1sOQ2b+5sd7P2fr/J5Gm8vV7fDZr66Xe/+oHTdy/3tp3SXXXex+7z7+11GenuOb79e3dwP + T6+6g2735f6nZAwq+05RBgwre0fJGFYWR8kYUJ7vd8aVEcNK48qIYeWRo2QMK48dJWNYeeIoGcPK + U0fJGFaeOUrGsJLj2Kysbuy509iIQaXS2IhhpVOf+saeO42NmH+V23+H0diMYaVwZcawUmhsxrBS + aGzGsFJobMawUmhsxrBSaGzGsFJobMawUmhsxqDSaGzGsNKpT3Vjn9469alvbO80NmJYaVwZMaw0 + GhsxrDQaGzGsNBobMaw0GhsxrDQaGzGsNBobMaw0GhsxqFQaGzGsdOpT39jeaWzEgLI4jY0YVhpX + RgwrjcZGDCuNxkYMK43GRgwrjcZGDCuNxkYMK43GRgwrjcZGDCqVxkYMK5361De2OI2NGFAeOY2N + GFYaV0YMK43GRgwrjcZGDCuNxkYMK43GRgwrjcZGDCuNxkYMK43GRgwqlcZGDCud+tQ39shpbMSA + 8thpbMSw0rgyYlhpNDZiWGk0NmJYaTQ2YlhpNDZiWGk0NmJYaTQ2YlhpNDZiUKk0NmJY6dSnvrHH + TmMjBpQnTmMjhpXGlRHDSqOxEcNKo7ERw0qjsRHDSqOxEcNKo7ERw0qjsRHDSqOxEYNKpbERw0qn + PvWNPXEaGzGgPHUaGzGsNK6MGFYajY0YVhqNjRhWGo2NGFYajY0YVhqNjRhWGo2NGFYajY0YVCqN + jRhWOvWpb+yp09iIAeWZ09iIYaVxZcSw0mhsxLDSaGzEsNJobMSw0mhsxLDSaGzEsNJobMSw0mhs + xKBSaWzEsNKpT31jz5zGRgwoXzqNjRhWGldGDCuNxkYMK43GRgwrjcZGDCuNxkYMK43GRgwrjcY2 + 7Lx6Z+eVMahUGtuw8+qdnVfGsNKpT31jnZ1XxrDSuLJh59U7O6+MYaXR2IadV+/svDKGlUZjG3Ze + vbPzyhhWGo1t2Hn1zs4rY1CpNLZh59U7O6+MYaVTn+rGFmfnlTGsFK7MGFYKjc0YVgqNzRhWCo3N + GFYKjc0YVgqNzRhWCo3NGFYKjc0YVBqNzRhWOvWpbmxxdl4ZA0pn55UxrDSubNh5FWfnlTGsNBrb + sPMqzs4rY1hpNLZh51WcnVfGsNJobMPOqzg7r4xBpdLYhp1XcXZeGcNKpz71jXV2XhnDSuPKhp1X + cXZeGcNKo7ENO6/i7LwyhpVGYxt2XsXZeWUMK43GNuy8irPzyhhUKo1t2HkVZ+eVMax06lPfWGfn + lTGsNK5s2HkVZ+eVMaw0Gtuw8yrOzitjWGk0tmHnVZydV8aw0mhsw86rODuvjEGl0tiGnVdxdl4Z + w0qnPvWNdXZeGcNK48qGnVdxdl4Zw0qjsQ07r+LsvDKGlUZjG3Zexdl5ZQwrjcY27LyKs/PKGFQq + jW3YeRVn55UxrHTqU99YZ+eVMaw0rmzYeRVn55UxrDQa27DzKs7OK2NYaTS2YedVqndeiw8vHn8B + AAD//wMAQUyMudJbAAA= + headers: + access-control-allow-credentials: + - 'true' + access-control-allow-headers: + - Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers,Authorization + access-control-allow-methods: + - POST, GET + access-control-allow-origin: + - '*' + access-control-max-age: + - '3600' + cache-control: + - no-transform, public, max-age=31556926 + connection: + - Keep-Alive + content-encoding: + - gzip + content-type: + - application/json + date: + - Mon, 10 Nov 2025 09:17:49 GMT + keep-alive: + - timeout=5, max=100 + server: + - Apache/2.4.58 (Ubuntu) + strict-transport-security: + - max-age=63072000; includeSubdomains; + transfer-encoding: + - chunked + vary: + - accept-encoding + status: + code: 200 + message: '' version: 1 diff --git a/tests/integrationtests/indicators/test_currentness.py--TestCalculation--test_no_subway_stations.cassette.pickle b/tests/integrationtests/indicators/test_currentness.py--TestCalculation--test_no_subway_stations.cassette.pickle index 14e278e07..fa6351003 100644 Binary files a/tests/integrationtests/indicators/test_currentness.py--TestCalculation--test_no_subway_stations.cassette.pickle and b/tests/integrationtests/indicators/test_currentness.py--TestCalculation--test_no_subway_stations.cassette.pickle differ