comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/tkhstate/TkhExporter.java @ 9105:ae3565385e6a

Some finetuning an Tkh calculation, preparation for wsp calculation with bed height stations only
author gernotbelger
date Tue, 29 May 2018 11:36:42 +0200
parents 7134a4c7d1b6
children 23945061daec
comparison
equal deleted inserted replaced
9104:07d51fd4864c 9105:ae3565385e6a
51 51
52 super.writeCSVGlobalMetadataDefaults(writer, results); 52 super.writeCSVGlobalMetadataDefaults(writer, results);
53 53
54 // "# Berechnungsgrundlage: Gleichung nach GILL (1971)" 54 // "# Berechnungsgrundlage: Gleichung nach GILL (1971)"
55 writeCSVMetaEntry(writer, CSV_META_CALCULATION_FORMULA); 55 writeCSVMetaEntry(writer, CSV_META_CALCULATION_FORMULA);
56
57 writer.writeNext(new String[] { "" });
58 } 56 }
59 57
60 /** 58 /**
61 * Write the header, with different headings depending on whether at a gauge or at a location. 59 * Write the header, with different headings depending on whether at a gauge or at a location.
62 */ 60 */
83 81
84 writer.writeNext(header.toArray(new String[header.size()])); 82 writer.writeNext(header.toArray(new String[header.size()]));
85 } 83 }
86 84
87 @Override 85 @Override
88 // FIXME: rename
89 protected void writeCSVResultMetadata(final CSVWriter writer, final TkhCalculationResults results, final TkhCalculationResult result) { 86 protected void writeCSVResultMetadata(final CSVWriter writer, final TkhCalculationResults results, final TkhCalculationResult result) {
90 87
91 final WstInfo wst = result.getWst(); 88 final WstInfo wst = result.getWst();
92 super.writeCSVWaterlevelMetadata(writer, wst); 89 super.writeCSVWaterlevelMetadata(writer, wst);
93 writer.writeNext(new String[] { "" }); // break line 90
94 // FIXME: 91 // REAMRK:
95 // "# W/Pegel [cm]: " (nur bei Eingabe des Wasserstands am Pegel) 92 // "# W/Pegel [cm]: " (nur bei Eingabe des Wasserstands am Pegel)
96 // "# Q (m³/s): " (nur bei Eingabe des Durchflusses) 93 // "# Q (m³/s): " (nur bei Eingabe des Durchflusses)
94 // WaterlevelEXporter does this
95 // final WaterlevelDescriptionBuilder descBuilder = new WaterlevelDescriptionBuilder((D4EArtifact) this.master,
96 // this.context);
97 // final String metadata = descBuilder.getMetadata();
98 // BUT:
99 // - the WINFO results do not contain this info per wst
100 // - the WaterlevelExporter prints this in the global header for all waterlevels, simply based on the input fields
101 // - instead we would want tis information per waterlevel
102 // - the metadata 'Bezeichnung WST' contains exactly the wanted data
103
104 writer.writeNext(new String[] { "" }); // break line
97 } 105 }
98 106
99 /** 107 /**
100 * Format a row of a flow depth result into an array of string, both used by csv and pdf 108 * Format a row of a flow depth result into an array of string, both used by csv and pdf
101 * 109 *
164 } 172 }
165 catch (final JRException je) { 173 catch (final JRException je) {
166 getLog().warn("Error generating PDF Report!", je); 174 getLog().warn("Error generating PDF Report!", je);
167 } 175 }
168 } 176 }
169
170 } 177 }

http://dive4elements.wald.intevation.org