Class DefaultTableLoader

    • Field Detail

      • LOGGER

        protected static final org.slf4j.Logger LOGGER
      • groundSurfaceSplitSideLength

        protected double groundSurfaceSplitSideLength
      • exactFrequencyArray

        public List<Double> exactFrequencyArray
      • aWeightingArray

        public List<Double> aWeightingArray
      • cnossosParametersPerPeriod

        public Map<String,​AttenuationParameters> cnossosParametersPerPeriod
        Define attenuation settings to apply for each period
      • fetchSize

        protected int fetchSize
      • directionAttributes

        public Map<Integer,​DirectivitySphere> directionAttributes
        Attenuation and other attributes relative to direction on sphere
    • Constructor Detail

      • DefaultTableLoader

        public DefaultTableLoader()
    • Method Detail

      • insertTrainDirectivity

        public void insertTrainDirectivity()
        Inserts directivity attributes for noise sources for trains into the directionAttributes map.
      • initialize

        public void initialize​(Connection connection,
                               NoiseMapByReceiverMaker noiseMapByReceiverMaker)
                        throws SQLException
        Initializes the NoiseMap parameters and attenuation data based on the input mode specified in the NoiseMap parameters.
        Specified by:
        initialize in interface NoiseMapByReceiverMaker.TableLoader
        Parameters:
        connection - the database connection to be used for initialization.
        noiseMapByReceiverMaker - the noise map by receiver maker object associated with the computation process.
        Throws:
        SQLException
      • getFrequencyArray

        public List<Integer> getFrequencyArray()
        Retrieves the frequency array used within the class.
        Returns:
        a list of integers representing the frequency values in the array.
      • getExactFrequencyArray

        public List<Double> getExactFrequencyArray()
        Retrieves the exact frequency array used within the class.
        Returns:
        a list of doubles representing the exact frequency values in the array.
      • getaWeightingArray

        public List<Double> getaWeightingArray()
        Retrieves the A-weighting correction array used within the class. A-weighting is applied to account for the varying sensitivity of human hearing to different frequencies, commonly used in acoustic measurements.
        Returns:
        a list of doubles representing the A-weighting correction values.
      • getCnossosParametersPerPeriod

        public Map<String,​AttenuationParameters> getCnossosParametersPerPeriod()
        Retrieves the parameters defined for different time periods.
        Returns:
        a map where the keys represent the time periods (e.g., "D", "E", "N") as strings, and the values are instances of AttenuationParameters representing the corresponding parameters.
      • getFetchSize

        public int getFetchSize()
      • fetchDirectivity

        public static Map<Integer,​DirectivitySphere> fetchDirectivity​(Connection connection,
                                                                            String tableName,
                                                                            int defaultInterpolation,
                                                                            String frequencyFieldPrepend)
                                                                     throws SQLException
        The table shall contain the following fields : DIR_ID : identifier of the directivity sphere (INTEGER) THETA : Horizontal angle in degree. 0° front and 90° right (0-360) (FLOAT) PHI : Vertical angle in degree. 0° front and 90° top -90° bottom (-90 - 90) (FLOAT) HZ63, HZ125, HZ250, HZ500, HZ1000, HZ2000, HZ4000, HZ8000 : attenuation levels in dB for each octave or third octave (FLOAT)
        Parameters:
        connection - Connection
        tableName - Table name
        defaultInterpolation - Interpolation if applicable
        frequencyFieldPrepend - Frequency field name ex. HZ for HZ1000
        Returns:
        Throws:
        SQLException
      • fetchCellBuildings

        public static void fetchCellBuildings​(Connection connection,
                                              DefaultTableLoader.BuildingTableParameters buildingTableParameters,
                                              org.locationtech.jts.geom.Envelope fetchEnvelope,
                                              ProfileBuilder builder,
                                              org.locationtech.jts.geom.GeometryFactory geometryFactory)
                                       throws SQLException
        Fetches buildings data for the specified cell envelope and adds them to the profile builder.
        Parameters:
        connection - the database connection to use for querying the buildings data.
        buildingTableParameters - Database settings for the building table
        fetchEnvelope - the envelope representing the cell to fetch buildings data for.
        builder - the profile builder to which the buildings data will be added.
        geometryFactory - geometry factory instance with SRID set.
        Throws:
        SQLException - if an SQL exception occurs while fetching the buildings data.
      • fetchCellBuildings

        public static void fetchCellBuildings​(Connection connection,
                                              DefaultTableLoader.BuildingTableParameters buildingTableParameters,
                                              org.locationtech.jts.geom.Envelope fetchEnvelope,
                                              List<Building> buildings,
                                              List<Wall> walls,
                                              org.locationtech.jts.geom.GeometryFactory geometryFactory)
                                       throws SQLException
        Fetches building data for the specified cell envelope and adds them to the provided list of buildings.
        Parameters:
        connection - the database connection to use for querying the building data.
        buildingTableParameters - Database settings for the building table
        fetchEnvelope - the envelope representing the cell to fetch building data for.
        buildings - the list to which the fetched buildings will be added.
        walls - Wall list to feed
        geometryFactory - geometry factory instance with SRID set.
        Throws:
        SQLException - if an SQL exception occurs while fetching the building data.
      • fetchCellDem

        protected void fetchCellDem​(Connection connection,
                                    org.locationtech.jts.geom.Envelope fetchEnvelope,
                                    ProfileBuilder profileBuilder)
                             throws SQLException
        Fetches digital elevation model (DEM) data for the specified cell envelope and adds it to the mesh.
        Parameters:
        connection - the database connection to use for querying the DEM data.
        fetchEnvelope - the envelope representing the cell to fetch DEM data for.
        profileBuilder - the profile builder mesh to which the DEM data will be added.
        Throws:
        SQLException - if an SQL exception occurs while fetching the DEM data.
      • fetchCellSoilAreas

        protected void fetchCellSoilAreas​(Connection connection,
                                          org.locationtech.jts.geom.Envelope fetchEnvelope,
                                          ProfileBuilder builder)
                                   throws SQLException
        Fetches soil areas data for the specified cell envelope and adds them to the profile builder.
        Parameters:
        connection - the database connection to use for querying the soil areas data.
        fetchEnvelope - the envelope representing the cell to fetch soil areas data for.
        builder - the profile builder to which the soil areas data will be added.
        Throws:
        SQLException - if an SQL exception occurs while fetching the soil areas data.
      • fetchCellSource

        public void fetchCellSource​(Connection connection,
                                    org.locationtech.jts.geom.Envelope fetchEnvelope,
                                    SceneWithEmission scene,
                                    boolean doIntersection)
                             throws SQLException
        Fetch source geometries and power
        Parameters:
        connection - Active connection
        fetchEnvelope - Fetch envelope
        scene - (Out) Propagation process input data
        Throws:
        SQLException