Changes between Version 4 and Version 5 of Cookbook CCM21_France


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

--

Legend:

Unmodified
Added
Removed
Modified
  • Cookbook CCM21_France

    v4 v5  
    11this is ticket: #49 
    22We need to only select a geographical region from the ccm plus all downstream segments within this region. 
     3Below we use the ST_Contains function 
    34{{{ 
    45/*boolean ST_Contains(geometry geomA, geometry geomB); 
     
    89 
    910 
     11-- first trial.. 
     12/* 
    1013SELECT count (*) from ccm21.riversegments r 
    1114join (SELECT ST_Union(f.the_geom) as singlegeom 
    1215    FROM france.departement As f) as sub 
    1316ON ST_Contains(sub.singlegeom,r.the_geom);  
     17*/ 
     18 -- we try to get the vector of seaoutlets that are within the geographical area 
     19select * from ccm21.riversegments r where wso_id in ( 
     20select distinct on (wso_id)  wso_id from ccm21.riversegments r 
     21join (SELECT ST_Union(f.the_geom) as singlegeom 
     22    FROM france.departement As f) as sub 
     23ON ST_Contains(sub.singlegeom,r.the_geom)); --170703 lines 
    1424}}}