diff --git a/layers/transportation/class.sql b/layers/transportation/class.sql index c73ce81..00b8c38 100644 --- a/layers/transportation/class.sql +++ b/layers/transportation/class.sql @@ -48,7 +48,7 @@ CREATE OR REPLACE FUNCTION surface_value(surface text) RETURNS text AS $$ SELECT CASE WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'concrete', 'concrete:lanes', 'concrete:plates', 'metal', - 'paving_stones', 'sett', 'unhewn_cobblestone', 'wood') THEN 'paved' + 'paving_stones', 'sett', 'unhewn_cobblestone', 'wood', 'grade1') THEN 'paved' WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'gravel_turf', 'ground', 'ice', 'mud', 'pebblestone', 'salt', 'sand', 'snow', 'woodchips') THEN 'unpaved' diff --git a/layers/transportation/mapping.yaml b/layers/transportation/mapping.yaml index 05a9c0f..1f01322 100644 --- a/layers/transportation/mapping.yaml +++ b/layers/transportation/mapping.yaml @@ -180,6 +180,9 @@ tables: - name: construction key: construction type: string + - name: tracktype + key: tracktype + type: string - *ref - *network - *z_order diff --git a/layers/transportation/transportation.sql b/layers/transportation/transportation.sql index 349fe1c..7a516f6 100644 --- a/layers/transportation/transportation.sql +++ b/layers/transportation/transportation.sql @@ -368,7 +368,7 @@ FROM ( foot, horse, mtb_scale, - surface_value(surface) AS "surface", + surface_value(COALESCE(NULLIF(surface, ''), tracktype)) AS "surface", hl.z_order FROM osm_highway_linestring hl LEFT OUTER JOIN osm_transportation_name_network n ON hl.osm_id = n.osm_id