DROP VIEW IF EXISTS planet_osm_line_de;
CREATE VIEW planet_osm_line_de AS
SELECT
osm_id,
access as "access",
"addr:interpolation" as "addr:interpolation",
aerialway as "aerialway",
aeroway as "aeroway",
barrier as "barrier",
building as "building",
bicycle as "bicycle",
bridge as "bridge",
construction as "construction",
covered as "covered",
tags->'culvert' as "culvert",
tags->'disused' as "disused",
tags->'embankment' as "embankment",
foot as "foot",
highway as "highway",
historic as "historic",
horse as "horse",
tags->'intermittent' as "intermittent",
junction as "junction",
"lock" as "lock",
man_made as "man_made",
name as "name",
tags->'name:de' as "name:de",
tags->'int_name' as "int_name",  
tags->'name:en' as "name:en",
"natural" as "natural",
oneway as "oneway",
tags->'operator' as "operator",
"power" as "power",
tags->'proposed' as "proposed",
railway as "railway",
ref as "ref",
route as "route",
service as "service",
surface as "surface",
tracktype as "tracktype",
tunnel as "tunnel",
waterway as "waterway",
tags->'width' as "width",
osm_tag2num(tags->'width') as "num_width",
way as "way",
way_area as way_area,
z_order as z_order,
osml10n_get_placename(name, tags->'name:de', tags->'int_name', tags->'name:en',true,false,' - ',way) as localized_name_second,
osml10n_get_placename(name, tags->'name:de', tags->'int_name', tags->'name:en',false,false,' - ',way) as localized_name_first,
osml10n_get_name_without_brackets(name, tags->'name:de', tags->'int_name', tags->'name:en',way) as localized_name_without_brackets,
osml10n_get_streetname(name, tags->'name:de', tags->'int_name', tags->'name:en',true,false,' - ', way) as localized_streetname,
COALESCE(tags->'name:hsb',tags->'name:dsb',name) as name_hrb,
layer as layer,
tags as tags
FROM planet_osm_line;

GRANT select ON planet_osm_line_de to public;
