From fddd4eb692d0fe715d161bc2d574940ae6f0103e Mon Sep 17 00:00:00 2001 From: Sylvain PALOMINOS Date: Tue, 21 May 2019 14:23:00 +0200 Subject: [PATCH] Fix building. --- pom.xml | 1 - .../org/orbisgis/common/AbstractTablesInitialization.groovy | 2 +- .../groovy/org/orbisgis/common/InputDataFormatting.groovy | 2 +- .../groovy/org/orbisgis/processingchain/PrepareOSM.groovy | 6 ++++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 60bbf67f..8a574e89 100644 --- a/pom.xml +++ b/pom.xml @@ -144,7 +144,6 @@ http://nexus-ng.orbisgis.org/repository/orbisgis-snapshot true - always false diff --git a/prepare_data/src/main/groovy/org/orbisgis/common/AbstractTablesInitialization.groovy b/prepare_data/src/main/groovy/org/orbisgis/common/AbstractTablesInitialization.groovy index 8749df1e..5e7fd0cd 100644 --- a/prepare_data/src/main/groovy/org/orbisgis/common/AbstractTablesInitialization.groovy +++ b/prepare_data/src/main/groovy/org/orbisgis/common/AbstractTablesInitialization.groovy @@ -46,7 +46,7 @@ static IProcess initParametersAbstract(){ def vegetAbstractType = 'VEGET_ABSTRACT_TYPE_' + uuid def vegetAbstractParam = 'VEGET_ABSTRACT_PARAMETERS_' + uuid - datasource.executeScript(getClass().getResource('parametersAndAbstractTables.sql').toString(), + datasource.executeScript(getClass().getResourceAsStream('parametersAndAbstractTables.sql'), [BUILDING_ABSTRACT_USE_TYPE: buildingAbstractUseType, BUILDING_ABSTRACT_PARAMETERS: buildingAbstractParam, ROAD_ABSTRACT_TYPE: roadAbstractType, diff --git a/prepare_data/src/main/groovy/org/orbisgis/common/InputDataFormatting.groovy b/prepare_data/src/main/groovy/org/orbisgis/common/InputDataFormatting.groovy index de2c4781..86c1c5a0 100644 --- a/prepare_data/src/main/groovy/org/orbisgis/common/InputDataFormatting.groovy +++ b/prepare_data/src/main/groovy/org/orbisgis/common/InputDataFormatting.groovy @@ -149,7 +149,7 @@ static IProcess inputDataFormatting(){ def VEGET_STATS_EXT_ZONE='VEGET_STATS_EXT_ZONE' //Run the sql script - datasource.executeScript(getClass().getResource('inputDataFormatting.sql').toString(), + datasource.executeScript(getClass().getResourceAsStream('inputDataFormatting.sql'), [INPUT_BUILDING : inputBuilding, INPUT_ROAD: inputRoad, INPUT_RAIL: inputRail, INPUT_HYDRO : inputHydro, INPUT_VEGET: inputVeget, ZONE: inputZone, ZONE_NEIGHBORS: inputZoneNeighbors, H_LEV_MIN : hLevMin, H_LEV_MAX: hLevMax, H_THRESHOLD_LEV2: hThresholdLev2, ID_ZONE: idZone, diff --git a/processing_chain/src/main/groovy/org/orbisgis/processingchain/PrepareOSM.groovy b/processing_chain/src/main/groovy/org/orbisgis/processingchain/PrepareOSM.groovy index d37d1690..d4cf93e9 100644 --- a/processing_chain/src/main/groovy/org/orbisgis/processingchain/PrepareOSM.groovy +++ b/processing_chain/src/main/groovy/org/orbisgis/processingchain/PrepareOSM.groovy @@ -2,7 +2,9 @@ package org.orbisgis.processingchain import groovy.transform.BaseScript import org.orbisgis.SpatialUnits +import org.orbisgis.common.AbstractTablesInitialization import org.orbisgis.datamanager.JdbcDataSource +import org.orbisgis.osm.OSMGISLayers import org.orbisgis.processingchain.ProcessingChain import org.orbisgis.processmanagerapi.IProcess import org.orbisgis.processmanagerapi.IProcessFactory @@ -459,7 +461,7 @@ import org.slf4j.LoggerFactory return } //Init model - IProcess initParametersAbstract = org.orbisgis.common.AbstractTablesInitialization.initParametersAbstract() + IProcess initParametersAbstract = AbstractTablesInitialization.initParametersAbstract() if(!initParametersAbstract.execute(datasource:datasource)){ logger.info("Cannot initialize the geoclimate data model.") return @@ -469,7 +471,7 @@ import org.slf4j.LoggerFactory logger.info("Transform OSM data to GIS tables.") - IProcess prepareBuildings = org.orbisgis.osm.OSMGISLayers.prepareBuildings() + IProcess prepareBuildings = OSMGISLayers.prepareBuildings() if(!prepareBuildings.execute([datasource:datasource, osmTablesPrefix:osmTablesPrefix, buildingTableColumnsNames : buildingTableColumnsNames,