| 964 | Calculating for France and outside from France |
| 965 | {{{ |
| 966 | #!sql |
| 967 | BEGIN; |
| 968 | INSERT INTO clc.clipped |
| 969 | SELECT clc.gid as clcgid, sub1.gid,code_00, ST_Multi(ST_Intersection(clc.the_geom, sub1.the_geom)) the_geom |
| 970 | FROM clc.clc00_v2_europe clc |
| 971 | INNER JOIN |
| 972 | (SELECT gid, c.the_geom FROM ccm21.catchments c where wso1_id IN ( |
| 973 | SELECT wso1_id FROM clc.remaining_catchment_france) ) AS sub1 |
| 974 | |
| 975 | ON ST_Intersects (sub1.the_geom,clc.the_geom); |
| 976 | COMMIT; |
| 977 | |
| 978 | BEGIN; |
| 979 | INSERT INTO clc.clipped |
| 980 | SELECT clc.gid as clcgid, sub1.gid,code_00, ST_Multi(ST_Intersection(clc.the_geom, sub1.the_geom)) the_geom |
| 981 | FROM clc.clc00_v2_europe clc |
| 982 | INNER JOIN |
| 983 | (SELECT gid, c.the_geom FROM ccm21.catchments c where wso1_id IN ( |
| 984 | SELECT wso1_id FROM clc.remaining_catchment |
| 985 | EXCEPT (SELECT wso1_id FROM clc.remaining_catchment_france ))) AS sub1 |
| 986 | |
| 987 | ON ST_Intersects (sub1.the_geom,clc.the_geom); |
| 988 | COMMIT; |
| 989 | }}} |