Fix university office/amenity collision (#1607)

Fixes #1606
Unblocks ZeLonewolf/openstreetmap-americana#1022

This PR is a bugfix which ensures that `amenity=university` is encoded as `class=college` rather than `class=office`.  It's required because of a subclass collision for `university`, which exists under both class values.
pull/1605/head^2
Brian Sperlongano 2023-12-28 02:18:00 -05:00 zatwierdzone przez GitHub
rodzic b9c9e69028
commit d3a9b36873
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -33,6 +33,8 @@ CREATE OR REPLACE FUNCTION poi_class(subclass text, mapping_key text)
RETURNS text AS RETURNS text AS
$$ $$
SELECT CASE SELECT CASE
-- Special case subclass collision between office=university and amenity=university
WHEN mapping_key = 'amenity' AND subclass = 'university' THEN 'college'
%%FIELD_MAPPING: class %% %%FIELD_MAPPING: class %%
ELSE subclass ELSE subclass
END; END;