Class NoiseMapWriter
java.lang.Object
org.noise_planet.noisemodelling.jdbc.output.NoiseMapWriter
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNoiseMapWriter(Connection connection, NoiseMapByReceiverMaker noiseMapByReceiverMaker, ResultsCache ResultsCache, AtomicBoolean exitWhenDone, AtomicBoolean aborted) Constructs a new NoiseMapWriter object with the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionattenuationOutputAsJSON(AttenuationOutput attenuationOutput) call()Executes the SQL writing process.static com.fasterxml.jackson.databind.ObjectWritervoidinit()Initializes the noise map calculation by setting up required database tables based on the specified parameters.static AttenuationOutputDeserialize AttenuationOutput object or AttenuationOutput child object.
-
Field Details
-
frequencyArray
-
aWeightingArray
public double[] aWeightingArray
-
-
Constructor Details
-
NoiseMapWriter
public NoiseMapWriter(Connection connection, NoiseMapByReceiverMaker noiseMapByReceiverMaker, ResultsCache ResultsCache, AtomicBoolean exitWhenDone, AtomicBoolean aborted) Constructs a new NoiseMapWriter object with the specified parameters.- Parameters:
connection- the database connection used for writing datanoiseMapByReceiverMaker- the parameters defining the noise map computationResultsCache- the attenuated paths containing computed noise data
-
-
Method Details
-
createJsonWriter
public static com.fasterxml.jackson.databind.ObjectWriter createJsonWriter() -
attenuationOutputAsJSON
public String attenuationOutputAsJSON(AttenuationOutput attenuationOutput) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
jsonToAttenuationOutput
public static AttenuationOutput jsonToAttenuationOutput(String json) throws com.fasterxml.jackson.core.JsonProcessingException Deserialize AttenuationOutput object or AttenuationOutput child object. Note: the FAIL_ON_UNKNOWN_PROPERTIES feature ensure that the deserialization won't fail for children of AttenuationOutput with additional attributes.- Parameters:
json- The serialized AttenuationOutput- Returns:
- Deserialized AttenuationOutput object
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the deserialization fails
-
init
Initializes the noise map calculation by setting up required database tables based on the specified parameters.- Throws:
SQLException- if an SQL exception occurs while executing the queryIOException- if an I/O error occurs while processing the query
-
call
-