diff --git a/sql/bdtopo_v3.3.sql b/sql/bdtopo_v3.3.sql index 51e2f5d..dfeb7c7 100644 --- a/sql/bdtopo_v3.3.sql +++ b/sql/bdtopo_v3.3.sql @@ -190,7 +190,10 @@ CREATE TEMP TABLE IF NOT EXISTS bduni_troncon AS -- TODO: remove t.bande_cyclable as bande_cyclable, t.reserve_aux_bus as reserve_aux_bus, - t.urbain as urbain, + (CASE + WHEN t.urbain IS NULL THEN 0 + ELSE t.urbain + END) as urbain, t.acces_pieton as acces_pieton, t.nature_de_la_restriction as nature_de_la_restriction, t.restriction_de_hauteur as restriction_de_hauteur, diff --git a/sql/bduni_convert.sql b/sql/bduni_convert.sql index 022c041..0751a15 100644 --- a/sql/bduni_convert.sql +++ b/sql/bduni_convert.sql @@ -161,6 +161,7 @@ CREATE TEMP TABLE IF NOT EXISTS bduni_troncon AS t.sens_de_circulation as sens_de_circulation, (CASE WHEN t.vitesse_moyenne_vl=1 THEN 0 + WHEN t.vitesse_moyenne_vl IS NULL THEN 0 ELSE t.vitesse_moyenne_vl::integer END) as vitesse_moyenne_vl, @@ -188,7 +189,10 @@ CREATE TEMP TABLE IF NOT EXISTS bduni_troncon AS -- TODO: remove t.bande_cyclable as bande_cyclable, t.reserve_aux_bus as reserve_aux_bus, - t.urbain as urbain, + (CASE + WHEN t.urbain IS NULL THEN 0 + ELSE t.urbain + END) as urbain, t.acces_pieton as acces_pieton, t.nature_de_la_restriction as nature_de_la_restriction, t.restriction_de_hauteur as restriction_de_hauteur,