       AND type IN ('motorway', 'trunk', 'primary', 'motorway_link', 'primary_link', 'trunk_link', 'secondary', 'secondary_link', 'tertiary', 'teriary_link');
 
 CREATE OR REPLACE VIEW road_z13 AS
-    SELECT osm_id, geometry, type, construction, tracktype, service, access, oneway, classify_structure(is_tunnel, is_bridge, is_ford) AS structure, z_order, timestamp
+    SELECT osm_id, geometry, type, construction, tracktype, service, access, oneway, road_structure(is_tunnel, is_bridge, is_ford) AS structure, z_order, timestamp
     FROM osm_road_geometry
     WHERE classify_road(type) IN ('minor_rail', 'street_limited', 'service')
       AND type IN ('motorway', 'trunk', 'primary', 'motorway_link', 'primary_link', 'trunk_link', 'secondary', 'secondary_link', 'tertiary', 'teriary_link');
 
 CREATE OR REPLACE VIEW road_z14 AS
-    SELECT osm_id, geometry, type, construction, tracktype, service, access, oneway, classify_structure(is_tunnel, is_bridge, is_ford) AS structure, z_order, timestamp
+    SELECT osm_id, geometry, type, construction, tracktype, service, access, oneway, road_structure(is_tunnel, is_bridge, is_ford) AS structure, z_order, timestamp
     FROM osm_road_geometry;
 
 CREATE OR REPLACE VIEW road_layer AS (

CREATE OR REPLACE VIEW road_z5toz6 AS
    SELECT osm_id, geometry, type, construction, tracktype, service, access, oneway, 'none' AS structure, z_order, timestamp
    FROM osm_road_geometry

    END IF;
END;
$$ LANGUAGE plpgsql IMMUTABLE;
