Class RailWayLWIterator
java.lang.Object
org.noise_planet.noisemodelling.jdbc.railway.RailWayLWIterator
- All Implemented Interfaces:
Iterator<RailWayLWGeom>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRailWayLWIterator(Connection connection, String tableTrackGeometry, String tableTrainTraffic) Generate sound source for train (with train source directivity) from traffic and geometry tracks tablesRailWayLWIterator(Connection connection, String tableTrackGeometry, String tableTrainTraffic, String vehicleDataFile, String trainSetDataFile, String railwayEmissionDataFile) Generate sound source for train (with train source directivity) from traffic and geometry tracks tables Constructs a RailWayLWIterator instance to process railway data by reading from a database connection and associated data files. -
Method Summary
Modifier and TypeMethodDescriptioncurrent()getRailwayEmissionFromResultSet(ResultSet rs, String period) Retrieves railway emission parameters from the given ResultSet for a specified period.static booleanCheck if a specified column exists in the given SpatialResultSetbooleanhasNext()next()Retrieves the next RailWayLWGeom object in the sequenceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Field Details
-
RAILWAY_VEHICLES_CNOSSOS_JSON
- See Also:
-
RAILWAY_TRAINSETS_JSON
- See Also:
-
RAILWAY_EMISSION_CNOSSOS_JSON
- See Also:
-
sourceFields
-
-
Constructor Details
-
RailWayLWIterator
public RailWayLWIterator(Connection connection, String tableTrackGeometry, String tableTrainTraffic) throws IOException Generate sound source for train (with train source directivity) from traffic and geometry tracks tables- Parameters:
connection-tableTrackGeometry- Track geometry and metadatatableTrainTraffic- Train traffic associated with tracks- Throws:
IOException
-
RailWayLWIterator
public RailWayLWIterator(Connection connection, String tableTrackGeometry, String tableTrainTraffic, String vehicleDataFile, String trainSetDataFile, String railwayEmissionDataFile) throws IOException Generate sound source for train (with train source directivity) from traffic and geometry tracks tables Constructs a RailWayLWIterator instance to process railway data by reading from a database connection and associated data files. Initializes the railway metadata and fetches the first incomplete railway geometry.- Parameters:
connection- Database connection used to fetch railway and traffic data.tableTrackGeometry- Table name containing track geometry and metadata.tableTrainTraffic- Table name containing train traffic details associated with tracks.vehicleDataFile- File path Url or resource filename (from org.noise_planet.noisemodelling.emission.railway package) for vehicle data configuration.trainSetDataFile- File path Url or resource filename (from org.noise_planet.noisemodelling.emission.railway package) for train set data configuration.railwayEmissionDataFile- File path Url or resource filename (from org.noise_planet.noisemodelling.emission.railway package) for railway metadata configuration.- Throws:
IOException- If an error occurs during file reading or parsing the specified data files.
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<RailWayLWGeom>
-
hasColumn
public static boolean hasColumn(org.h2gis.utilities.SpatialResultSet rs, String columnName) throws SQLException Check if a specified column exists in the given SpatialResultSet- Parameters:
rs-columnName-- Returns:
- "true" if the specified column name exists in the result set; "false" otherwise.
- Throws:
SQLException
-
next
Retrieves the next RailWayLWGeom object in the sequence- Specified by:
nextin interfaceIterator<RailWayLWGeom>- Returns:
- the current RailWayLWGeom object.
-
current
-
getRailwayEmissionFromResultSet
public RailWayCnossosParameters getRailwayEmissionFromResultSet(ResultSet rs, String period) throws SQLException, IOException Retrieves railway emission parameters from the given ResultSet for a specified period.- Parameters:
rs- result set of sourceperiod- Day or Evening or Night- Returns:
- Emission spectrum in dB
- Throws:
SQLExceptionIOException
-