SELECT getorcreate_amenity(make_standard_name('Aerodrome'), 'aeroway', 'aerodrome');
SELECT getorcreate_amenity(make_standard_name('Aerodromes'), 'aeroway', 'aerodrome');
SELECT getorcreate_amenityoperator(make_standard_name('Aerodrome in'), 'aeroway', 'aerodrome', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Aerodromes in'), 'aeroway', 'aerodrome', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Aerodrome near'), 'aeroway', 'aerodrome', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('Aerodromes near'), 'aeroway', 'aerodrome', 'near');
SELECT getorcreate_amenity(make_standard_name('Airport'), 'aeroway', 'aerodrome');
SELECT getorcreate_amenity(make_standard_name('Airports'), 'aeroway', 'aerodrome');
SELECT getorcreate_amenityoperator(make_standard_name('Airport in'), 'aeroway', 'aerodrome', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Airports in'), 'aeroway', 'aerodrome', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Airport near'), 'aeroway', 'aerodrome', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('Airports near'), 'aeroway', 'aerodrome', 'near');
SELECT getorcreate_amenity(make_standard_name('Bar'), 'amenity', 'bar');
SELECT getorcreate_amenity(make_standard_name('Bars'), 'amenity', 'bar');
SELECT getorcreate_amenityoperator(make_standard_name('Bar in'), 'amenity', 'bar', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Bars in'), 'amenity', 'bar', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Bar near'), 'amenity', 'bar', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('Bars near'), 'amenity', 'bar', 'near');
SELECT getorcreate_amenity(make_standard_name('Bar'), 'amenity', 'pub');
SELECT getorcreate_amenity(make_standard_name('Bars'), 'amenity', 'pub');
SELECT getorcreate_amenityoperator(make_standard_name('Bar in'), 'amenity', 'pub', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Bars in'), 'amenity', 'pub', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Bar near'), 'amenity', 'pub', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('Bars near'), 'amenity', 'pub', 'near');
SELECT getorcreate_amenity(make_standard_name('Food'), 'amenity', 'restaurant');
SELECT getorcreate_amenity(make_standard_name('Food'), 'amenity', 'restaurant');
SELECT getorcreate_amenityoperator(make_standard_name('Food in'), 'amenity', 'restaurant', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Food in'), 'amenity', 'restaurant', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Food near'), 'amenity', 'restaurant', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('Food near'), 'amenity', 'restaurant', 'near');
SELECT getorcreate_amenity(make_standard_name('Pub'), 'amenity', 'bar');
SELECT getorcreate_amenity(make_standard_name('Pubs'), 'amenity', 'bar');
SELECT getorcreate_amenityoperator(make_standard_name('Pub in'), 'amenity', 'bar', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Pubs in'), 'amenity', 'bar', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Pub near'), 'amenity', 'bar', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('Pubs near'), 'amenity', 'bar', 'near');
SELECT getorcreate_amenity(make_standard_name('Pub'), 'amenity', 'pub');
SELECT getorcreate_amenity(make_standard_name('Pubs'), 'amenity', 'pub');
SELECT getorcreate_amenityoperator(make_standard_name('Pub in'), 'amenity', 'pub', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Pubs in'), 'amenity', 'pub', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Pub near'), 'amenity', 'pub', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('Pubs near'), 'amenity', 'pub', 'near');
SELECT getorcreate_amenity(make_standard_name('Restaurant'), 'amenity', 'restaurant');
SELECT getorcreate_amenity(make_standard_name('Restaurants'), 'amenity', 'restaurant');
SELECT getorcreate_amenityoperator(make_standard_name('Restaurant in'), 'amenity', 'restaurant', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Restaurants in'), 'amenity', 'restaurant', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Restaurant near'), 'amenity', 'restaurant', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('Restaurants near'), 'amenity', 'restaurant', 'near');
SELECT getorcreate_amenity(make_standard_name('Mural'), 'artwork_type', 'mural');
SELECT getorcreate_amenity(make_standard_name('Murals'), 'artwork_type', 'mural');
SELECT getorcreate_amenityoperator(make_standard_name('Mural in'), 'artwork_type', 'mural', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Murals in'), 'artwork_type', 'mural', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Mural near'), 'artwork_type', 'mural', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('Murals near'), 'artwork_type', 'mural', 'near');
SELECT getorcreate_amenity(make_standard_name('Sculpture'), 'artwork_type', 'sculpture');
SELECT getorcreate_amenity(make_standard_name('Sculptures'), 'artwork_type', 'sculpture');
SELECT getorcreate_amenityoperator(make_standard_name('Sculpture in'), 'artwork_type', 'sculpture', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Sculptures in'), 'artwork_type', 'sculpture', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Sculpture near'), 'artwork_type', 'sculpture', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('Sculptures near'), 'artwork_type', 'sculpture', 'near');
SELECT getorcreate_amenity(make_standard_name('Statue'), 'artwork_type', 'statue');
SELECT getorcreate_amenity(make_standard_name('Statues'), 'artwork_type', 'statue');
SELECT getorcreate_amenityoperator(make_standard_name('Statue in'), 'artwork_type', 'statue', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Statues in'), 'artwork_type', 'statue', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Statue near'), 'artwork_type', 'statue', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('Statues near'), 'artwork_type', 'statue', 'near');
SELECT getorcreate_amenity(make_standard_name('ATM'), 'atm', 'yes');
SELECT getorcreate_amenity(make_standard_name('ATMs'), 'atm', 'yes');
SELECT getorcreate_amenityoperator(make_standard_name('ATM in'), 'atm', 'yes', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('ATMs in'), 'atm', 'yes', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('ATM near'), 'atm', 'yes', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('ATMs near'), 'atm', 'yes', 'near');
SELECT getorcreate_amenity(make_standard_name('National Park'), 'boundary', 'national_park');
SELECT getorcreate_amenity(make_standard_name('National Parks'), 'boundary', 'national_park');
SELECT getorcreate_amenityoperator(make_standard_name('National Park in'), 'boundary', 'national_park', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('National Parks in'), 'boundary', 'national_park', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('National Park near'), 'boundary', 'national_park', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('National Parks near'), 'boundary', 'national_park', 'near');
SELECT getorcreate_amenity(make_standard_name('Changing table'), 'changing_table', 'yes');
SELECT getorcreate_amenity(make_standard_name('Changing tables'), 'changing_table', 'yes');
SELECT getorcreate_amenityoperator(make_standard_name('Changing table in'), 'changing_table', 'yes', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Changing tables in'), 'changing_table', 'yes', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Changing table near'), 'changing_table', 'yes', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('Changing tables near'), 'changing_table', 'yes', 'near');
SELECT getorcreate_amenity(make_standard_name('Roundabout'), 'junction', 'roundabout');
SELECT getorcreate_amenity(make_standard_name('Roundabouts'), 'junction', 'roundabout');
SELECT getorcreate_amenityoperator(make_standard_name('Roundabout in'), 'junction', 'roundabout', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Roundabouts in'), 'junction', 'roundabout', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Roundabout near'), 'junction', 'roundabout', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('Roundabouts near'), 'junction', 'roundabout', 'near');
SELECT getorcreate_amenity(make_standard_name('Plaque'), 'memorial', 'plaque');
SELECT getorcreate_amenity(make_standard_name('Plaques'), 'memorial', 'plaque');
SELECT getorcreate_amenityoperator(make_standard_name('Plaque in'), 'memorial', 'plaque', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Plaques in'), 'memorial', 'plaque', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Plaque near'), 'memorial', 'plaque', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('Plaques near'), 'memorial', 'plaque', 'near');
SELECT getorcreate_amenity(make_standard_name('Statue'), 'memorial', 'statue');
SELECT getorcreate_amenity(make_standard_name('Statues'), 'memorial', 'statue');
SELECT getorcreate_amenityoperator(make_standard_name('Statue in'), 'memorial', 'statue', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Statues in'), 'memorial', 'statue', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Statue near'), 'memorial', 'statue', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('Statues near'), 'memorial', 'statue', 'near');
SELECT getorcreate_amenity(make_standard_name('Stolperstein'), 'memorial', 'stolperstein');
SELECT getorcreate_amenity(make_standard_name('Stolpersteins'), 'memorial', 'stolperstein');
SELECT getorcreate_amenity(make_standard_name('Stolpersteine'), 'memorial', 'stolperstein');
SELECT getorcreate_amenityoperator(make_standard_name('Stolperstein in'), 'memorial', 'stolperstein', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Stolpersteins in'), 'memorial', 'stolperstein', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Stolpersteine in'), 'memorial', 'stolperstein', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('Stolperstein near'), 'memorial', 'stolperstein', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('Stolpersteins near'), 'memorial', 'stolperstein', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('Stolpersteine near'), 'memorial', 'stolperstein', 'near');
SELECT getorcreate_amenity(make_standard_name('War Memorial'), 'memorial', 'war_memorial');
SELECT getorcreate_amenity(make_standard_name('War Memorials'), 'memorial', 'war_memorial');
SELECT getorcreate_amenityoperator(make_standard_name('War Memorial in'), 'memorial', 'war_memorial', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('War Memorials in'), 'memorial', 'war_memorial', 'in');
SELECT getorcreate_amenityoperator(make_standard_name('War Memorial near'), 'memorial', 'war_memorial', 'near');
SELECT getorcreate_amenityoperator(make_standard_name('War Memorials near'), 'memorial', 'war_memorial', 'near');
CREATE INDEX idx_placex_classtype ON placex (class, type);CREATE TABLE place_classtype_aeroway_aerodrome AS SELECT place_id AS place_id,st_centroid(geometry) AS centroid FROM placex WHERE class = 'aeroway' AND type = 'aerodrome';
CREATE INDEX idx_place_classtype_aeroway_aerodrome_centroid ON place_classtype_aeroway_aerodrome USING GIST (centroid);
CREATE INDEX idx_place_classtype_aeroway_aerodrome_place_id ON place_classtype_aeroway_aerodrome USING btree(place_id);
GRANT SELECT ON place_classtype_aeroway_aerodrome TO "www-data";
CREATE TABLE place_classtype_amenity_bar AS SELECT place_id AS place_id,st_centroid(geometry) AS centroid FROM placex WHERE class = 'amenity' AND type = 'bar';
CREATE INDEX idx_place_classtype_amenity_bar_centroid ON place_classtype_amenity_bar USING GIST (centroid);
CREATE INDEX idx_place_classtype_amenity_bar_place_id ON place_classtype_amenity_bar USING btree(place_id);
GRANT SELECT ON place_classtype_amenity_bar TO "www-data";
CREATE TABLE place_classtype_amenity_pub AS SELECT place_id AS place_id,st_centroid(geometry) AS centroid FROM placex WHERE class = 'amenity' AND type = 'pub';
CREATE INDEX idx_place_classtype_amenity_pub_centroid ON place_classtype_amenity_pub USING GIST (centroid);
CREATE INDEX idx_place_classtype_amenity_pub_place_id ON place_classtype_amenity_pub USING btree(place_id);
GRANT SELECT ON place_classtype_amenity_pub TO "www-data";
CREATE TABLE place_classtype_amenity_restaurant AS SELECT place_id AS place_id,st_centroid(geometry) AS centroid FROM placex WHERE class = 'amenity' AND type = 'restaurant';
CREATE INDEX idx_place_classtype_amenity_restaurant_centroid ON place_classtype_amenity_restaurant USING GIST (centroid);
CREATE INDEX idx_place_classtype_amenity_restaurant_place_id ON place_classtype_amenity_restaurant USING btree(place_id);
GRANT SELECT ON place_classtype_amenity_restaurant TO "www-data";
CREATE TABLE place_classtype_artwork_type_mural AS SELECT place_id AS place_id,st_centroid(geometry) AS centroid FROM placex WHERE class = 'artwork_type' AND type = 'mural';
CREATE INDEX idx_place_classtype_artwork_type_mural_centroid ON place_classtype_artwork_type_mural USING GIST (centroid);
CREATE INDEX idx_place_classtype_artwork_type_mural_place_id ON place_classtype_artwork_type_mural USING btree(place_id);
GRANT SELECT ON place_classtype_artwork_type_mural TO "www-data";
CREATE TABLE place_classtype_artwork_type_sculpture AS SELECT place_id AS place_id,st_centroid(geometry) AS centroid FROM placex WHERE class = 'artwork_type' AND type = 'sculpture';
CREATE INDEX idx_place_classtype_artwork_type_sculpture_centroid ON place_classtype_artwork_type_sculpture USING GIST (centroid);
CREATE INDEX idx_place_classtype_artwork_type_sculpture_place_id ON place_classtype_artwork_type_sculpture USING btree(place_id);
GRANT SELECT ON place_classtype_artwork_type_sculpture TO "www-data";
CREATE TABLE place_classtype_artwork_type_statue AS SELECT place_id AS place_id,st_centroid(geometry) AS centroid FROM placex WHERE class = 'artwork_type' AND type = 'statue';
CREATE INDEX idx_place_classtype_artwork_type_statue_centroid ON place_classtype_artwork_type_statue USING GIST (centroid);
CREATE INDEX idx_place_classtype_artwork_type_statue_place_id ON place_classtype_artwork_type_statue USING btree(place_id);
GRANT SELECT ON place_classtype_artwork_type_statue TO "www-data";
CREATE TABLE place_classtype_atm_yes AS SELECT place_id AS place_id,st_centroid(geometry) AS centroid FROM placex WHERE class = 'atm' AND type = 'yes';
CREATE INDEX idx_place_classtype_atm_yes_centroid ON place_classtype_atm_yes USING GIST (centroid);
CREATE INDEX idx_place_classtype_atm_yes_place_id ON place_classtype_atm_yes USING btree(place_id);
GRANT SELECT ON place_classtype_atm_yes TO "www-data";
CREATE TABLE place_classtype_boundary_national_park AS SELECT place_id AS place_id,st_centroid(geometry) AS centroid FROM placex WHERE class = 'boundary' AND type = 'national_park';
CREATE INDEX idx_place_classtype_boundary_national_park_centroid ON place_classtype_boundary_national_park USING GIST (centroid);
CREATE INDEX idx_place_classtype_boundary_national_park_place_id ON place_classtype_boundary_national_park USING btree(place_id);
GRANT SELECT ON place_classtype_boundary_national_park TO "www-data";
CREATE TABLE place_classtype_changing_table_yes AS SELECT place_id AS place_id,st_centroid(geometry) AS centroid FROM placex WHERE class = 'changing_table' AND type = 'yes';
CREATE INDEX idx_place_classtype_changing_table_yes_centroid ON place_classtype_changing_table_yes USING GIST (centroid);
CREATE INDEX idx_place_classtype_changing_table_yes_place_id ON place_classtype_changing_table_yes USING btree(place_id);
GRANT SELECT ON place_classtype_changing_table_yes TO "www-data";
CREATE TABLE place_classtype_junction_roundabout AS SELECT place_id AS place_id,st_centroid(geometry) AS centroid FROM placex WHERE class = 'junction' AND type = 'roundabout';
CREATE INDEX idx_place_classtype_junction_roundabout_centroid ON place_classtype_junction_roundabout USING GIST (centroid);
CREATE INDEX idx_place_classtype_junction_roundabout_place_id ON place_classtype_junction_roundabout USING btree(place_id);
GRANT SELECT ON place_classtype_junction_roundabout TO "www-data";
CREATE TABLE place_classtype_memorial_plaque AS SELECT place_id AS place_id,st_centroid(geometry) AS centroid FROM placex WHERE class = 'memorial' AND type = 'plaque';
CREATE INDEX idx_place_classtype_memorial_plaque_centroid ON place_classtype_memorial_plaque USING GIST (centroid);
CREATE INDEX idx_place_classtype_memorial_plaque_place_id ON place_classtype_memorial_plaque USING btree(place_id);
GRANT SELECT ON place_classtype_memorial_plaque TO "www-data";
CREATE TABLE place_classtype_memorial_statue AS SELECT place_id AS place_id,st_centroid(geometry) AS centroid FROM placex WHERE class = 'memorial' AND type = 'statue';
CREATE INDEX idx_place_classtype_memorial_statue_centroid ON place_classtype_memorial_statue USING GIST (centroid);
CREATE INDEX idx_place_classtype_memorial_statue_place_id ON place_classtype_memorial_statue USING btree(place_id);
GRANT SELECT ON place_classtype_memorial_statue TO "www-data";
CREATE TABLE place_classtype_memorial_stolperstein AS SELECT place_id AS place_id,st_centroid(geometry) AS centroid FROM placex WHERE class = 'memorial' AND type = 'stolperstein';
CREATE INDEX idx_place_classtype_memorial_stolperstein_centroid ON place_classtype_memorial_stolperstein USING GIST (centroid);
CREATE INDEX idx_place_classtype_memorial_stolperstein_place_id ON place_classtype_memorial_stolperstein USING btree(place_id);
GRANT SELECT ON place_classtype_memorial_stolperstein TO "www-data";
CREATE TABLE place_classtype_memorial_war_memorial AS SELECT place_id AS place_id,st_centroid(geometry) AS centroid FROM placex WHERE class = 'memorial' AND type = 'war_memorial';
CREATE INDEX idx_place_classtype_memorial_war_memorial_centroid ON place_classtype_memorial_war_memorial USING GIST (centroid);
CREATE INDEX idx_place_classtype_memorial_war_memorial_place_id ON place_classtype_memorial_war_memorial USING btree(place_id);
GRANT SELECT ON place_classtype_memorial_war_memorial TO "www-data";
DROP INDEX idx_placex_classtype;