Class GridMapMaker
- java.lang.Object
-
- org.noise_planet.noisemodelling.jdbc.GridMapMaker
-
- Direct Known Subclasses:
DelaunayReceiversMaker
,NoiseMapByReceiverMaker
public abstract class GridMapMaker extends Object
Common attributes and functions across DelaunayGrid and NoiseMap receiver computation- Author:
- Nicolas Fortin
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
bodyBarrier
protected DefaultTableLoader.BuildingTableParameters
buildingTableParameters
protected boolean
computeHorizontalDiffraction
protected boolean
computeVerticalDiffraction
protected String
demTable
protected org.locationtech.jts.geom.GeometryFactory
geometryFactory
protected int
gridDim
Side computation cell count (same on X and Y)protected double
groundSurfaceSplitSideLength
protected double
gs
protected org.locationtech.jts.geom.Envelope
mainEnvelope
protected double
maximumPropagationDistance
protected double
maximumReflectionDistance
protected static double
MINIMAL_BUFFER_RATIO
protected boolean
receiverHasAbsoluteZCoordinates
protected String
soilTableName
protected String
sound_lvl_field
protected int
soundReflectionOrder
protected boolean
sourceHasAbsoluteZCoordinates
protected String
sourcesTableName
boolean
verbose
-
Constructor Summary
Constructors Constructor Description GridMapMaker(String buildingsTableName, String sourcesTableName)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
getBuildingsTableName()
This table must contain a POLYGON column, where Z values are wall bottom position relative to sea level.DefaultTableLoader.BuildingTableParameters
getBuildingTableParameters()
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 parametersorg.locationtech.jts.geom.Envelope
getCellEnv(CellIndex cellIndex)
Compute the envelope corresponding to parametersdouble
getCellHeight()
double
getCellWidth()
protected abstract org.locationtech.jts.geom.Envelope
getComputationEnvelope(Connection connection)
String
getDemTable()
Digital Elevation model table name.org.locationtech.jts.geom.GeometryFactory
getGeometryFactory()
int
getGridDim()
double
getGroundSurfaceSplitSideLength()
double
getGs()
String
getHeightField()
org.locationtech.jts.geom.Envelope
getMainEnvelope()
double
getMaximumPropagationDistance()
double
getMaximumReflectionDistance()
String
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=0String
getSound_lvl_field()
Field name of thesourcesTableName
HERTZ.int
getSoundReflectionOrder()
String
getSourcesTableName()
This table must contain a POINT or LINESTRING columndouble
getWallAbsorption()
void
initialize(Connection connection, org.h2gis.api.ProgressVisitor progression)
Fetch scene attributes, compute best computation cell size.boolean
isComputeHorizontalDiffraction()
boolean
isComputeVerticalDiffraction()
boolean
isReceiverHasAbsoluteZCoordinates()
boolean
isSourceHasAbsoluteZCoordinates()
boolean
isVerbose()
boolean
iszBuildings()
void
setBodyBarrier(boolean bodyBarrier)
true if train propagation is computed (multiple reflection between the train and a screen)void
setComputeHorizontalDiffraction(boolean computeHorizontalDiffraction)
void
setComputeVerticalDiffraction(boolean computeVerticalDiffraction)
Activate of deactivate diffraction of horizontal edges.void
setDemTable(String demTable)
Digital Elevation model table name.void
setGridDim(int gridDim)
void
setGroundSurfaceSplitSideLength(double groundSurfaceSplitSideLength)
void
setGs(double gs)
void
setHeightField(String heightField)
void
setMainEnvelope(org.locationtech.jts.geom.Envelope mainEnvelope)
Set computation area.void
setMaximumPropagationDistance(double maximumPropagationDistance)
void
setMaximumReflectionDistance(double maximumReflectionDistance)
void
setReceiverHasAbsoluteZCoordinates(boolean receiverHasAbsoluteZCoordinates)
void
setSoilTableName(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=0void
setSound_lvl_field(String sound_lvl_field)
Field name of thesourcesTableName
HERTZ.void
setSoundReflectionOrder(int soundReflectionOrder)
void
setSourceHasAbsoluteZCoordinates(boolean sourceHasAbsoluteZCoordinates)
void
setVerbose(boolean verbose)
void
setWallAbsorption(double wallAbsorption)
void
setzBuildings(boolean zBuildings)
-
-
-
Field Detail
-
MINIMAL_BUFFER_RATIO
protected static final double MINIMAL_BUFFER_RATIO
- See Also:
- Constant Field Values
-
buildingTableParameters
protected DefaultTableLoader.BuildingTableParameters buildingTableParameters
-
sourcesTableName
protected final String sourcesTableName
-
soilTableName
protected String soilTableName
-
demTable
protected String demTable
-
sound_lvl_field
protected String sound_lvl_field
-
receiverHasAbsoluteZCoordinates
protected boolean receiverHasAbsoluteZCoordinates
-
sourceHasAbsoluteZCoordinates
protected boolean sourceHasAbsoluteZCoordinates
-
maximumPropagationDistance
protected double maximumPropagationDistance
-
maximumReflectionDistance
protected double maximumReflectionDistance
-
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 gridDim
Side computation cell count (same on X and Y)
-
mainEnvelope
protected org.locationtech.jts.geom.Envelope mainEnvelope
-
-
Method Detail
-
getBuildingTableParameters
public DefaultTableLoader.BuildingTableParameters getBuildingTableParameters()
-
getGeometryFactory
public org.locationtech.jts.geom.GeometryFactory getGeometryFactory()
-
isVerbose
public boolean isVerbose()
-
setVerbose
public void setVerbose(boolean verbose)
-
getCellEnv
public org.locationtech.jts.geom.Envelope getCellEnv(CellIndex cellIndex)
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
protected abstract org.locationtech.jts.geom.Envelope getComputationEnvelope(Connection connection) throws SQLException
- Throws:
SQLException
-
initialize
public void initialize(Connection connection, org.h2gis.api.ProgressVisitor progression) throws SQLException
Fetch scene attributes, compute best computation cell size.- Parameters:
connection
- Active connection- Throws:
SQLException
-
getGridDim
public int getGridDim()
- Returns:
- Side computation cell count (same on X and Y)
-
setGridDim
public void setGridDim(int gridDim)
-
getBuildingsTableName
public String 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
public String getSourcesTableName()
This table must contain a POINT or LINESTRING column- Returns:
- Table name that contain linear and/or punctual sound sources geometries.*
-
getSoilTableName
public String 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
public void setSoilTableName(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=0- Parameters:
soilTableName
- Table name of grounds properties
-
getDemTable
public String 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
public void setDemTable(String demTable)
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
public String getSound_lvl_field()
Field name of thesourcesTableName
HERTZ. Where HERTZ is a number [100-5000]. Without the hertz value.- Returns:
- Hertz field prefix
-
setSound_lvl_field
public void setSound_lvl_field(String sound_lvl_field)
Field name of thesourcesTableName
HERTZ. 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.
-
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
public String getHeightField()
- Returns:
getBuildingsTableName()
eName} table field name for buildings height above the ground.
-
setHeightField
public void setHeightField(String heightField)
- 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
-
-