From 9c78c15943383274b4c9a3360e99a9989fe86eb1 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Tue, 26 Jul 2022 07:19:16 -0400 Subject: [PATCH] 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` --- layers/place/capital.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layers/place/capital.sql b/layers/place/capital.sql index 33756478..11221094 100644 --- a/layers/place/capital.sql +++ b/layers/place/capital.sql @@ -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