diff --git a/congestion_network_creation/cleaning_int_node.sql b/congestion_network_creation/cleaning_int_node.sql index 3003762..ee5d59b 100644 --- a/congestion_network_creation/cleaning_int_node.sql +++ b/congestion_network_creation/cleaning_int_node.sql @@ -1,6 +1,6 @@ -- update int_id <-> node_id layer with node geom -update congestion.network_int_px_21_1_updated +update congestion.network_int_px_21_1 set node_geom = geom from congestion.network_nodes a where network_int_px_21_1_updated.node_id = a.node_id @@ -11,7 +11,7 @@ where network_int_px_21_1_updated.node_id = a.node_id -- manually fixed them till no node_ids are being tagged -- to more than 1 int_id/px select node_id from -congestion.network_int_px_21_1_updated +congestion.network_int_px_21_1 group by node_id having count(1) >1 @@ -21,7 +21,7 @@ having count(1) >1 -- manually fixed them, and deleted ones that were the start and end vid of -- retired segments select * from congestion.network_nodes -left join congestion.network_int_px_21_1_updated a using (node_id) +left join congestion.network_int_px_21_1 a using (node_id) where a.node_id is null @@ -29,9 +29,9 @@ where a.node_id is null -- and those int_id have entries without px -- returned 8, updated table manually with temp as ( -select distinct int_id, px from congestion.network_int_px_21_1_updated +select distinct int_id, px from congestion.network_int_px_21_1 where int_id is not null and px is not null ) select * from temp -inner join congestion.network_int_px_21_1_updated a using (int_id) +inner join congestion.network_int_px_21_1 a using (int_id) where a.px is null