/** * NoiseModelling is an open-source tool designed to produce environmental noise maps on very large urban areas. It can be used as a Java library or be controlled through * a user friendly web interface. * * This version is developed by the DECIDE team from the Lab-STICC (CNRS) and by the Mixt Research Unit in Environmental Acoustics (Université Gustave Eiffel). * * * NoiseModelling is distributed under GPL 3 license. You can read a copy of this License in the file LICENCE provided with this software. * * Contact: contact@noise-planet.org */ /** */ import org.h2gis.api.ProgressVisitor import org.slf4j.Logger import org.slf4j.LoggerFactory import java.sql.Connection title = 'order_refl' description = '' inputs = [:] outputs = [result: [name: 'Result output string', title: 'Result output string', description: 'This type of result does not allow the blocks to be linked together.', type: String.class]] def runScript(connection, scriptFile, arguments) { Logger logger = LoggerFactory.getLogger("script") GroovyShell shell = new GroovyShell() Script scriptInstance = shell.parse(new File(scriptFile)) Object result = scriptInstance.invokeMethod("exec", [connection, arguments]) if(result != null) { logger.info(result.toString()) } } def exec(Connection connection, input) { // Step : Upload files to database //OSM runScript(connection, "noisemodelling/wps/Import_and_Export/Import_OSM.groovy", ["pathFile": "test_reflections/zoom_Madrid.osm.pbf", "targetSRID": "2062"]) // Sources runScript(connection, "noisemodelling/wps/Import_and_Export/Import_File.groovy", ["pathFile": "test_reflections/Point_Source.geojson", "inputSRID": "2062"]) // Receivers runScript(connection, "noisemodelling/wps/Receivers/Delaunay_Grid.groovy", ["tableBuilding": "BUILDINGS", "sourcesTableName": "POINT_SOURCE", "maxArea": 1500, 'Height':2.0]) // Step : Run Calculation runScript(connection, "noisemodelling/wps/NoiseModelling/Noise_level_from_source.groovy", ["tableBuilding": "BUILDINGS", "tableSources": "POINT_SOURCE", "tableReceivers": "RECEIVERS", "confReflOrder": "2", "confRaysName": "RAYS", "confMaxReflDist": "1000", "confMaxSrcDist": "1000", "confSkipLevening": true, "confSkipLnight": true, "confSkipLden": true]) // Step : Export (& see) the results runScript(connection, "noisemodelling/wps/Import_and_Export/Export_Table.groovy", ["exportPath": "D:/eruaud/Desktop/MUSE/SansGUI/NoiseModelling_4.0.5_without_gui/scriptrunner/test_reflections/Lday.geojson", "tableToExport": "LDAY_GEOM"]) runScript(connection, "noisemodelling/wps/Import_and_Export/Export_Table.groovy", ["exportPath": "D:/eruaud/Desktop/MUSE/SansGUI/NoiseModelling_4.0.5_without_gui/scriptrunner/test_reflections/Rays.geojson", "tableToExport": "RAYS"]) }