| 48 | |
| 49 | {{{ |
| 50 | #!sql |
| 51 | --the request with france had troubles in getting some of the riversegments, the short ones that were not fully |
| 52 | -- france and were not part of a larger basin (the request was done on wso_id) |
| 53 | -- here I'm searching for those missing gid |
| 54 | select gid from ccm21.riversegments where wso_id in (select wso_id from france.wso where area='France') |
| 55 | except select gid from ccm21.riversegments where wso_id in ( |
| 56 | select distinct on (wso_id) wso_id from ccm21.riversegments r |
| 57 | join (SELECT ST_Union(f.the_geom) as singlegeom |
| 58 | FROM france.departement As f) as sub |
| 59 | ON ST_Contains(sub.singlegeom,r.the_geom)); |
| 60 | }}} |