Class GridMapMaker
java.lang.Object
org.noise_planet.noisemodelling.jdbc.GridMapMaker
- Direct Known Subclasses:
DelaunayReceiversMaker,NoiseMapByReceiverMaker
Common attributes and functions across DelaunayGrid and NoiseMap receiver computation
- Author:
- Nicolas Fortin
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected doubleprotected booleanprotected booleanprotected Stringprotected org.locationtech.jts.geom.GeometryFactoryprotected intSide computation cell count (same on X and Y)protected doubleprotected doubleprotected org.locationtech.jts.geom.Envelopeprotected doubleprotected doubleprotected static final doubleprotected booleanTrue if Z of receivers geometry is the altitude (sea level) or false if Z is relative to the ground (relative to digital elevation model) When the propagation area will be prepared.protected Stringprotected Stringprotected intprotected booleanTrue if Z of sources geometry is the altitude (sea level) or false if Z is relative to the ground (relative to digital elevation model) When the propagation area will be prepared.protected final Stringboolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis table must contain a POLYGON column, where Z values are wall bottom position relative to sea level.static org.locationtech.jts.geom.EnvelopegetCellEnv(org.locationtech.jts.geom.Envelope mainEnvelope, int cellI, int cellJ, double cellWidth, double cellHeight) Compute the envelope corresping to parametersorg.locationtech.jts.geom.EnvelopegetCellEnv(CellIndex cellIndex) Compute the envelope corresponding to parametersdoubledoubledoubleabstract org.locationtech.jts.geom.EnvelopegetComputationEnvelope(Connection connection) Digital Elevation model table name.org.locationtech.jts.geom.GeometryFactoryintdoubledoublegetGs()org.locationtech.jts.geom.EnvelopedoubledoubleExtracted from NMPB 2008-2 7.3.2 Soil areas POLYGON, with a dimensionless coefficient G: - Law, meadow, field of cereals G=1 - Undergrowth (resinous or decidious) G=1 - Compacted earth, track G=0.3 - Road surface G=0 - Smooth concrete G=0Field name of thesourcesTableNameHERTZ.intThis table must contain a POINT or LINESTRING columndoublevoidinitialize(Connection connection) Fetch scene attributes, compute best computation cell size.booleanbooleanbooleanbooleanbooleanbooleanvoidsetBodyBarrier(boolean bodyBarrier) true if train propagation is computed (multiple reflection between the train and a screen)voidsetCloseReceiverReflectionWallDistance(double closeReceiverReflectionWallDistance) voidsetComputeHorizontalDiffraction(boolean computeHorizontalDiffraction) voidsetComputeVerticalDiffraction(boolean computeVerticalDiffraction) Activate of deactivate diffraction of horizontal edges.voidsetDemTable(String demTable) Digital Elevation model table name.voidsetGridDim(int gridDim) voidsetGroundSurfaceSplitSideLength(double groundSurfaceSplitSideLength) voidsetGs(double gs) voidsetHeightField(String heightField) voidsetMainEnvelope(org.locationtech.jts.geom.Envelope mainEnvelope) Set computation area.voidsetMaximumPropagationDistance(double maximumPropagationDistance) voidsetMaximumReflectionDistance(double maximumReflectionDistance) voidsetReceiverHasAbsoluteZCoordinates(boolean receiverHasAbsoluteZCoordinates) voidsetSoilTableName(String soilTableName) Extracted from NMPB 2008-2 7.3.2 Soil areas POLYGON, with a dimensionless coefficient G: - Law, meadow, field of cereals G=1 - Undergrowth (resinous or decidious) G=1 - Compacted earth, track G=0.3 - Road surface G=0 - Smooth concrete G=0voidsetSound_lvl_field(String sound_lvl_field) Field name of thesourcesTableNameHERTZ.voidsetSoundReflectionOrder(int soundReflectionOrder) voidsetSourceHasAbsoluteZCoordinates(boolean sourceHasAbsoluteZCoordinates) voidsetVerbose(boolean verbose) voidsetWallAbsorption(double wallAbsorption) voidsetzBuildings(boolean zBuildings)
-
Field Details
-
MINIMAL_BUFFER_RATIO
protected static final double MINIMAL_BUFFER_RATIO- See Also:
-
buildingTableParameters
-
sourcesTableName
-
soilTableName
-
demTable
-
sound_lvl_field
-
receiverHasSeaLevelZCoordinates
protected boolean receiverHasSeaLevelZCoordinatesTrue if Z of receivers geometry is the altitude (sea level) or false if Z is relative to the ground (relative to digital elevation model) When the propagation area will be prepared. All coordinates will be converted into altitude if necessary. -
sourceHasSeaLevelZCoordinates
protected boolean sourceHasSeaLevelZCoordinatesTrue if Z of sources geometry is the altitude (sea level) or false if Z is relative to the ground (relative to digital elevation model) When the propagation area will be prepared. All coordinates will be converted into altitude if necessary. -
maximumPropagationDistance
protected double maximumPropagationDistance -
maximumReflectionDistance
protected double maximumReflectionDistance -
closeReceiverReflectionWallDistance
protected double closeReceiverReflectionWallDistance -
gs
protected double gs -
groundSurfaceSplitSideLength
protected double groundSurfaceSplitSideLength -
soundReflectionOrder
protected int soundReflectionOrder -
bodyBarrier
protected boolean bodyBarrier -
verbose
public boolean verbose -
computeHorizontalDiffraction
protected boolean computeHorizontalDiffraction -
computeVerticalDiffraction
protected boolean computeVerticalDiffraction -
geometryFactory
protected org.locationtech.jts.geom.GeometryFactory geometryFactory -
gridDim
protected int gridDimSide computation cell count (same on X and Y) -
mainEnvelope
protected org.locationtech.jts.geom.Envelope mainEnvelope
-
-
Constructor Details
-
GridMapMaker
-
-
Method Details
-
getBuildingTableParameters
-
getGeometryFactory
public org.locationtech.jts.geom.GeometryFactory getGeometryFactory() -
isVerbose
public boolean isVerbose() -
setVerbose
public void setVerbose(boolean verbose) -
getCellEnv
Compute the envelope corresponding to parameters- Parameters:
cellIndex- Cell location- Returns:
- Envelope of the cell
-
getCellEnv
public static org.locationtech.jts.geom.Envelope getCellEnv(org.locationtech.jts.geom.Envelope mainEnvelope, int cellI, int cellJ, double cellWidth, double cellHeight) Compute the envelope corresping to parameters- Parameters:
mainEnvelope- Global envelopecellI- I cell indexcellJ- J cell indexcellWidth- Cell width metercellHeight- Cell height meter- Returns:
- Envelope of the cell
-
getGroundSurfaceSplitSideLength
public double getGroundSurfaceSplitSideLength() -
setGroundSurfaceSplitSideLength
public void setGroundSurfaceSplitSideLength(double groundSurfaceSplitSideLength) -
setBodyBarrier
public void setBodyBarrier(boolean bodyBarrier) true if train propagation is computed (multiple reflection between the train and a screen) -
getCellWidth
public double getCellWidth() -
getCellHeight
public double getCellHeight() -
getComputationEnvelope
public abstract org.locationtech.jts.geom.Envelope getComputationEnvelope(Connection connection) throws SQLException - Throws:
SQLException
-
initialize
Fetch scene attributes, compute best computation cell size.- Parameters:
connection- Active connection- Throws:
SQLException- If some table are not found or parameters are invalid
-
getGridDim
public int getGridDim()- Returns:
- Side computation cell count (same on X and Y)
-
setGridDim
public void setGridDim(int gridDim) -
getBuildingsTableName
This table must contain a POLYGON column, where Z values are wall bottom position relative to sea level. It may also contain a height field (0-N] average building height from the ground.- Returns:
- Table name that contains buildings
-
getSourcesTableName
This table must contain a POINT or LINESTRING column- Returns:
- Table name that contain linear and/or punctual sound sources geometries.*
-
getSoilTableName
Extracted from NMPB 2008-2 7.3.2 Soil areas POLYGON, with a dimensionless coefficient G: - Law, meadow, field of cereals G=1 - Undergrowth (resinous or decidious) G=1 - Compacted earth, track G=0.3 - Road surface G=0 - Smooth concrete G=0- Returns:
- Table name of grounds properties
-
isReceiverHasAbsoluteZCoordinates
public boolean isReceiverHasAbsoluteZCoordinates()- Returns:
- True if provided Z value are sea level (false for relative to ground level)
-
setReceiverHasAbsoluteZCoordinates
public void setReceiverHasAbsoluteZCoordinates(boolean receiverHasAbsoluteZCoordinates) - Parameters:
receiverHasAbsoluteZCoordinates- True if provided Z value are sea level (false for relative to ground level)
-
isSourceHasAbsoluteZCoordinates
public boolean isSourceHasAbsoluteZCoordinates()- Returns:
- True if provided Z value are sea level (false for relative to ground level)
-
setSourceHasAbsoluteZCoordinates
public void setSourceHasAbsoluteZCoordinates(boolean sourceHasAbsoluteZCoordinates) - Parameters:
sourceHasAbsoluteZCoordinates- True if provided Z value are sea level (false for relative to ground level)
-
iszBuildings
public boolean iszBuildings() -
setzBuildings
public void setzBuildings(boolean zBuildings) -
setSoilTableName
Extracted from NMPB 2008-2 7.3.2 Soil areas POLYGON, with a dimensionless coefficient G: - Law, meadow, field of cereals G=1 - Undergrowth (resinous or decidious) G=1 - Compacted earth, track G=0.3 - Road surface G=0 - Smooth concrete G=0- Parameters:
soilTableName- Table name of grounds properties
-
getDemTable
Digital Elevation model table name. Currently only a table with POINTZ column is supported. DEM points too close with buildings are not fetched.- Returns:
- Digital Elevation model table name
-
setDemTable
Digital Elevation model table name. Currently only a table with POINTZ column is supported. DEM points too close with buildings are not fetched.- Parameters:
demTable- Digital Elevation model table name
-
getSound_lvl_field
Field name of thesourcesTableNameHERTZ. Where HERTZ is a number [100-5000]. Without the hertz value.- Returns:
- Hertz field prefix
-
setSound_lvl_field
Field name of thesourcesTableNameHERTZ. Where HERTZ is a number [100-5000]. Without the hertz value.- Parameters:
sound_lvl_field- Hertz field prefix
-
getMaximumPropagationDistance
public double getMaximumPropagationDistance()- Returns:
- Sound propagation stop at this distance, default to 750m. Computation cell size if proportional with this value.
-
setMaximumPropagationDistance
public void setMaximumPropagationDistance(double maximumPropagationDistance) - Parameters:
maximumPropagationDistance- Sound propagation stop at this distance, default to 750m. Computation cell size if proportional with this value.
-
setGs
public void setGs(double gs) -
getGs
public double getGs() -
getMaximumReflectionDistance
public double getMaximumReflectionDistance()- Returns:
- Reflection and diffraction maximum search distance, default to 400m.
-
setMaximumReflectionDistance
public void setMaximumReflectionDistance(double maximumReflectionDistance) - Parameters:
maximumReflectionDistance- Reflection and diffraction seek walls and corners up to X meters from the direct propagation line. Default to 100m.
-
getCloseReceiverReflectionWallDistance
public double getCloseReceiverReflectionWallDistance()- Returns:
- Maximum receiver-to-wall distance in meters below which reflection cut profiles can be ignored. A value of 0 means the optional filter is disabled.
-
setCloseReceiverReflectionWallDistance
public void setCloseReceiverReflectionWallDistance(double closeReceiverReflectionWallDistance) - Parameters:
closeReceiverReflectionWallDistance- Maximum receiver-to-wall distance in meters below which reflection cut profiles can be ignored. A value of 0 disables the filter.
-
getSoundReflectionOrder
public int getSoundReflectionOrder()- Returns:
- Sound reflection order. 0 order mean 0 reflection depth. 2 means propagation of rays up to 2 collision with walls.
-
setSoundReflectionOrder
public void setSoundReflectionOrder(int soundReflectionOrder) - Parameters:
soundReflectionOrder- Sound reflection order. 0 order mean 0 reflection depth. 2 means propagation of rays up to 2 collision with walls.
-
isComputeHorizontalDiffraction
public boolean isComputeHorizontalDiffraction()- Returns:
- True if diffraction rays will be computed on vertical edges (around buildings)
-
setComputeHorizontalDiffraction
public void setComputeHorizontalDiffraction(boolean computeHorizontalDiffraction) - Parameters:
computeHorizontalDiffraction- True if diffraction rays will be computed on vertical edges (around buildings)
-
getWallAbsorption
public double getWallAbsorption()- Returns:
- Global default wall absorption on sound reflection.
-
setWallAbsorption
public void setWallAbsorption(double wallAbsorption) - Parameters:
wallAbsorption- Set default global wall absorption on sound reflection.
-
getHeightField
- Returns:
getBuildingsTableName()eName} table field name for buildings height above the ground.
-
setHeightField
- Parameters:
heightField-getBuildingsTableName()} table field name for buildings height above the ground.
-
getMainEnvelope
public org.locationtech.jts.geom.Envelope getMainEnvelope()- Returns:
- The envelope of computation area.
-
setMainEnvelope
public void setMainEnvelope(org.locationtech.jts.geom.Envelope mainEnvelope) Set computation area. Update the property subdivisionLevel and gridDim.- Parameters:
mainEnvelope- Computation area
-
isComputeVerticalDiffraction
public boolean isComputeVerticalDiffraction()- Returns:
- True if diffraction of horizontal edges is computed.
-
setComputeVerticalDiffraction
public void setComputeVerticalDiffraction(boolean computeVerticalDiffraction) Activate of deactivate diffraction of horizontal edges. Height of buildings must be provided.- Parameters:
computeVerticalDiffraction- New value
-