Changes between Version 41 and Version 42 of Joining dams ROE on CCM


Ignore:
Timestamp:
May 25, 2012 1:39:21 PM (13 years ago)
Author:
celine
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Joining dams ROE on CCM

    v41 v42  
    88 
    99{{{ 
     10#!sql 
    1011DROP table if exists geobs2010.roe_ccm_500_final_gid; 
    1112CREATE TABLE geobs2010.roe_ccm_500_final_gid as ( 
     
    4950#Problème de doublons 
    5051{{{ 
     52#!sql 
    5153select 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 
    5254 
     
    5658A vérifier : gid=298703, 293773, 266956, 272629  (pas de statut la plupart du temps) 
    5759{{{ 
     60#!sql 
    5861select * from geobs2010.roe_ccm_500_final where gid='298703' 
    5962select 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' 
     
    8285#Problèmes de projections 
    8386{{{ 
     87#!sql 
    8488select * from geobs2010.roe_ccm_500_final where distproj_bdcar-distproj_ccm>200 
    8589}}} 
     
    8791#Ref_id avec les mêmes hauteurs 
    8892{{{ 
     93#!sql 
    8994select * from  
    9095 (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  
     
    98103#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]] 
    99104{{{ 
    100  
     105#!sql 
    101106--Supression des doublons 
    102107--gid 298703 
     
    114119Barrages à supprimer, qui ne doivent pas être projetés sur la CCM car pas sur le bon cours d'eau correspondant. 
    115120{{{ 
     121#!sql 
    116122delete from geobs2010.roe_ccm_500_final_gid where ref_id in (10395) 
    117123}}} 
     
    121127J'ai des cs_nbdams et nbdams =NA 
    122128{{{ 
     129#!sql 
    123130select * from geobs2010.roe_ccm_500_final where gid in (69494,71197,248812,277251,304534,312705,316586) 
    124131}}} 
     
    126133Or 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]] 
    127134{{{ 
     135#!sql 
    128136insert into france.wso(wso_id) values ('125196'),('125112'),('401675'),('342882'),('350998'),('387315'),('347851'); 
    129137UPDATE france.wso set area='France' where area IS NULL; 
     
    136144avec une distance_sea_ccm <30 
    137145{{{ 
     146#!sql 
    138147SELECT 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  
    139148FROM geobs2010.roe_ccm_500_final_gid as s  
     
    149158Changements effectués : 
    150159{{{ 
     160#!sql 
    151161update geobs2010.roe_ccm_500_final_gid SET gid='229065' where ref_id='41580'; 
    152162update geobs2010.roe_ccm_500_final_gid SET gid='324318' where ref_id='36390'; 
     
    206216Pour savoir quels sont les barrages (ref_id) qui ont été vérifiés, ajout de la colonne verificationccm 
    207217{{{ 
     218#!sql 
    208219alter table geobs2010.roe_ccm_500_final_gid add column verificationccm boolean; 
    209220update 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);