wiki:Cookbook CCM21_France

Version 4 (modified by cedric, 15 years ago) (diff)

--

this is ticket: #49 We need to only select a geographical region from the ccm plus all downstream segments within this region.

/*boolean ST_Contains(geometry geomA, geometry geomB);
Description
Geometry A contains Geometry B 
*/


SELECT count (*) from ccm21.riversegments r
join (SELECT ST_Union(f.the_geom) as singlegeom
    FROM france.departement As f) as sub
ON ST_Contains(sub.singlegeom,r.the_geom);