Skip to content

Commit

Permalink
fix(cost-calc): urbain can now be NULL in bduni
Browse files Browse the repository at this point in the history
  • Loading branch information
azarz committed Sep 19, 2023
1 parent 346d024 commit 687e4af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion sql/bdtopo_v3.3.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 5 additions & 1 deletion sql/bduni_convert.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 687e4af

Please sign in to comment.