Changes between Version 42 and Version 43 of Noeud - parcours RHT


Ignore:
Timestamp:
Jan 5, 2012 5:44:21 PM (13 years ago)
Author:
celine
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Noeud - parcours RHT

    v42 v43  
    241241alter table rht.noeudmervs2 add column wso1_id integer; 
    242242 
    243  
    244243update rht.noeudmervs2 set (cumnbbar,dmer,wso1_id)= (jointure.cs_nbdams,jointure.cum_len_sea,jointure.wso1_id) from 
    245         -- resultat final de la jointure spatiale entre ccm et noeudfrontiere 
    246         (select distinct on (id_drain) id_drain, min(distance) as distance, wso1_id,cs_nbdams, cum_len_sea from ( 
    247                 -- requete intermédiaire dont on prend le min (sub) 
    248                 select id_drain, ST_distance(noeudfrontiere.the_geom,ccmrs.the_geom) as distance,ccmrs.* 
    249                 FROM ccm.riversegments_france ccmrs join 
    250                 (select id_drain, the_geom from rht.noeudmervs2 where noeudmer and zonegeo in ('Est','pyrénées')) as noeudfrontiere 
    251                 on ST_DWithin(noeudfrontiere.the_geom,ccmrs.the_geom, 500)) as sub 
    252         group by id_drain, distance, wso1_id,cs_nbdams, cum_len_sea) as jointure 
    253 where noeudmer.id_drain=jointure.id_drain; --100 lignes modifiées 
     244        -- resultat final de la jointure spatiale entre ccm et noeudfrontiere 
     245        (select distinct on (id_drain) id_drain, min(distance) as distance, wso1_id,cs_nbdams, cum_len_sea from ( 
     246                -- requete intermédiaire dont on prend le min (sub) 
     247                select id_drain, ST_distance(noeudfrontiere.the_geom,ccmrs.the_geom) as distance,ccmrs.* 
     248                FROM ccm.riversegments_france ccmrs join 
     249                (select id_drain, the_geom from rht.noeudmervs2 where noeudmer and zonegeo in ('Est','pyrénées')) as noeudfrontiere 
     250                on ST_DWithin(noeudfrontiere.the_geom,ccmrs.the_geom, 500)) as sub 
     251        group by id_drain, distance, wso1_id,cs_nbdams, cum_len_sea) as jointure 
     252where noeudmervs2.id_drain=jointure.id_drain; --100 lignes modifiées 
    254253}}} 
    255254