Changes between Version 32 and Version 33 of BDCarthage2011 into eda2.0_RHT


Ignore:
Timestamp:
Oct 7, 2011 3:40:00 PM (14 years ago)
Author:
celine
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BDCarthage2011 into eda2.0_RHT

    v32 v33  
    182182select count(*) from rht.rht  ---114601 lines 
    183183select count(*) from rht.rht_bdcarthage --- 393393 lines 
     184 
     185select id_drain from rht.rht_bdcarthage where id_drain not in select id_drain from rht.rht_bdcarthage;  --- 
     186 
     187---Changement de buffer 
     188drop table if exists rht.rht_150b; 
     189create table rht.rht_150b as select id_drain, gid, st_buffer(the_geom,150,endcap=flat) as the_geom from rht.rht;   ---12578 ms 
     190CREATE INDEX indexrht_150b ON rht.rht_150b 
     191  USING GIST ( the_geom GIST_GEOMETRY_OPS ); 
     192CREATE INDEX indexrht150b 
     193ON rht.rht_150b 
     194USING btree (id_drain); 
     195 
     196drop table if exists rht.rht_bdcarthage2; 
     197create table rht.rht_bdcarthage2 as 
     198        select distinct on (id_bdcarth) id_bdcarth, min(distance) as distance, id_drain from ( 
     199                select r.id_drain, 
     200                id_bdcarth, 
     201                ST_Distance(r.the_geom,bdc.the_geom) as distance 
     202        from rht.rht r join rht.rht_150b rht150b on r.id_drain=rht150b.id_drain 
     203                        join    bd_carthage2011.troncon_hydrographique bdc on st_intersects(bdc.the_geom,rht150b.the_geom) 
     204        where nature !='Aqueduc, conduite forcée' and num_superp !=1 ) as toto 
     205        group by id_bdcarth, distance, id_drain 
     206        order by id_bdcarth ;  ---393393 lines 
     207CREATE INDEX indexrhtbdc2 
     208ON rht.rht_bdcarthage2 
     209USING btree (id_bdcarth); 
     210CREATE INDEX indexrhtbdc22 
     211 ON rht.rht_bdcarthage2 
     212 USING btree 
     213 (id_drain); 
    184214}}} 
    185215