| 46 | |
| 47 | === Bretagne === |
| 48 | {{{ |
| 49 | drop table if exist uga2010.wso; |
| 50 | |
| 51 | drop table if exists uga2010.id_drain; |
| 52 | CREATE TABLE uga2010.id_drain ( |
| 53 | id serial PRIMARY KEY, |
| 54 | id_drain integer, |
| 55 | uga varchar(25) |
| 56 | ); |
| 57 | |
| 58 | --Bretagne |
| 59 | insert into uga2010.id_drain(id_drain) |
| 60 | select distinct on (id_drain) id_drain from rht.rht r |
| 61 | join (SELECT ST_Union(f.the_geom) as singlegeom |
| 62 | FROM uga2010.uga As f where libelle='Bretagne') as sub |
| 63 | ON ST_Intersects(sub.singlegeom,r.the_geom); |
| 64 | |
| 65 | UPDATE uga2010.id_drain set uga='Bretagne' where uga IS NULL -- 6468 lignes |
| 66 | }}} |