289 | | SET id_bdcarthage_troncon = id_bdcarth, id_bdcarthage_cours_d_eau = c_hyd_cdo, nom_cours_d_eau = toponyme1 |
290 | | FROM "SIG".troncon_hydrographique, (SELECT sg_id, MIN(ST_Distance(troncon_hydrographique.the_geom, station_geography.the_geom)) AS min FROM station_geography, "SIG".troncon_hydrographique WHERE ST_Expand(station_geography.the_geom, 300) && troncon_hydrographique.the_geom GROUP BY sg_id) min_dist |
291 | | WHERE station_geography.sg_id = min_dist.sg_id AND ST_Expand(station_geography.the_geom, 300) && troncon_hydrographique.the_geom AND ST_Distance(troncon_hydrographique.the_geom, station_geography.the_geom) = min_dist.min}}} |
| 290 | SET id_bdcarthage_troncon = id_bdcarth, |
| 291 | id_bdcarthage_cours_d_eau = c_hyd_cdo, |
| 292 | nom_cours_d_eau = toponyme1 |
| 293 | FROM "SIG".troncon_hydrographique, |
| 294 | (SELECT sg_id, MIN(ST_Distance(troncon_hydrographique.the_geom, station_geography.the_geom)) AS min |
| 295 | FROM station_geography, "SIG".troncon_hydrographique |
| 296 | WHERE ST_Expand(station_geography.the_geom, 300) && troncon_hydrographique.the_geom GROUP BY sg_id) min_dist |
| 297 | WHERE station_geography.sg_id = min_dist.sg_id |
| 298 | AND ST_Expand(station_geography.the_geom, 300) && troncon_hydrographique.the_geom |
| 299 | AND ST_Distance(troncon_hydrographique.the_geom, station_geography.the_geom) = min_dist.min |
| 300 | -- test de cédric |
| 301 | /* |
| 302 | e: |
| 303 | cd E:\IAV\eda\bdmap |
| 304 | psql -h localhost -U postgres --verbose --file "station_geography.sql" eda2.0_RHT |
| 305 | alter table station_geography set schema bdmap2009; |
| 306 | */ |
| 307 | SET search_path TO bdmap2009, public; -- vous la connaissez celle là ? |
| 308 | SELECT * FROM station_geography; --11379 |
| 309 | select * from station_geography sg join station st on st.st_codecsp=sg.st_codecsp; --11379 c'est effectivement la même chose.... |
| 310 | }}} |