kopia lustrzana https://github.com/openmaptiles/openmaptiles
Make sure areas above 160000000 get rank 2 or 1 (#1623)
This is a follow-up on https://github.com/openmaptiles/openmaptiles/pull/1604 . Seminole Nation is shown in the screenshot there with rank 3 while based on area it should be 1. This PR fixes `area_rank()` function to handle areas greater than 160000000, e.g. this fixes #1622 . Co-authored-by: Paul Norman <penorman@mac.com>pull/1619/head^2
rodzic
bb154f4ee8
commit
fe61912c09
|
@ -1,12 +1,12 @@
|
|||
CREATE OR REPLACE FUNCTION area_rank(area real) RETURNS int AS
|
||||
$$
|
||||
SELECT CASE
|
||||
WHEN area < 10000000 THEN 6
|
||||
WHEN area BETWEEN 1000000 AND 15000000 THEN 5
|
||||
WHEN area BETWEEN 15000000 AND 40000000 THEN 4
|
||||
WHEN area > 40000000 THEN 3
|
||||
WHEN area > 160000000 THEN 2
|
||||
WHEN area > 640000000 THEN 1
|
||||
WHEN area > 160000000 THEN 2
|
||||
WHEN area > 40000000 THEN 3
|
||||
WHEN area > 15000000 THEN 4
|
||||
WHEN area > 10000000 THEN 5
|
||||
WHEN area > 0 THEN 6
|
||||
ELSE 7
|
||||
END;
|
||||
$$ LANGUAGE SQL IMMUTABLE
|
||||
|
|
Ładowanie…
Reference in New Issue