@@ -267,7 +267,7 @@ class WorkflowBDTopo_V2Test extends WorkflowAbstractTest{
267
267
" block_indicators" :" block_indicators" ,
268
268
" rsu_indicators" :" rsu_indicators" ,
269
269
" rsu_lcz" :" rsu_lcz" ,
270
- " zones " :" zones " ]]],
270
+ " zone " :" zone " ]]],
271
271
" parameters" :
272
272
[" distance" : 0 ,
273
273
" hLevMin" : 3 ,
@@ -316,7 +316,7 @@ class WorkflowBDTopo_V2Test extends WorkflowAbstractTest{
316
316
" block_indicators" :" block_indicators" ,
317
317
" rsu_indicators" :" rsu_indicators" ,
318
318
" rsu_lcz" :" rsu_lcz" ,
319
- " zones " :" zones " ]]],
319
+ " zone " :" zone " ]]],
320
320
" parameters" :
321
321
[" distance" : 0 ,
322
322
" hLevMin" : 3 ,
@@ -388,7 +388,7 @@ class WorkflowBDTopo_V2Test extends WorkflowAbstractTest{
388
388
" block_indicators" :" block_indicators" ,
389
389
" rsu_indicators" :" rsu_indicators" ,
390
390
" rsu_lcz" :" rsu_lcz" ,
391
- " zones " :" zones " , " grid_indicators" :" grid_indicators" ]
391
+ " zone " :" zone " , " grid_indicators" :" grid_indicators" ]
392
392
// Drop all output tables if exist
393
393
postGIS. execute(" DROP TABLE IF EXISTS ${ outputTables.values().join(",")} ;" );
394
394
String directory = " ./target/bdtopo_workflow_postgis"
@@ -445,7 +445,7 @@ class WorkflowBDTopo_V2Test extends WorkflowAbstractTest{
445
445
" block_indicators" :" block_indicators" ,
446
446
" rsu_indicators" :" rsu_indicators" ,
447
447
" rsu_lcz" :" rsu_lcz" ,
448
- " zones " :" zones " , " grid_indicators" :" grid_indicators" ]
448
+ " zone " :" zone " , " grid_indicators" :" grid_indicators" ]
449
449
// Drop all output tables if exist
450
450
postGIS. execute(" DROP TABLE IF EXISTS ${ outputTables.values().join(",")} ;" . toString());
451
451
String directory = " ./target/bdtopo_workflow_postgis_bbox"
@@ -472,8 +472,7 @@ class WorkflowBDTopo_V2Test extends WorkflowAbstractTest{
472
472
" parameters" :
473
473
[" distance" : 0 ,
474
474
rsu_indicators : [
475
- " indicatorUse" : [" LCZ" , " UTRF" ],
476
- " svfSimplified" : true
475
+ " indicatorUse" : [" LCZ" , " UTRF" ]
477
476
],
478
477
" grid_indicators" : [
479
478
" x_size" : 10 ,
@@ -528,8 +527,9 @@ class WorkflowBDTopo_V2Test extends WorkflowAbstractTest{
528
527
]
529
528
IProcess process = BDTopo_V2.WorkflowBDTopo_V2 . workflow()
530
529
assertTrue (process. execute(input : createConfigFile(bdTopoParameters, directory)))
530
+ def tableNames = process. results. output. values()
531
531
H2GIS h2gis = H2GIS . open(" ${ directory+File.separator} geoclimate_chain_db;AUTO_SERVER=TRUE" )
532
- assertTrue h2gis. firstRow(" select count(*) as count from grid_indicators where water_fraction>0" ). count> 0
532
+ assertTrue h2gis. firstRow(" select count(*) as count from ${ tableNames. grid_indicators[0] } where water_fraction>0" ). count> 0
533
533
}
534
534
535
535
@Test
@@ -572,11 +572,13 @@ class WorkflowBDTopo_V2Test extends WorkflowAbstractTest{
572
572
]
573
573
IProcess process = BDTopo_V2.WorkflowBDTopo_V2 . workflow()
574
574
assertTrue (process. execute(input : createConfigFile(bdTopoParameters, directory)))
575
+ def tableNames = process. results. output. values();
576
+ def grid_table = tableNames. grid_indicators[0 ]
575
577
H2GIS h2gis = H2GIS . open(" ${ directory+File.separator} geoclimate_chain_db;AUTO_SERVER=TRUE" )
576
- assertTrue h2gis. firstRow(" select count(*) as count from grid_indicators " . toString()). count== 100
577
- assertTrue h2gis. firstRow(" select count(*) as count from grid_indicators where WATER_FRACTION>0" . toString()). count== 0
578
- assertTrue h2gis. firstRow(" select count(*) as count from grid_indicators where HIGH_VEGETATION_FRACTION>0" . toString()). count> 0
579
- assertTrue h2gis. firstRow(" select count(*) as count from grid_indicators where LOW_VEGETATION_FRACTION>0" . toString()). count== 0
578
+ assertTrue h2gis. firstRow(" select count(*) as count from $g rid_table " . toString()). count== 100
579
+ assertTrue h2gis. firstRow(" select count(*) as count from $g rid_table where WATER_FRACTION>0" . toString()). count== 0
580
+ assertTrue h2gis. firstRow(" select count(*) as count from $g rid_table where HIGH_VEGETATION_FRACTION>0" . toString()). count> 0
581
+ assertTrue h2gis. firstRow(" select count(*) as count from $g rid_table where LOW_VEGETATION_FRACTION>0" . toString()). count== 0
580
582
}
581
583
582
584
@Test
@@ -610,8 +612,9 @@ class WorkflowBDTopo_V2Test extends WorkflowAbstractTest{
610
612
]
611
613
IProcess process = BDTopo_V2.WorkflowBDTopo_V2 . workflow()
612
614
assertTrue (process. execute(input : createConfigFile(bdTopoParameters, directory)))
615
+ def tableNames = process. results. output. values();
613
616
H2GIS h2gis = H2GIS . open(" ${ directory+File.separator} geoclimate_chain_db;AUTO_SERVER=TRUE" )
614
- assertTrue h2gis. firstRow(" select count(*) as count from grid_indicators where water_fraction>0" ). count> 0
617
+ assertTrue h2gis. firstRow(" select count(*) as count from ${ tableNames. grid_indicators[0] } where water_fraction>0" ). count> 0
615
618
}
616
619
617
620
@Test
@@ -645,8 +648,9 @@ class WorkflowBDTopo_V2Test extends WorkflowAbstractTest{
645
648
]
646
649
IProcess process = BDTopo_V2.WorkflowBDTopo_V2 . workflow()
647
650
assertTrue (process. execute(input : createConfigFile(bdTopoParameters, directory)))
651
+ def tableNames = process. results. output. values();
648
652
H2GIS h2gis = H2GIS . open(" ${ directory+File.separator} geoclimate_chain_db;AUTO_SERVER=TRUE" )
649
- assertTrue h2gis. firstRow(" select count(*) as count from grid_indicators where LCZ_PRIMARY is not null" ). count> 0
653
+ assertTrue h2gis. firstRow(" select count(*) as count from ${ tableNames. grid_indicators[0] } where LCZ_PRIMARY is not null" ). count> 0
650
654
}
651
655
652
656
@Test
@@ -781,7 +785,7 @@ class WorkflowBDTopo_V2Test extends WorkflowAbstractTest{
781
785
" block_indicators" :" block_indicators_2154" ,
782
786
" rsu_indicators" :" rsu_indicators_2154" ,
783
787
" rsu_lcz" :" rsu_lcz_2154" ,
784
- " zones " :" zones_2154 " ,
788
+ " zone " :" zone_2154 " ,
785
789
" building_utrf" :" building_utrf_2154" ,
786
790
" rsu_utrf_area" :" rsu_utrf_area_2154" ,
787
791
" rsu_utrf_floor_area" :" rsu_utrf_floor_area_2154" ,
0 commit comments