Changes between Version 6 and Version 7 of Cookbook CCM21_France


Ignore:
Timestamp:
May 4, 2010 4:59:37 PM (15 years ago)
Author:
cedric
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Cookbook CCM21_France

    v6 v7  
    77Geometry A contains Geometry B  
    88*/ 
    9  
    10  
    119-- first trial.. 
    1210/* 
     
    1715*/ 
    1816 -- we try to get the vector of seaoutlets that are within the geographical area 
    19 select * from ccm21.riversegments r where wso_id in ( 
     17}}} 
     18 -- a table containing three columns  
     19{{{ 
     20 drop table  if exists france.wso; 
     21 CREATE TABLE france.wso ( 
     22 id serial PRIMARY KEY, 
     23 wso_id integer, 
     24 area varchar(12) 
     25 ) 
     26}}} 
     27{{{ 
     28insert into france.wso(wso_id)  
    2029select distinct on (wso_id)  wso_id from ccm21.riversegments r 
    2130join (SELECT ST_Union(f.the_geom) as singlegeom 
    2231    FROM france.departement As f) as sub 
    23 ON ST_Contains(sub.singlegeom,r.the_geom)); --170703 lines 
     32ON ST_Contains(sub.singlegeom,r.the_geom); --170703 lines 
     33UPDATE france.wso set area='France' where area IS NULL 
     34 
     35select * from ccm21.riversegments where wso_id in (select wso_id from france.wso where area='France')--170703 lines 
    2436}}}