comparison flys-artifacts/src/main/java/de/intevation/flys/exports/DischargeLongitudinalSectionExporter.java @ 5141:0773f4524107

Fixed CSV export for 'W fuer ungleichwertige Abflusslaengsschnitte'.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 28 Feb 2013 14:14:00 +0100
parents 9a4707ec7800
children
comparison
equal deleted inserted replaced
5140:18ef819a7c92 5141:0773f4524107
59 59
60 writer.writeNext(new String[] { 60 writer.writeNext(new String[] {
61 msg(CSV_KM_HEADER, DEFAULT_CSV_KM_HEADER), 61 msg(CSV_KM_HEADER, DEFAULT_CSV_KM_HEADER),
62 msg(CSV_W_HEADER, DEFAULT_CSV_W_HEADER), 62 msg(CSV_W_HEADER, DEFAULT_CSV_W_HEADER),
63 msg(CSV_CW_HEADER, DEFAULT_CSV_CW_HEADER), 63 msg(CSV_CW_HEADER, DEFAULT_CSV_CW_HEADER),
64 msg(CSV_Q_HEADER, DEFAULT_CSV_Q_HEADER) 64 msg(CSV_Q_HEADER, DEFAULT_CSV_Q_HEADER),
65 msg(CSV_Q_DESC_HEADER, DEFAULT_CSV_Q_DESC_HEADER)
65 }); 66 });
66 } 67 }
67 68
68 69
69 protected void wQKms2CSV( 70 protected void wQKms2CSV(
70 CSVWriter writer, 71 CSVWriter writer,
71 WQKms wqkms, 72 WQKms wqkms,
72 boolean atGauge, 73 boolean atGauge,
73 boolean isQ, 74 boolean isQ
74 boolean isRange
75 ) { 75 ) {
76 logger.debug("WaterlevelExporter.wQKms2CSV"); 76 logger.debug("WaterlevelExporter.wQKms2CSV");
77 77
78 int size = wqkms.size(); 78 int size = wqkms.size();
79 double[] result = new double[4]; 79 double[] result = new double[4];
83 NumberFormat qf = getQFormatter(); 83 NumberFormat qf = getQFormatter();
84 84
85 for (int i = 0; i < size; i ++) { 85 for (int i = 0; i < size; i ++) {
86 result = wqkms.get(i, result); 86 result = wqkms.get(i, result);
87 87
88 String name = wqkms.getName();
88 String wc = ""; 89 String wc = "";
89 if (wqkms instanceof WQCKms) { 90 if (wqkms instanceof WQCKms) {
90 wc = wf.format(result[3]); 91 wc = wf.format(result[3]);
91 } 92 }
92 93
93 writer.writeNext(new String[] { 94 writer.writeNext(new String[] {
94 kmf.format(result[2]), 95 kmf.format(result[2]),
95 wf.format(result[0]), 96 wf.format(result[0]),
96 wc, 97 wc,
97 qf.format(result[1]) 98 qf.format(result[1]),
99 name
98 }); 100 });
99 } 101 }
100 } 102 }
101 103
102 104

http://dive4elements.wald.intevation.org