Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 12 changed files with 278 additions and 5 deletions.
51 changes: 51 additions & 0 deletions categories.json
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,50 @@
],
"areas": [ "DE", "AT", "CH" ],
"form_details": [ "delivery", "access" ]
},
"beauty": {
"name": "Beauty store",
"osm_tags": [
{ "shop": "beauty" }
],
"areas": [ "DE", "AT", "CH" ],
"form_details": [ "delivery", "access" ]
},
"clothes": {
"name": "Clothes",
"osm_tags": [
{ "shop": "clothes" }
],
"areas": [ "DE", "AT", "CH" ],
"form_details": [ "delivery", "access" ]
},
"gift": {
"name": "Gift shop",
"osm_tags": [
{ "shop": "gift" }
],
"areas": [ "DE", "AT", "CH" ]
},
"hairdresser": {
"name": "Hairdresser",
"osm_tags": [
{ "shop": "hairdresser" }
],
"areas": [ "DE", "AT", "CH" ]
},
"jewelry": {
"name": "Jewelry",
"osm_tags": [
{ "shop": "jewelry" }
],
"areas": [ "DE", "AT", "CH" ]
},
"toys": {
"name": "Toy store",
"osm_tags": [
{ "shop": "toys" }
],
"areas": [ "DE", "AT", "CH" ]
}
}
},
Expand Down Expand Up @@ -523,6 +567,13 @@
],
"areas": "all"
},
"car_dealer": {
"name": "Car dealer",
"osm_tags": [
{ "shop": "car" }
],
"areas": [ "DE", "AT", "CH" ]
},
"bicycle_tube": {
"name": "Bicycle tube vending machine",
"osm_tags": [ { "amenity": "vending_machine", "vending": "bicycle_tube" } ],
Expand Down
18 changes: 16 additions & 2 deletions db/categories_functions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ BEGIN
RETURN 'eat';
ELSIF (tags->'amenity' = 'vending_machine' AND tags->'vending' = 'cigarettes') OR (tags->'amenity' = 'vending_machine' AND tags->'vending' = 'e-cigarettes') OR (tags->'shop' IN ('tobacco', 'newsagent;tobacco', 'tobacco;newsagent', 'e-cigarette', 'alcohol', 'beverages', 'wine')) OR (tags->'tobacco' IN ('yes', 'only')) THEN
RETURN 'drugs';
ELSIF (tags->'shop' = 'stationery' AND area LIKE 'FR%') OR (tags->'shop' = 'agrarian' AND area LIKE 'FR%') OR (tags->'shop' = 'shoes' AND area SIMILAR TO '(DE|AT|CH)%') OR (tags->'shop' = 'books' AND area SIMILAR TO '(DE|AT|CH)%') OR (tags->'amenity' = 'vending_machine' AND tags->'vending' = 'books' AND area SIMILAR TO '(DE|AT|CH)%') OR (tags->'amenity' = 'public_bookcase' AND area SIMILAR TO '(DE|AT|CH)%') OR (tags->'shop' IN ('doityourself', 'hardware', 'paint', 'glaziery', 'mobile_phone', 'computer', 'electronics', 'dry_cleaning', 'laundry', 'kiosk', 'newsagent', 'pet', 'garden_centre', 'florist', 'chemist', 'fabric', 'sewing', 'haberdashery')) OR (tags->'craft' IN ('electronics_repair', 'sewing')) THEN
ELSIF (tags->'shop' = 'stationery' AND area LIKE 'FR%') OR (tags->'shop' = 'agrarian' AND area LIKE 'FR%') OR (tags->'shop' = 'shoes' AND area SIMILAR TO '(DE|AT|CH)%') OR (tags->'shop' = 'books' AND area SIMILAR TO '(DE|AT|CH)%') OR (tags->'amenity' = 'vending_machine' AND tags->'vending' = 'books' AND area SIMILAR TO '(DE|AT|CH)%') OR (tags->'amenity' = 'public_bookcase' AND area SIMILAR TO '(DE|AT|CH)%') OR (tags->'shop' = 'beauty' AND area SIMILAR TO '(DE|AT|CH)%') OR (tags->'shop' = 'clothes' AND area SIMILAR TO '(DE|AT|CH)%') OR (tags->'shop' = 'gift' AND area SIMILAR TO '(DE|AT|CH)%') OR (tags->'shop' = 'hairdresser' AND area SIMILAR TO '(DE|AT|CH)%') OR (tags->'shop' = 'jewelry' AND area SIMILAR TO '(DE|AT|CH)%') OR (tags->'shop' = 'toys' AND area SIMILAR TO '(DE|AT|CH)%') OR (tags->'shop' IN ('doityourself', 'hardware', 'paint', 'glaziery', 'mobile_phone', 'computer', 'electronics', 'dry_cleaning', 'laundry', 'kiosk', 'newsagent', 'pet', 'garden_centre', 'florist', 'chemist', 'fabric', 'sewing', 'haberdashery')) OR (tags->'craft' IN ('electronics_repair', 'sewing')) THEN
RETURN 'shop';
ELSIF (tags->'amenity' = 'vending_machine' AND tags->'vending' = 'bicycle_tube') OR (tags->'amenity' = 'vending_machine' AND tags->'vending' = 'public_transport_tickets') OR (tags->'amenity' IN ('fuel', 'car_rental')) OR (tags->'shop' IN ('gas', 'bicycle', 'car_parts', 'car_repair')) THEN
ELSIF (tags->'shop' = 'car' AND area SIMILAR TO '(DE|AT|CH)%') OR (tags->'amenity' = 'vending_machine' AND tags->'vending' = 'bicycle_tube') OR (tags->'amenity' = 'vending_machine' AND tags->'vending' = 'public_transport_tickets') OR (tags->'amenity' IN ('fuel', 'car_rental')) OR (tags->'shop' IN ('gas', 'bicycle', 'car_parts', 'car_repair')) THEN
RETURN 'mobility';
ELSIF tags->'opening_hours:covid19' != '' THEN
RETURN 'other';
Expand Down Expand Up @@ -147,6 +147,18 @@ BEGIN
RETURN 'shoes';
ELSIF (tags->'shop' = 'books') OR (tags->'amenity' = 'vending_machine' AND tags->'vending' = 'books') OR (tags->'amenity' = 'public_bookcase') THEN
RETURN 'books';
ELSIF tags->'shop' = 'beauty' THEN
RETURN 'beauty';
ELSIF tags->'shop' = 'clothes' THEN
RETURN 'clothes';
ELSIF tags->'shop' = 'gift' THEN
RETURN 'gift';
ELSIF tags->'shop' = 'hairdresser' THEN
RETURN 'hairdresser';
ELSIF tags->'shop' = 'jewelry' THEN
RETURN 'jewelry';
ELSIF tags->'shop' = 'toys' THEN
RETURN 'toys';
ELSIF (tags->'amenity' = 'fuel') OR (tags->'shop' = 'gas') THEN
RETURN 'fuel';
ELSIF tags->'amenity' = 'car_rental' THEN
Expand All @@ -155,6 +167,8 @@ BEGIN
RETURN 'bicycle';
ELSIF tags->'shop' IN ('car_parts', 'car_repair') THEN
RETURN 'car';
ELSIF tags->'shop' = 'car' THEN
RETURN 'car_dealer';
ELSIF tags->'amenity' = 'vending_machine' AND tags->'vending' = 'bicycle_tube' THEN
RETURN 'bicycle_tube';
ELSIF tags->'amenity' = 'vending_machine' AND tags->'vending' = 'public_transport_tickets' THEN
Expand Down
4 changes: 2 additions & 2 deletions db/update_poi.sql
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ FROM imposm_osm_point
WHERE
-- The line below is automatically edited using categories.json
-- Do not edit directly, run "yarn run categories" instead
country_iso2 IN ('DE', 'FR', 'ES', 'AD', 'CH', 'AT', 'PH', 'FI', 'MC') AND ("opening_hours:covid19" != '' OR "amenity" IN ('bank', 'bar', 'cafe', 'car_rental', 'childcare', 'clinic', 'doctors', 'fast_food', 'fuel', 'hospital', 'ice_cream', 'kindergarten', 'marketplace', 'pharmacy', 'police', 'post_office', 'pub', 'public_bookcase', 'recycling', 'restaurant', 'townhall', 'vending_machine') OR "office" IN ('employment_agency', 'insurance') OR "shop" IN ('agrarian', 'alcohol', 'bakery', 'beverages', 'bicycle', 'books', 'butcher', 'cannery', 'car_parts', 'car_repair', 'cheese', 'chemist', 'chocolate', 'coffee', 'computer', 'confectionery', 'convenience', 'dairy', 'deli', 'doityourself', 'dry_cleaning', 'e-cigarette', 'electronics', 'fabric', 'farm', 'florist', 'frozen_food', 'funeral_directors', 'garden_centre', 'gas', 'glaziery', 'greengrocer', 'haberdashery', 'hardware', 'health_food', 'hearing_aids', 'honey', 'ice_cream', 'kiosk', 'laundry', 'medical_supply', 'mobile_phone', 'money_lender', 'newsagent', 'newsagent;tobacco', 'optician', 'paint', 'pasta', 'pastry', 'pet', 'seafood', 'sewing', 'shoes', 'spices', 'stationery', 'supermarket', 'tea', 'tobacco', 'tobacco;newsagent', 'wine') OR "tourism" IN ('hostel', 'hotel', 'information', 'motel') OR "healthcare" IN ('centre', 'clinic', 'doctor', 'hospital', 'rehabilitation') OR "craft" IN ('electronics_repair', 'optician', 'sewing') OR "tobacco" IN ('only', 'yes')) --CATEGORIES
country_iso2 IN ('DE', 'FR', 'ES', 'AD', 'CH', 'AT', 'PH', 'FI', 'MC') AND ("opening_hours:covid19" != '' OR "amenity" IN ('bank', 'bar', 'cafe', 'car_rental', 'childcare', 'clinic', 'doctors', 'fast_food', 'fuel', 'hospital', 'ice_cream', 'kindergarten', 'marketplace', 'pharmacy', 'police', 'post_office', 'pub', 'public_bookcase', 'recycling', 'restaurant', 'townhall', 'vending_machine') OR "office" IN ('employment_agency', 'insurance') OR "shop" IN ('agrarian', 'alcohol', 'bakery', 'beauty', 'beverages', 'bicycle', 'books', 'butcher', 'cannery', 'car', 'car_parts', 'car_repair', 'cheese', 'chemist', 'chocolate', 'clothes', 'coffee', 'computer', 'confectionery', 'convenience', 'dairy', 'deli', 'doityourself', 'dry_cleaning', 'e-cigarette', 'electronics', 'fabric', 'farm', 'florist', 'frozen_food', 'funeral_directors', 'garden_centre', 'gas', 'gift', 'glaziery', 'greengrocer', 'haberdashery', 'hairdresser', 'hardware', 'health_food', 'hearing_aids', 'honey', 'ice_cream', 'jewelry', 'kiosk', 'laundry', 'medical_supply', 'mobile_phone', 'money_lender', 'newsagent', 'newsagent;tobacco', 'optician', 'paint', 'pasta', 'pastry', 'pet', 'seafood', 'sewing', 'shoes', 'spices', 'stationery', 'supermarket', 'tea', 'tobacco', 'tobacco;newsagent', 'toys', 'wine') OR "tourism" IN ('hostel', 'hotel', 'information', 'motel') OR "healthcare" IN ('centre', 'clinic', 'doctor', 'hospital', 'rehabilitation') OR "craft" IN ('electronics_repair', 'optician', 'sewing') OR "tobacco" IN ('only', 'yes')) --CATEGORIES
UNION ALL
SELECT
CASE WHEN osm_id < 0 THEN concat('r', -osm_id) ELSE concat('w', osm_id) END,
Expand Down Expand Up @@ -173,7 +173,7 @@ FROM imposm_osm_polygon
WHERE
-- The line below is automatically edited using categories.json
-- Do not edit directly, run "yarn run categories" instead
country_iso2 IN ('DE', 'FR', 'ES', 'AD', 'CH', 'AT', 'PH', 'FI', 'MC') AND ("opening_hours:covid19" != '' OR "amenity" IN ('bank', 'bar', 'cafe', 'car_rental', 'childcare', 'clinic', 'doctors', 'fast_food', 'fuel', 'hospital', 'ice_cream', 'kindergarten', 'marketplace', 'pharmacy', 'police', 'post_office', 'pub', 'public_bookcase', 'recycling', 'restaurant', 'townhall', 'vending_machine') OR "office" IN ('employment_agency', 'insurance') OR "shop" IN ('agrarian', 'alcohol', 'bakery', 'beverages', 'bicycle', 'books', 'butcher', 'cannery', 'car_parts', 'car_repair', 'cheese', 'chemist', 'chocolate', 'coffee', 'computer', 'confectionery', 'convenience', 'dairy', 'deli', 'doityourself', 'dry_cleaning', 'e-cigarette', 'electronics', 'fabric', 'farm', 'florist', 'frozen_food', 'funeral_directors', 'garden_centre', 'gas', 'glaziery', 'greengrocer', 'haberdashery', 'hardware', 'health_food', 'hearing_aids', 'honey', 'ice_cream', 'kiosk', 'laundry', 'medical_supply', 'mobile_phone', 'money_lender', 'newsagent', 'newsagent;tobacco', 'optician', 'paint', 'pasta', 'pastry', 'pet', 'seafood', 'sewing', 'shoes', 'spices', 'stationery', 'supermarket', 'tea', 'tobacco', 'tobacco;newsagent', 'wine') OR "tourism" IN ('hostel', 'hotel', 'information', 'motel') OR "healthcare" IN ('centre', 'clinic', 'doctor', 'hospital', 'rehabilitation') OR "craft" IN ('electronics_repair', 'optician', 'sewing') OR "tobacco" IN ('only', 'yes')) --CATEGORIES
country_iso2 IN ('DE', 'FR', 'ES', 'AD', 'CH', 'AT', 'PH', 'FI', 'MC') AND ("opening_hours:covid19" != '' OR "amenity" IN ('bank', 'bar', 'cafe', 'car_rental', 'childcare', 'clinic', 'doctors', 'fast_food', 'fuel', 'hospital', 'ice_cream', 'kindergarten', 'marketplace', 'pharmacy', 'police', 'post_office', 'pub', 'public_bookcase', 'recycling', 'restaurant', 'townhall', 'vending_machine') OR "office" IN ('employment_agency', 'insurance') OR "shop" IN ('agrarian', 'alcohol', 'bakery', 'beauty', 'beverages', 'bicycle', 'books', 'butcher', 'cannery', 'car', 'car_parts', 'car_repair', 'cheese', 'chemist', 'chocolate', 'clothes', 'coffee', 'computer', 'confectionery', 'convenience', 'dairy', 'deli', 'doityourself', 'dry_cleaning', 'e-cigarette', 'electronics', 'fabric', 'farm', 'florist', 'frozen_food', 'funeral_directors', 'garden_centre', 'gas', 'gift', 'glaziery', 'greengrocer', 'haberdashery', 'hairdresser', 'hardware', 'health_food', 'hearing_aids', 'honey', 'ice_cream', 'jewelry', 'kiosk', 'laundry', 'medical_supply', 'mobile_phone', 'money_lender', 'newsagent', 'newsagent;tobacco', 'optician', 'paint', 'pasta', 'pastry', 'pet', 'seafood', 'sewing', 'shoes', 'spices', 'stationery', 'supermarket', 'tea', 'tobacco', 'tobacco;newsagent', 'toys', 'wine') OR "tourism" IN ('hostel', 'hotel', 'information', 'motel') OR "healthcare" IN ('centre', 'clinic', 'doctor', 'hospital', 'rehabilitation') OR "craft" IN ('electronics_repair', 'optician', 'sewing') OR "tobacco" IN ('only', 'yes')) --CATEGORIES
)
INSERT INTO poi_osm_next(fid, geom, name, cat, normalized_cat, brand, brand_wikidata, brand_infos, status, status_order, opening_hours, delivery, takeaway, country, sub_country, tags)
SELECT *
Expand Down
17 changes: 17 additions & 0 deletions icons/beauty.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions icons/car_dealer.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions icons/clothes.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions icons/furniture.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions icons/gift.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5601f2c

Please sign in to comment.