Add support for county seats (capital=6) (#1401)

This PR adds support for `capital=6` in the place layer, which is used for tagging county seats in the US.  A county seat is the capital of a county.  In addition, I reorganized the code a bit to be simpler.

As noted in ZeLonewolf/openstreetmap-americana#384, we would like to render county seats along with state and national capitals, as this is typical styling on American-style maps.

Update with also with `capital=3` and `capital=5`
pull/1405/head^2
Brian Sperlongano 2022-07-26 07:19:16 -04:00 zatwierdzone przez GitHub
rodzic dc1e21fccc
commit 9c78c15943
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -2,8 +2,8 @@ CREATE OR REPLACE FUNCTION normalize_capital_level(capital text)
RETURNS int AS
$$
SELECT CASE
WHEN capital IN ('yes', '2') THEN 2
WHEN capital = '4' THEN 4
WHEN capital = 'yes' THEN 2
WHEN capital IN ('2', '3', '4', '5', '6') THEN capital::int
END;
$$ LANGUAGE SQL IMMUTABLE
STRICT