70 | | ---Spain-Atl |
71 | | insert into europe.wso1(wso_id, wso1_id) |
72 | | (select wso_id, wso1_id from europe.wso where area='Spain' |
73 | | except (select wso_id from europe.wso where area='France')) |
74 | | intersect (select wso_id from ccm21.seaoutlets where area_cd='A1'); |
75 | | UPDATE europe.wso1 set area='Spain_Atl' where area IS NULL; --348 lines |
76 | | |
77 | | insert into europe.wso1(wso_id,wso1_id) |
78 | | (select wso_id, wso1_id from europe.wso where area='Spain' |
79 | | except (select wso_id from europe.wso where area='France')) |
80 | | intersect (select wso_id from european_wise2008.rbd_f1v3 where name_eng='Basque County internal basins'); |
| 70 | ---Basque |
| 71 | insert into europe.wso1(wso_id, wso1_id) |
| 72 | select distinct on (wso_id, wso1_id) wso_id, wso1_id from ccm21.riversegments r1 where wso_id in (select r.wso_id from ccm21.riversegments r |
| 73 | join (SELECT the_geom |
| 74 | FROM european_wise2008.rbd_f1v3 As f where gid=41) as sub |
| 75 | ON ST_Intersects(sub.the_geom,r.the_geom)) or wso_id in ('291467','297569','297544','420706','319592','297608','319864','319930','319559'); |
| 76 | UPDATE europe.wso1 set area='Basque' where area IS NULL; --2680 lines |
| 77 | drop view if exists europe.spain; |
| 78 | |
| 79 | CREATE VIEW europe.spain as select r1.* from ccm21.riversegments r1 where wso_id in (select r.wso_id from ccm21.riversegments r |
| 80 | join (SELECT the_geom |
| 81 | FROM european_wise2008.rbd_f1v3 As f where gid=41) as sub |
| 82 | ON ST_Intersects(sub.the_geom,r.the_geom)) or wso_id in ('291467','297569','297544','420706','319592','297608','319864','319930','319559'); |