Changes between Version 6 and Version 7 of Cookbook CCM21_France
- Timestamp:
- May 4, 2010 4:59:37 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Cookbook CCM21_France
v6 v7 7 7 Geometry A contains Geometry B 8 8 */ 9 10 11 9 -- first trial.. 12 10 /* … … 17 15 */ 18 16 -- 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 {{{ 28 insert into france.wso(wso_id) 20 29 select distinct on (wso_id) wso_id from ccm21.riversegments r 21 30 join (SELECT ST_Union(f.the_geom) as singlegeom 22 31 FROM france.departement As f) as sub 23 ON ST_Contains(sub.singlegeom,r.the_geom)); --170703 lines 32 ON ST_Contains(sub.singlegeom,r.the_geom); --170703 lines 33 UPDATE france.wso set area='France' where area IS NULL 34 35 select * from ccm21.riversegments where wso_id in (select wso_id from france.wso where area='France')--170703 lines 24 36 }}}