Initial attempt at moving forests with names into their own 'landmarks' layer. (this is heavely copied and pasted from POI)
This commit is contained in:
19
layers/landmarks/class.sql
Normal file
19
layers/landmarks/class.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
CREATE OR REPLACE FUNCTION lm_class_rank(class text)
|
||||
RETURNS int AS
|
||||
$$
|
||||
SELECT CASE class
|
||||
WHEN 'forest' THEN 120
|
||||
ELSE 1000
|
||||
END;
|
||||
$$ LANGUAGE SQL IMMUTABLE
|
||||
PARALLEL SAFE;
|
||||
|
||||
CREATE OR REPLACE FUNCTION lm_class(subclass text, mapping_key text)
|
||||
RETURNS text AS
|
||||
$$
|
||||
SELECT CASE
|
||||
%%FIELD_MAPPING: class %%
|
||||
ELSE subclass
|
||||
END;
|
||||
$$ LANGUAGE SQL IMMUTABLE
|
||||
PARALLEL SAFE;
|
||||
Reference in New Issue
Block a user