kopia lustrzana https://github.com/openmaptiles/openmaptiles
Fix issues with rank boundaries in country and state
rodzic
dd8683154c
commit
1b4b6be3fe
|
@ -22,5 +22,10 @@ UPDATE osm_country_point AS osm
|
|||
SET "rank" = 6
|
||||
WHERE "rank" IS NULL;
|
||||
|
||||
-- TODO: This shouldn't be necessary? The rank function makes something wrong...
|
||||
UPDATE osm_country_point AS osm
|
||||
SET "rank" = 1
|
||||
WHERE "rank" = 0;
|
||||
|
||||
ALTER TABLE osm_country_point ADD CONSTRAINT osm_country_point_rank_constraint CHECK("rank" BETWEEN 1 AND 6);
|
||||
CREATE INDEX IF NOT EXISTS osm_country_point_rank_idx ON osm_country_point("rank");
|
||||
CREATE INDEX IF NOT EXISTS osm_country_point_rank_idx ON osm_country_point("rank");
|
||||
|
|
|
@ -16,6 +16,11 @@ SET "rank" = LEAST(6, CEILING((scalerank + labelrank + datarank)/3.0))
|
|||
FROM important_state_point AS ne
|
||||
WHERE osm.osm_id = ne.osm_id;
|
||||
|
||||
-- TODO: This shouldn't be necessary? The rank function makes something wrong...
|
||||
UPDATE osm_state_point AS osm
|
||||
SET "rank" = 1
|
||||
WHERE "rank" = 0;
|
||||
|
||||
DELETE FROM osm_state_point WHERE "rank" IS NULL;
|
||||
|
||||
ALTER TABLE osm_state_point ADD CONSTRAINT osm_state_point_rank_constraint CHECK("rank" BETWEEN 1 AND 6);
|
||||
|
|
Ładowanie…
Reference in New Issue