diff --git a/geoindicators/src/main/groovy/org/orbisgis/geoclimate/geoindicators/WorkflowGeoIndicators.groovy b/geoindicators/src/main/groovy/org/orbisgis/geoclimate/geoindicators/WorkflowGeoIndicators.groovy index dd60d25e28..28a58c5106 100644 --- a/geoindicators/src/main/groovy/org/orbisgis/geoclimate/geoindicators/WorkflowGeoIndicators.groovy +++ b/geoindicators/src/main/groovy/org/orbisgis/geoclimate/geoindicators/WorkflowGeoIndicators.groovy @@ -2167,7 +2167,7 @@ String formatEstimatedBuilding(JdbcDataSource datasource, String inputTableName, datasource.eachRow(queryMapper) { row -> def heightRoof = row.height_roof def type = row.type - def formatedData = formatHeightsAndNbLevels(null, heightRoof, 0, h_lev_min, + def formatedData = formatHeightsAndNbLevels(0, heightRoof, 0, h_lev_min, type, null) def nbLevels = formatedData.nbLevels def heightWall = formatedData.heightWall diff --git a/osm/src/test/groovy/org/orbisgis/geoclimate/osm/InputDataFormattingTest.groovy b/osm/src/test/groovy/org/orbisgis/geoclimate/osm/InputDataFormattingTest.groovy index 12919615f5..cbac2aa5f7 100644 --- a/osm/src/test/groovy/org/orbisgis/geoclimate/osm/InputDataFormattingTest.groovy +++ b/osm/src/test/groovy/org/orbisgis/geoclimate/osm/InputDataFormattingTest.groovy @@ -288,35 +288,7 @@ class InputDataFormattingTest { def h2GIS = H2GIS.open("${file.absolutePath + File.separator}osm_gislayers;AUTO_SERVER=TRUE".toString()) - //def zoneToExtract ="Shanghai, Chine" - def zoneToExtract = "École Lycée Joliot-Curie,Rennes" - zoneToExtract = "New York" - zoneToExtract = "Québec, Québec (Agglomération), Capitale-Nationale, Québec, Canada" - //zoneToExtract = "Bucarest" - zoneToExtract = "Helsinki" - //zoneToExtract ="Göteborgs Stad" - //zoneToExtract = "Londres, Grand Londres, Angleterre, Royaume-Uni" - zoneToExtract = "Vannes" - //zoneToExtract="rezé" - //zoneToExtract = "Brest" - - //river Göta älv - zoneToExtract = [57.6753, 11.7982, 57.6955, 11.8656] - //Taal Crater Lake - //zoneToExtract =[13.4203,120.2165,14.5969 , 122.0293] - //Le Havre - zoneToExtract = [49.4370, -0.0230, 49.5359, 0.2053,] - //aeroway Toulouse https://www.openstreetmap.org/way/739797641#map=14/43.6316/1.3590 - zoneToExtract = [43.610539, 1.334152, 43.648808, 1.392689] - - zoneToExtract = "Göteborgs Stad" - - zoneToExtract = "Riantec" - zoneToExtract =[50, 8.6, 50.2, 8.8] - - //zoneToExtract="Sassenage" - - zoneToExtract=[50, 8.6, 50.2, 8.8] + def zoneToExtract = "Redon" Map extractData = OSM.InputDataLoading.extractAndCreateGISLayers(h2GIS, zoneToExtract) @@ -347,19 +319,13 @@ class InputDataFormattingTest { //Roads - def inputRoadTableName = OSM.InputDataFormatting.formatRoadLayer( h2GIS,extractData.road, extractData.zone_envelope) h2GIS.save(inputRoadTableName,"${file.absolutePath + File.separator}osm_road_${formatedPlaceName}.geojson", true) //Rails - /*format = OSM.InputDataFormatting.formatRailsLayer() - format.execute([ - datasource : h2GIS, - inputTableName : extractData.results.railTableName, - inputZoneEnvelopeTableName: extractData.results.zoneEnvelopeTableName, - epsg : epsg]) - h2GIS.getTable(format.results.outputTableName).save("./target/osm_rails_${formatedPlaceName}.geojson", true) - */ + def inputRailTableName = OSM.InputDataFormatting.formatRailsLayer( h2GIS,extractData.rail, extractData.zone_envelope) + h2GIS.save(inputRailTableName,"${file.absolutePath + File.separator}osm_rail_${formatedPlaceName}.geojson", true) + //Vegetation def inputVegetationTableName = OSM.InputDataFormatting.formatVegetationLayer( diff --git a/osm/src/test/groovy/org/orbisgis/geoclimate/osm/WorflowOSMTest.groovy b/osm/src/test/groovy/org/orbisgis/geoclimate/osm/WorflowOSMTest.groovy index b933adac14..8ed4cdc103 100644 --- a/osm/src/test/groovy/org/orbisgis/geoclimate/osm/WorflowOSMTest.groovy +++ b/osm/src/test/groovy/org/orbisgis/geoclimate/osm/WorflowOSMTest.groovy @@ -649,11 +649,11 @@ class WorflowOSMTest extends WorkflowAbstractTest { File dirFile = new File(directory) dirFile.delete() dirFile.mkdir() - def location = "Nice" + def location = "Redon" //def nominatim = org.orbisgis.geoclimate.osmtools.OSMTools.Utilities.getNominatimData("Redon") // location = nominatim.bbox - location=[43.725068,7.297883,43.727635,7.301284] + //location=[43.725068,7.297883,43.727635,7.301284] def osm_parmeters = [ "description" : "Example of configuration file to run the OSM workflow and store the result in a folder",