diff --git a/noisemodelling-jdbc/src/main/java/org/noise_planet/noisemodelling/jdbc/NoiseMapMaker.java b/noisemodelling-jdbc/src/main/java/org/noise_planet/noisemodelling/jdbc/NoiseMapMaker.java index b49f10fc8..f37a142b6 100644 --- a/noisemodelling-jdbc/src/main/java/org/noise_planet/noisemodelling/jdbc/NoiseMapMaker.java +++ b/noisemodelling-jdbc/src/main/java/org/noise_planet/noisemodelling/jdbc/NoiseMapMaker.java @@ -26,7 +26,7 @@ import java.util.*; /** - * + * Create SQL Tables from a stream of noise levels */ public class NoiseMapMaker implements NoiseMapByReceiverMaker.PropagationProcessDataFactory, NoiseMapByReceiverMaker.IComputeRaysOutFactory, ProfilerThread.Metric { NoiseMapParameters noiseMapParameters; diff --git a/noisemodelling-jdbc/src/main/java/org/noise_planet/noisemodelling/jdbc/NoiseMapParameters.java b/noisemodelling-jdbc/src/main/java/org/noise_planet/noisemodelling/jdbc/NoiseMapParameters.java index 85d9669c2..5526fd4b5 100644 --- a/noisemodelling-jdbc/src/main/java/org/noise_planet/noisemodelling/jdbc/NoiseMapParameters.java +++ b/noisemodelling-jdbc/src/main/java/org/noise_planet/noisemodelling/jdbc/NoiseMapParameters.java @@ -69,6 +69,28 @@ public int getMaximumRaysOutputCount() { Boolean sqlOutputFileCompression = true; Boolean dropResultsTable = true; public boolean computeLAEQOnly = false; + + /** + * If true the position of the receiver (with the altitude if available) will be exported into the results tables + */ + boolean exportReceiverPosition = false; + + /** + * @return If true the position of the receiver (with the altitude if available) will be exported into the results + * tables + */ + public boolean isExportReceiverPosition() { + return exportReceiverPosition; + } + + /** + * @param exportReceiverPosition If true the position of the receiver (with the altitude if available) will be + * exported into the results tables + */ + public void setExportReceiverPosition(boolean exportReceiverPosition) { + this.exportReceiverPosition = exportReceiverPosition; + } + /** * @param maximumRaysOutputCount if export rays, do not keep more than this number of rays per computation area (0 infinite) */ diff --git a/noisemodelling-jdbc/src/main/java/org/noise_planet/noisemodelling/jdbc/NoiseMapWriter.java b/noisemodelling-jdbc/src/main/java/org/noise_planet/noisemodelling/jdbc/NoiseMapWriter.java index e5f7b911f..7c3856b21 100644 --- a/noisemodelling-jdbc/src/main/java/org/noise_planet/noisemodelling/jdbc/NoiseMapWriter.java +++ b/noisemodelling-jdbc/src/main/java/org/noise_planet/noisemodelling/jdbc/NoiseMapWriter.java @@ -9,7 +9,9 @@ package org.noise_planet.noisemodelling.jdbc; +import org.locationtech.jts.geom.GeometryFactory; import org.locationtech.jts.geom.LineString; +import org.locationtech.jts.geom.PrecisionModel; import org.noise_planet.noisemodelling.jdbc.utils.StringPreparedStatements; import org.noise_planet.noisemodelling.propagation.cnossos.CnossosPath; import org.noise_planet.noisemodelling.propagation.Attenuation; @@ -29,7 +31,9 @@ import static org.noise_planet.noisemodelling.pathfinder.utils.AcousticIndicatorsFunctions.*; import static org.noise_planet.noisemodelling.pathfinder.utils.AcousticIndicatorsFunctions.dbaToW; - +/** + * Process that run SQL query to feed tables + */ public class NoiseMapWriter implements Runnable { Logger LOGGER = LoggerFactory.getLogger(NoiseMapWriter.class); File sqlFilePath; @@ -140,6 +144,9 @@ void processStack(String tableName, ConcurrentLinkedDeque