Changes between Version 71 and Version 72 of CookBook join BDMAP_CCM v2
- Timestamp:
- Nov 11, 2010 8:36:42 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TabularUnified CookBook join BDMAP_CCM v2
v71 v72 257 257 REQUEST WITH SELECTION OF CORRECT CRITERIA FOR DISTANCE SEA, DISTANCE SOURCE, STRAHLER RANK 258 258 */ 259 drop table if exists bd_map.bdmap_ccm_full; 260 create table bd_map.bdmap_ccm_full as ( 259 261 260 select * from ( 262 261 select b.st_codecsp, … … 280 279 WHERE dist_source_ratio is TRUE 281 280 AND dist_sea_ratio is TRUE 282 AND strahler_diff is TRUE ); --10783 lines this is with repeated stations but selection has removed ~ 3000 lines281 AND strahler_diff is TRUE; --10783 lines this is with repeated stations but selection has removed ~ 3000 lines 283 282 /* 284 283 FINAL REQUEST … … 357 356 and b.distance_mer>0 358 357 ) as sub; -- 15 (R=15), 2234 (R=2279 including zero), 490 (R=517) OK 359 360 361 }}} 362 358 /* 359 * TABLE TO SHOW THE RESULTS IN A MAP FOR THOSE THAT WERE NOT SELECTED TOO 360 */ 361 362 drop table if exists bd_map.bdmap_ccm_full; 363 create table bd_map.bdmap_ccm_full as ( 364 select b.st_codecsp, 365 b.distance_source as dist_source_bdcar, 366 c.distance_source/1000 as dist_source_ccm, 367 (c.distance_source/(1000*b.distance_source))<=2 as dist_source_ratio, 368 b.distance_mer as dist_sea_bdcar, 369 c.cum_len_sea/1000 as dist_sea_ccm, 370 NOT((c.cum_len_sea/(1000*b.distance_mer))>2 and c.cum_len_sea>100000) as dist_sea_ratio, 371 b.strahler as strahler_bdcar, 372 c.strahlerccm as strahler_ccm, 373 (c.strahlerccm-b.strahler)<=1 as strahler_diff, 374 b.distance as distproj_bdcar, 375 c.distance as distproj_ccm, 376 id_trhyd, 377 gid, 378 c.the_geom 379 from bd_map.bd_map_bd_carthage b join bd_map.bdmap_ccm2 c on b.st_codecsp=c.st_codecsp 380 where b.distance_source >0 381 and b.distance_mer>0 382 ); 383 }}} 384