From b3dbbd50c19949d2c551c89cce0327ac538c34f9 Mon Sep 17 00:00:00 2001 From: MaguetteD <102769925+MaguetteD@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:14:37 +0200 Subject: [PATCH 1/3] Update Create_Isosurface.groovy --- .../Acoustic_Tools/Create_Isosurface.groovy | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/wps_scripts/src/main/groovy/org/noise_planet/noisemodelling/wps/Acoustic_Tools/Create_Isosurface.groovy b/wps_scripts/src/main/groovy/org/noise_planet/noisemodelling/wps/Acoustic_Tools/Create_Isosurface.groovy index 0d9229b01..a33f2a357 100644 --- a/wps_scripts/src/main/groovy/org/noise_planet/noisemodelling/wps/Acoustic_Tools/Create_Isosurface.groovy +++ b/wps_scripts/src/main/groovy/org/noise_planet/noisemodelling/wps/Acoustic_Tools/Create_Isosurface.groovy @@ -24,7 +24,7 @@ import org.geotools.jdbc.JDBCDataStore import org.h2gis.utilities.GeometryTableUtilities import org.h2gis.utilities.TableLocation import org.h2gis.utilities.wrapper.ConnectionWrapper -import org.noise_planet.noisemodelling.jdbc.BezierContouring +import org.noise_planet.noisemodelling.jdbc.utils.IsoSurface import org.slf4j.Logger import org.slf4j.LoggerFactory @@ -100,7 +100,7 @@ def exec(Connection connection, input) { logger.info("inputs {}", input) // log inputs of the run - List isoLevels = BezierContouring.NF31_133_ISO // default values + List isoLevels = IsoSurface.NF31_133_ISO // default values if (input.containsKey("isoClass")) { isoLevels = new ArrayList<>() @@ -114,27 +114,27 @@ def exec(Connection connection, input) { int srid = GeometryTableUtilities.getSRID(connection, TableLocation.parse(levelTable)) - BezierContouring bezierContouring = new BezierContouring(isoLevels, srid) + IsoSurface isoSurface = new IsoSurface(isoLevels, srid) - bezierContouring.setPointTable(levelTable) + isoSurface.setPointTable(levelTable) if (input.containsKey("smoothCoefficient")) { double coefficient = input['smoothCoefficient'] as Double if (coefficient < 0.01) { - bezierContouring.setSmooth(false) + isoSurface.setSmooth(false) } else { - bezierContouring.setSmooth(true) - bezierContouring.setSmoothCoefficient(coefficient) + isoSurface.setSmooth(true) + isoSurface.setSmoothCoefficient(coefficient) } } else { - bezierContouring.setSmooth(true) - bezierContouring.setSmoothCoefficient(0.5) + isoSurface.setSmooth(true) + isoSurface.setSmoothCoefficient(0.5) } - bezierContouring.createTable(connection) + isoSurface.createTable(connection) - resultString = "Table " + bezierContouring.getOutputTable() + " created" + resultString = "Table " + isoSurface.getOutputTable() + " created" logger.info('End : Compute Isosurfaces') logger.info(resultString) @@ -156,4 +156,4 @@ def run(input) { Connection connection -> return [result: exec(connection, input)] } -} \ No newline at end of file +} From 2eaecf0185ac23c1a42f83e629a3851530cb2d8f Mon Sep 17 00:00:00 2001 From: nicolas-f Date: Fri, 11 Oct 2024 14:48:09 +0200 Subject: [PATCH 2/3] Revert "Update Create_Isosurface.groovy" This reverts commit b3dbbd50c19949d2c551c89cce0327ac538c34f9. --- .../Acoustic_Tools/Create_Isosurface.groovy | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/wps_scripts/src/main/groovy/org/noise_planet/noisemodelling/wps/Acoustic_Tools/Create_Isosurface.groovy b/wps_scripts/src/main/groovy/org/noise_planet/noisemodelling/wps/Acoustic_Tools/Create_Isosurface.groovy index a33f2a357..0d9229b01 100644 --- a/wps_scripts/src/main/groovy/org/noise_planet/noisemodelling/wps/Acoustic_Tools/Create_Isosurface.groovy +++ b/wps_scripts/src/main/groovy/org/noise_planet/noisemodelling/wps/Acoustic_Tools/Create_Isosurface.groovy @@ -24,7 +24,7 @@ import org.geotools.jdbc.JDBCDataStore import org.h2gis.utilities.GeometryTableUtilities import org.h2gis.utilities.TableLocation import org.h2gis.utilities.wrapper.ConnectionWrapper -import org.noise_planet.noisemodelling.jdbc.utils.IsoSurface +import org.noise_planet.noisemodelling.jdbc.BezierContouring import org.slf4j.Logger import org.slf4j.LoggerFactory @@ -100,7 +100,7 @@ def exec(Connection connection, input) { logger.info("inputs {}", input) // log inputs of the run - List isoLevels = IsoSurface.NF31_133_ISO // default values + List isoLevels = BezierContouring.NF31_133_ISO // default values if (input.containsKey("isoClass")) { isoLevels = new ArrayList<>() @@ -114,27 +114,27 @@ def exec(Connection connection, input) { int srid = GeometryTableUtilities.getSRID(connection, TableLocation.parse(levelTable)) - IsoSurface isoSurface = new IsoSurface(isoLevels, srid) + BezierContouring bezierContouring = new BezierContouring(isoLevels, srid) - isoSurface.setPointTable(levelTable) + bezierContouring.setPointTable(levelTable) if (input.containsKey("smoothCoefficient")) { double coefficient = input['smoothCoefficient'] as Double if (coefficient < 0.01) { - isoSurface.setSmooth(false) + bezierContouring.setSmooth(false) } else { - isoSurface.setSmooth(true) - isoSurface.setSmoothCoefficient(coefficient) + bezierContouring.setSmooth(true) + bezierContouring.setSmoothCoefficient(coefficient) } } else { - isoSurface.setSmooth(true) - isoSurface.setSmoothCoefficient(0.5) + bezierContouring.setSmooth(true) + bezierContouring.setSmoothCoefficient(0.5) } - isoSurface.createTable(connection) + bezierContouring.createTable(connection) - resultString = "Table " + isoSurface.getOutputTable() + " created" + resultString = "Table " + bezierContouring.getOutputTable() + " created" logger.info('End : Compute Isosurfaces') logger.info(resultString) @@ -156,4 +156,4 @@ def run(input) { Connection connection -> return [result: exec(connection, input)] } -} +} \ No newline at end of file From f79593a51df3f1c9c5993affeab2c317cc128227 Mon Sep 17 00:00:00 2001 From: nicolas-f Date: Fri, 11 Oct 2024 14:50:52 +0200 Subject: [PATCH 3/3] upload v4 again --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c11e6ac54..56b5bd08e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -47,7 +47,7 @@ jobs: - name: Unzip production artifacts run: cd wps_scripts && ./gradlew assembleDist && unzip build/distributions/scriptrunner.zip - name: Archive production artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: NoiseModelling_without_gui.zip path: wps_scripts/scriptrunner/ \ No newline at end of file