Changes between Version 41 and Version 42 of Joining dams ROE on CCM
- Timestamp:
- May 25, 2012 1:39:21 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Joining dams ROE on CCM
v41 v42 8 8 9 9 {{{ 10 #!sql 10 11 DROP table if exists geobs2010.roe_ccm_500_final_gid; 11 12 CREATE TABLE geobs2010.roe_ccm_500_final_gid as ( … … 49 50 #Problème de doublons 50 51 {{{ 52 #!sql 51 53 select gid, id_trhyd, dist_source_bdcar, dist_sea_bdcar, height, distproj_bdcar, nbdams, distproj_ccm, count(dist_source_bdcar) as Doublons from geobs2010.roe_ccm_500_final group by dist_source_bdcar, gid, id_trhyd, dist_sea_bdcar, height, distproj_bdcar, nbdams, distproj_ccm order by doublons 52 54 … … 56 58 A vérifier : gid=298703, 293773, 266956, 272629 (pas de statut la plupart du temps) 57 59 {{{ 60 #!sql 58 61 select * from geobs2010.roe_ccm_500_final where gid='298703' 59 62 select o.ref_id_national, r.*, o.ref_sta_id from geobs2010.roe_ccm_500_final r inner join geobs2010.obstacle_referentiel o on o.ref_id=r.ref_id where gid='298703' … … 82 85 #Problèmes de projections 83 86 {{{ 87 #!sql 84 88 select * from geobs2010.roe_ccm_500_final where distproj_bdcar-distproj_ccm>200 85 89 }}} … … 87 91 #Ref_id avec les mêmes hauteurs 88 92 {{{ 93 #!sql 89 94 select * from 90 95 (select count(*) as num, gid as gid1,distproj_ccm as distproj_ccm1,dist_sea_ccm as dist_sea_ccm1, max(height) as height1 from geobs2010.roe_ccm_500_final … … 98 103 #A voir 27676, 27677, 27678 27676 à conserver ? Peut-être est-ce deux obstacles différents (pas le même nom) mais ont des localisation identiques [[BR]] 99 104 {{{ 100 105 #!sql 101 106 --Supression des doublons 102 107 --gid 298703 … … 114 119 Barrages à supprimer, qui ne doivent pas être projetés sur la CCM car pas sur le bon cours d'eau correspondant. 115 120 {{{ 121 #!sql 116 122 delete from geobs2010.roe_ccm_500_final_gid where ref_id in (10395) 117 123 }}} … … 121 127 J'ai des cs_nbdams et nbdams =NA 122 128 {{{ 129 #!sql 123 130 select * from geobs2010.roe_ccm_500_final where gid in (69494,71197,248812,277251,304534,312705,316586) 124 131 }}} … … 126 133 Or c'est france.wso qui a été utilisé pour crée la table riversegments_france --> A modifier et/ou à utiliser europe.wso dorénavant.[[BR]] 127 134 {{{ 135 #!sql 128 136 insert into france.wso(wso_id) values ('125196'),('125112'),('401675'),('342882'),('350998'),('387315'),('347851'); 129 137 UPDATE france.wso set area='France' where area IS NULL; … … 136 144 avec une distance_sea_ccm <30 137 145 {{{ 146 #!sql 138 147 SELECT s.ref_id, s.gid ,s.dist_sea_ccm, s.id_trhyd, CAST(distance(r.the_geom, s.the_geom) as decimal(15,1)) as distance, s.the_geom 139 148 FROM geobs2010.roe_ccm_500_final_gid as s … … 149 158 Changements effectués : 150 159 {{{ 160 #!sql 151 161 update geobs2010.roe_ccm_500_final_gid SET gid='229065' where ref_id='41580'; 152 162 update geobs2010.roe_ccm_500_final_gid SET gid='324318' where ref_id='36390'; … … 206 216 Pour savoir quels sont les barrages (ref_id) qui ont été vérifiés, ajout de la colonne verificationccm 207 217 {{{ 218 #!sql 208 219 alter table geobs2010.roe_ccm_500_final_gid add column verificationccm boolean; 209 220 update geobs2010.roe_ccm_500_final_gid SET verificationccm='t' where ref_id in (6187,6188,7372,7371,7918,7908,15460,27704,47867,10362,12546,26132,20881,19021);