Class GridMapMaker

    • Field Detail

      • MINIMAL_BUFFER_RATIO

        protected static final double MINIMAL_BUFFER_RATIO
        See Also:
        Constant Field Values
      • 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
    • Constructor Detail

      • GridMapMaker

        public GridMapMaker​(String buildingsTableName,
                            String sourcesTableName)
    • Method Detail

      • 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 envelope
        cellI - I cell index
        cellJ - J cell index
        cellWidth - Cell width meter
        cellHeight - 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 the sourcesTableNameHERTZ. 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 the sourcesTableNameHERTZ. 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