Class EmissionTableGenerator
- java.lang.Object
-
- org.noise_planet.noisemodelling.jdbc.EmissionTableGenerator
-
public class EmissionTableGenerator extends Object
Create emission table from traffic data (RAIL or ROADS)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EmissionTableGenerator.STANDARD_PERIOD
-
Field Summary
Fields Modifier and Type Field Description static double
DAY_RATIO
static String
DEN_PERIOD
static double
EVENING_RATIO
static double
NIGHT_RATIO
static double[]
RATIOS
static List<Integer>
roadOctaveFrequencyBands
static String[]
STANDARD_PERIOD_VALUE
-
Constructor Summary
Constructors Constructor Description EmissionTableGenerator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
cacheFields(Map<String,Integer> sourceFieldsCache, ResultSet rs)
Cache table fields in upper case in Mapstatic double[][]
computeLw(org.h2gis.utilities.SpatialResultSet rs, int coefficientVersion, Map<String,Integer> sourceFieldsCache)
Computes the sound levels (Lw) for different periods based on the provided spatial result set.static double[]
getEmissionFromTrafficTable(ResultSet rs, String period, double slope, int coefficientVersion, Map<String,Integer> sourceFieldsCache)
Retrieves the emissions for the specified period from the given result setstatic double
getSlope(org.h2gis.utilities.SpatialResultSet rs)
static double
getSlope(org.locationtech.jts.geom.Geometry g)
static void
makeTrainLWTable(Connection connection, String railSectionTableName, String railTrafficTableName, String outputTable, String frequencyPrepend)
Generate Train emission from train geometry tracks and train traffic
-
-
-
Field Detail
-
DEN_PERIOD
public static final String DEN_PERIOD
- See Also:
- Constant Field Values
-
STANDARD_PERIOD_VALUE
public static final String[] STANDARD_PERIOD_VALUE
-
DAY_RATIO
public static final double DAY_RATIO
- See Also:
- Constant Field Values
-
EVENING_RATIO
public static final double EVENING_RATIO
-
NIGHT_RATIO
public static final double NIGHT_RATIO
-
RATIOS
public static final double[] RATIOS
-
-
Method Detail
-
cacheFields
public static void cacheFields(Map<String,Integer> sourceFieldsCache, ResultSet rs) throws SQLException
Cache table fields in upper case in Map- Parameters:
sourceFieldsCache
- maprs
- table to load- Throws:
SQLException
- If error
-
getEmissionFromTrafficTable
public static double[] getEmissionFromTrafficTable(ResultSet rs, String period, double slope, int coefficientVersion, Map<String,Integer> sourceFieldsCache) throws SQLException
Retrieves the emissions for the specified period from the given result set- Parameters:
rs
- result set of sourceperiod
- optional column name to add after attribute fields _D or _E or _Nslope
- Default, gradient percentage of road from -12 % to 12 %coefficientVersion
- Cnossos coefficient version (1 = 2015, 2 = 2020)- Returns:
- Emission spectrum in dB
- Throws:
SQLException
-
computeLw
public static double[][] computeLw(org.h2gis.utilities.SpatialResultSet rs, int coefficientVersion, Map<String,Integer> sourceFieldsCache) throws SQLException
Computes the sound levels (Lw) for different periods based on the provided spatial result set.- Parameters:
rs
- Result set on a road recordcoefficientVersion
- Cnossos coefficient version (1 = 2015, 2 = 2020)sourceFieldsCache
- SQL Fields cache- Returns:
- a two-dimensional array containing the sound levels (Ld, Le, Ln) for each frequency level.
- Throws:
SQLException
- Exception while evaluating the lw
-
getSlope
public static double getSlope(org.h2gis.utilities.SpatialResultSet rs)
-
getSlope
public static double getSlope(org.locationtech.jts.geom.Geometry g)
-
makeTrainLWTable
public static void makeTrainLWTable(Connection connection, String railSectionTableName, String railTrafficTableName, String outputTable, String frequencyPrepend) throws SQLException
Generate Train emission from train geometry tracks and train traffic- Parameters:
connection
-railSectionTableName
-railTrafficTableName
-outputTable
-- Throws:
SQLException
-
-