Changes between Version 1 and Version 2 of Surface en eau


Ignore:
Timestamp:
Jan 31, 2012 2:52:10 PM (13 years ago)
Author:
celine
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Surface en eau

    v1 v2  
    22 
    33Récupération de la surface en eau (couche surfacique de Bdcarthage) sur le RHT 
     4 
     5Calcul de la surface en eau de la couche surfacique[[BR]] 
     6Plan d'eau, bassin, réservoir  + Ensemble de petits plans d'eau +Ecoulement d'eau = 3431.711333+15.37315377+173.866688[[BR]] 
    47{{{ 
    58#!sql 
    6 select id_drain, id_bdcarth from rht.rhtvs2 r inner join bd_carthage2011.hydrographie_surfacique bd on st_within(r.the_geom,  
    7 st_buffer(bd.the_geom,100)) order by id_bdcarth; 
     9alter table bd_carthage2011.hydrographie_surfacique add column surface numeric; 
     10update bd_carthage2011.hydrographie_surfacique set surface=sub.surface from (select id_bdcarth, area2d(the_geom) as surface from bd_carthage2011.hydrographie_surfacique) as sub; 
     11 
     12COMMENT ON COLUMN bd_carthage2011.hydrographie_surfacique.surface IS "Surface en m² calculée avec requête spatiale area2d" 
     13 
     14select sum(area2d(the_geom)), type from bd_carthage2011.hydrographie_surfacique group by type; 
    815}}} 
     16 
     17Création d'un buffer 100m pour récupérer les tronçons inclus dans la couche surfacique bdcarthage 
     18{{{ 
     19#!sql 
     20drop table if exists bd_carthage2011.hydrographie_surfacique_100; 
     21create table bd_carthage2011.hydrographie_surfacique_100 as  
     22        select id_bdcarth, nature, type, toponyme, st_buffer(the_geom,100) as the_geom from bd_carthage2011.hydrographie_surfacique; 
     23CREATE INDEX indexhydro_100 ON bd_carthage2011.hydrographie_surfacique_100 
     24  USING GIST ( the_geom GIST_GEOMETRY_OPS ); 
     25}}} 
     26 
     27Jointure couche surfacique bdcarthage - RHT 
     28{{{ 
     29#!sql 
     30select id_drain, id_bdcarth from rht.rhtvs2 r inner join bd_carthage2011.hydrographie_surfacique_100 bd on st_contains(bd.the_geom,  
     31r.the_geom) order by id_bdcarth; 
     32 
     33select id_drain, id_bdcarth from rht.rhtvs2 r inner join bd_carthage2011.hydrographie_surfacique_100 bd on st_within(r.the_geom,  
     34bd.the_geom) order by id_bdcarth; 
     35}}}