63 | | drop table if exists rht.rht_topology; |
64 | | CREATE table rht.rht_topology AS select * from rht.rht r inner join rht.topologie_rht_sept2011 t on t.id_draintopo=r.id_drain; |
65 | | CREATE INDEX indextopo ON rht.rht_topology USING btree (id_draintopo); |
66 | | CREATE INDEX indextopogeom ON rht.rht_topology |
67 | | USING GIST ( the_geom GIST_GEOMETRY_OPS ); |
68 | | |
69 | | COMMENT ON table rht.rht_topology IS 'Joining between rht and topologie_rht_sept2011 to see it on Qgis'; |
70 | | |
71 | | drop table if exists rht.noeudmer; |
72 | | create table rht.noeudmer as select * from rht.rht_topology where tnode not in (select fnode from rht.topologie_rht_sept2011); |
73 | | CREATE INDEX indexmer ON rht.noeudmer USING btree (id_drain); |
74 | | CREATE INDEX indexmergeom ON rht.noeudmer USING GIST ( the_geom GIST_GEOMETRY_OPS ); |
75 | | COMMENT ON table rht.noeudmer IS 'Table test to know the downstream node from the sea'; |
76 | | |
77 | | select count(*) from rht.noeudmer; --- 1114 lines |
78 | | }}} |