Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ebocher committed Jun 5, 2024
1 parent 091a90e commit 35261c6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,6 @@ String gatherScales(JdbcDataSource datasource, String buildingTable, String bloc
listRsuRename.add("a.$col AS rsu_$col")
}
}
//def listBuildCol = datasource.getTable(buildingTable).getColumns()
def listBuildRename = []
for (col in buildIndicatorsColumns) {
if (col != "ID_RSU" && col != "ID_BLOCK" && col != "ID_BUILD" && col != "THE_GEOM") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1146,10 +1146,10 @@ def abstractModelTableBatchExportTable(JdbcDataSource output_datasource, def out
int BATCH_MAX_SIZE = 100
ITable inputRes = prepareTableOutput(h2gis_table_to_save, filter, inputSRID, h2gis_datasource, output_table, outputSRID, output_datasource)
if (inputRes) {
def outputColumns = output_datasource.getTable(output_table).getColumnsTypes()
def outputColumns = output_datasource.getColumnNamesTypes(output_table)
def outputconnection = output_datasource.getConnection()
try {
def inputColumns = inputRes.getColumnsTypes();
def inputColumns = inputRes.getColumnNamesTypes();
//We check if the number of columns is not the same
//If there is more columns in the input table we alter the output table
def outPutColumnsNames = outputColumns.keySet()
Expand Down Expand Up @@ -1255,7 +1255,7 @@ def abstractModelTableBatchExportTable(JdbcDataSource output_datasource, def out
* @param outputSRID srid code used to reproject the output table
* @return
*/
def indicatorTableBatchExportTable(def output_datasource, def output_table, def id_zone, def h2gis_datasource, h2gis_table_to_save, def filter, def inputSRID, def outputSRID, def reproject) {
def indicatorTableBatchExportTable(JdbcDataSource output_datasource, def output_table, def id_zone, def h2gis_datasource, h2gis_table_to_save, def filter, def inputSRID, def outputSRID, def reproject) {
if (output_table) {
if (h2gis_table_to_save) {
if (h2gis_datasource.hasTable(h2gis_table_to_save)) {
Expand All @@ -1266,11 +1266,11 @@ def indicatorTableBatchExportTable(def output_datasource, def output_table, def
int BATCH_MAX_SIZE = 100;
ITable inputRes = prepareTableOutput(h2gis_table_to_save, filter, inputSRID, h2gis_datasource, output_table, outputSRID, output_datasource)
if (inputRes) {
def outputColumns = output_datasource.getTable(output_table).getColumnsTypes();
def outputColumns = output_datasource.getColumnNamesTypes(output_table)
outputColumns.remove("gid")
def outputconnection = output_datasource.getConnection()
try {
def inputColumns = inputRes.getColumnsTypes();
def inputColumns = inputRes.getColumnNamesTypes()
//We check if the number of columns is not the same
//If there is more columns in the input table we alter the output table
def outPutColumnsNames = outputColumns.keySet()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ ${osmTablesPrefix}_way_member, ${osmTablesPrefix}_way_not_taken_into_account, ${
def table = h2gis.getTable("output")
assertNotNull table

def columns = table.columns
def columns = table.getColumnNames()
assertEquals 4, columns.size()
assertEquals 4, columns.intersect(["ID_NODE", "THE_GEOM", "build", "key1"]).size()
assertFalse columns.contains("WATER")
Expand Down Expand Up @@ -545,7 +545,7 @@ ${osmTablesPrefix}_way_member, ${osmTablesPrefix}_way_not_taken_into_account, ${
assertTrue OSMTools.TransformUtils.extractNodesAsPoints(h2gis, prefix, epsgCode, outTable, [], [])
def table = h2gis.getTable("output")
assertNotNull table
def columns = table.columns
def columns = table.getColumnNames()
assertEquals 14, columns.size()
assertEquals 14, columns.intersect(["ID_NODE", "THE_GEOM", "build",
"building", "material", "road", "key", "key1", "key2",
Expand Down

0 comments on commit 35261c6

Please sign in to comment.