Class DelaunayReceiversMaker
- java.lang.Object
-
- org.noise_planet.noisemodelling.jdbc.GridMapMaker
-
- org.noise_planet.noisemodelling.jdbc.DelaunayReceiversMaker
-
public class DelaunayReceiversMaker extends GridMapMaker
Create input receivers built from Delaunay for contructing a NoiseMap rendering. SQL syntax is compatible with H2 and PostGIS.- Author:
- Nicolas Fortin, SU Qi
-
-
Field Summary
-
Fields inherited from class org.noise_planet.noisemodelling.jdbc.GridMapMaker
bodyBarrier, buildingTableParameters, computeHorizontalDiffraction, computeVerticalDiffraction, demTable, geometryFactory, gridDim, groundSurfaceSplitSideLength, gs, mainEnvelope, maximumPropagationDistance, maximumReflectionDistance, MINIMAL_BUFFER_RATIO, receiverHasAbsoluteZCoordinates, soilTableName, sound_lvl_field, soundReflectionOrder, sourceHasAbsoluteZCoordinates, sourcesTableName, verbose
-
-
Constructor Summary
Constructors Constructor Description DelaunayReceiversMaker(String buildingsTableName, String sourcesTableName)
Create constructor DelaunayReceiversMaker
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
computeDelaunay(LayerDelaunay cellMesh, org.locationtech.jts.geom.Envelope mainEnvelope, int cellI, int cellJ, double maxSrcDist, Collection<org.locationtech.jts.geom.Geometry> sources, double minRecDist, double maximumArea, double buildingBuffer, List<Building> buildings)
Delaunay triangulation of Sub-Domainvoid
fetchCellSource(Connection connection, org.locationtech.jts.geom.Envelope fetchEnvelope, boolean doIntersection, List<org.locationtech.jts.geom.Geometry> sourceGeometries)
Fetch source geometries and powervoid
generateReceivers(Connection connection, int cellI, int cellJ, String receiverTableName, String trianglesTableName, AtomicInteger receiverPK)
static void
generateResultTable(Connection connection, String receiverTableName, String trianglesTableName, AtomicInteger receiverPK, List<org.locationtech.jts.geom.Coordinate> vertices, org.locationtech.jts.geom.GeometryFactory geometryFactory, List<Triangle> triangles, int cellI, int cellJ, int gridDim)
double
getBuildingBuffer()
protected org.locationtech.jts.geom.Envelope
getComputationEnvelope(Connection connection)
Retrieves the computation envelope based on data stored in the database tables.double
getEpsilon()
String
getExceptionDumpFolder()
double
getGeometrySimplificationDistance()
double
getMaximumArea()
long
getNbreceivers()
double
getReceiverHeight()
double
getRoadWidth()
boolean
isIsoSurfaceInBuildings()
void
run(Connection connection, String verticesTableName, String triangleTableName)
Executes the Delaunay triangulation process for a grid of subdomains.void
setBuildingBuffer(double buildingBuffer)
Do not add receivers closer to specified distancevoid
setEpsilon(double epsilon)
void
setExceptionDumpFolder(String exceptionDumpFolder)
void
setGeometrySimplificationDistance(double geometrySimplificationDistance)
void
setIsoSurfaceInBuildings(boolean isoSurfaceInBuildings)
void
setMaximumArea(double maximumArea)
void
setReceiverHeight(double receiverHeight)
void
setRoadWidth(double roadWidth)
-
Methods inherited from class org.noise_planet.noisemodelling.jdbc.GridMapMaker
getBuildingsTableName, getBuildingTableParameters, getCellEnv, getCellEnv, getCellHeight, getCellWidth, getDemTable, getGeometryFactory, getGridDim, getGroundSurfaceSplitSideLength, getGs, getHeightField, getMainEnvelope, getMaximumPropagationDistance, getMaximumReflectionDistance, getSoilTableName, getSound_lvl_field, getSoundReflectionOrder, getSourcesTableName, getWallAbsorption, initialize, isComputeHorizontalDiffraction, isComputeVerticalDiffraction, isReceiverHasAbsoluteZCoordinates, isSourceHasAbsoluteZCoordinates, isVerbose, iszBuildings, setBodyBarrier, setComputeHorizontalDiffraction, setComputeVerticalDiffraction, setDemTable, setGridDim, setGroundSurfaceSplitSideLength, setGs, setHeightField, setMainEnvelope, setMaximumPropagationDistance, setMaximumReflectionDistance, setReceiverHasAbsoluteZCoordinates, setSoilTableName, setSound_lvl_field, setSoundReflectionOrder, setSourceHasAbsoluteZCoordinates, setVerbose, setWallAbsorption, setzBuildings
-
-
-
-
Method Detail
-
isIsoSurfaceInBuildings
public boolean isIsoSurfaceInBuildings()
- Returns:
- True if isosurface will be placed into buildings
-
setIsoSurfaceInBuildings
public void setIsoSurfaceInBuildings(boolean isoSurfaceInBuildings)
- Parameters:
isoSurfaceInBuildings
- Set true in order to place isosurface in buildings
-
run
public void run(Connection connection, String verticesTableName, String triangleTableName) throws SQLException
Executes the Delaunay triangulation process for a grid of subdomains. Each subdomain is handled independently and includes the generation of receivers and triangles based on the given configuration.- Parameters:
connection
- The database connection used to interact with the data.verticesTableName
- The name of the database table where the vertices will be stored.triangleTableName
- The name of the database table where the triangles will be stored.- Throws:
SQLException
- Thrown if a database access error or other SQL-related error occurs.
-
getExceptionDumpFolder
public String getExceptionDumpFolder()
- Returns:
- When an exception occur, this folder with receiver the input data
-
setExceptionDumpFolder
public void setExceptionDumpFolder(String exceptionDumpFolder)
- Parameters:
exceptionDumpFolder
- When an exception occur, this folder with receiver the input data
-
getBuildingBuffer
public double getBuildingBuffer()
- Returns:
- Do not add receivers closer to specified distance
-
setBuildingBuffer
public void setBuildingBuffer(double buildingBuffer)
Do not add receivers closer to specified distance- Parameters:
buildingBuffer
- Distance in meters
-
computeDelaunay
public void computeDelaunay(LayerDelaunay cellMesh, org.locationtech.jts.geom.Envelope mainEnvelope, int cellI, int cellJ, double maxSrcDist, Collection<org.locationtech.jts.geom.Geometry> sources, double minRecDist, double maximumArea, double buildingBuffer, List<Building> buildings) throws LayerDelaunayError
Delaunay triangulation of Sub-Domain- Parameters:
cellMesh
- Final mesh targetmainEnvelope
- Global envelopecellI
- I cell indexcellJ
- J cell indexmaxSrcDist
- Maximum propagation distanceminRecDist
- Minimal distance receiver-sourcemaximumArea
- Maximum area of triangles- Throws:
LayerDelaunayError
-
getComputationEnvelope
protected org.locationtech.jts.geom.Envelope getComputationEnvelope(Connection connection) throws SQLException
Retrieves the computation envelope based on data stored in the database tables.- Specified by:
getComputationEnvelope
in classGridMapMaker
- Parameters:
connection
- the database connection.- Returns:
- the computation envelope containing the bounding box of the data stored in the specified tables.
- Throws:
SQLException
-
getEpsilon
public double getEpsilon()
-
getGeometrySimplificationDistance
public double getGeometrySimplificationDistance()
-
setGeometrySimplificationDistance
public void setGeometrySimplificationDistance(double geometrySimplificationDistance)
-
generateResultTable
public static void generateResultTable(Connection connection, String receiverTableName, String trianglesTableName, AtomicInteger receiverPK, List<org.locationtech.jts.geom.Coordinate> vertices, org.locationtech.jts.geom.GeometryFactory geometryFactory, List<Triangle> triangles, int cellI, int cellJ, int gridDim) throws SQLException
- Throws:
SQLException
-
setEpsilon
public void setEpsilon(double epsilon)
- Parameters:
epsilon
- Merge points that are closer that this epsilon value
-
fetchCellSource
public void fetchCellSource(Connection connection, org.locationtech.jts.geom.Envelope fetchEnvelope, boolean doIntersection, List<org.locationtech.jts.geom.Geometry> sourceGeometries) throws SQLException
Fetch source geometries and power- Parameters:
connection
- Active connectionfetchEnvelope
- Fetch envelopedoIntersection
- Truncate geometrissourceGeometries
- List to feed- Throws:
SQLException
-
generateReceivers
public void generateReceivers(Connection connection, int cellI, int cellJ, String receiverTableName, String trianglesTableName, AtomicInteger receiverPK) throws SQLException, LayerDelaunayError, IOException
-
getRoadWidth
public double getRoadWidth()
-
setRoadWidth
public void setRoadWidth(double roadWidth)
-
getMaximumArea
public double getMaximumArea()
-
setMaximumArea
public void setMaximumArea(double maximumArea)
-
getReceiverHeight
public double getReceiverHeight()
-
setReceiverHeight
public void setReceiverHeight(double receiverHeight)
-
getNbreceivers
public long getNbreceivers()
-
-