Changes between Version 24 and Version 25 of BDCarthage2011 into eda2.0_RHT


Ignore:
Timestamp:
Sep 29, 2011 11:01:15 AM (14 years ago)
Author:
celine
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BDCarthage2011 into eda2.0_RHT

    v24 v25  
    3434== Joining !BdCarthage with RHT == 
    3535{{{ 
     36#!sql 
    3637select ST_IsClosed(the_geom) from rht.rht_200 order by ST_IsClosed(the_geom); 
    3738select ST_IsClosed(the_geom), id_bdcarth from bd_carthage2011.troncon_hydrographique order by ST_IsClosed(the_geom);  ---5 fermés 
     
    4748=== Bretagne === 
    4849{{{ 
     50#!sql 
    4951--- Create table uga2010.id_drain with id_drain from RHT for Bretagne  
    5052drop table if exists uga2010.wso; 
     
    112114 
    113115{{{ 
     116#!sql 
    114117---essai1 
    115118select r.*, id_bdcarth as gidbdc, 
     
    176179}}} 
    177180 
    178  
     181For France 
     182{{{ 
     183#!sql 
     184drop table if exists rht.rht_150; 
     185create table rht.rht_150 as select id_drain, gid, st_buffer(the_geom,150) as the_geom from rht.rht_bretagne;   ---12578 ms 
     186CREATE INDEX indexrht_150 ON rht.rht_150 
     187  USING GIST ( the_geom GIST_GEOMETRY_OPS ); 
     188CREATE INDEX indexrht150 
     189ON rht.rht_150 
     190USING btree (id_drain); 
     191 
     192drop table if exists rht.rht_bdcarthage; 
     193create table rht.rht_bdcarthage as 
     194        select distinct on (id_bdcarth) id_bdcarth, min(distance) as distance, id_drain from ( 
     195                select r.id_drain, 
     196                id_bdcarth, 
     197                ST_Distance(r.the_geom,bdc.the_geom) as distance 
     198        from rht.rht r join rht.rht_150 rht150 on r.id_drain=rht150.id_drain 
     199                        join    bd_carthage2011.troncon_hydrographique bdc on st_intersects(bdc.the_geom,rht150.the_geom) 
     200        where nature !='Aqueduc, conduite forcée' and num_superp !=1 ) as toto 
     201        group by id_bdcarth, distance, id_drain 
     202        order by id_bdcarth ;  ---22519 lines 86526ms 
     203 
     204select count(*) from bd_carthage2011.troncon_hydrographique  ---528422 lines 
     205select count(*) from rht.rht  ---114601 lines 
     206select count(*) from rht.rht_bdcarthage --- 22519 lines 
     207}}}