929 | | ~~ |
930 | | --------------------- |
931 | | -- Managing the holes |
932 | | ------------------------ |
933 | | -- Cleanup before integrating missing catchments, we have to discards all polygons (from clc) laying outside the catchments fully within regions |
934 | | -- selecting polygons outside the catchments |
935 | | CREATE TABLE clc.clipped_outside AS( |
936 | | SELECT cc.clcgid,cc.gid, cc.code_00,cc.the_geom,cc.id FROM clc.clipped cc |
937 | | EXCEPT ( |
938 | | -- Selecting polygons inside catchments that are withint the regions calculated |
939 | | SELECT cc.clcgid,cc.gid, cc.code_00,cc.the_geom,cc.id FROM clc.clipped cc |
940 | | INNER JOIN ( SELECT the_geom FROM ccm21.catchments c |
941 | | WHERE gid in(SELECT gid FROM clc.clipped))AS sub |
942 | | ON ST_contains(sub.the_geom,cc.the_geom)));~~ |
| 929 | |