Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/exports/FlowVelocityExporter.java @ 8614:e7a2234e7c3f
(issue1608) Export appropiate data for different result types
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 25 Mar 2015 11:25:28 +0100 |
parents | e4606eae8ea5 |
children | 594b0bbc7011 |
comparison
equal
deleted
inserted
replaced
8613:39ce099a6551 | 8614:e7a2234e7c3f |
---|---|
105 for (int i = 0, n = data.size(); i < n; i++) { | 105 for (int i = 0, n = data.size(); i < n; i++) { |
106 NumberFormat kmF = Formatter.getFlowVelocityKM(context); | 106 NumberFormat kmF = Formatter.getFlowVelocityKM(context); |
107 NumberFormat valF = Formatter.getFlowVelocityValues(context); | 107 NumberFormat valF = Formatter.getFlowVelocityValues(context); |
108 NumberFormat qF = Formatter.getFlowVelocityQ(context); | 108 NumberFormat qF = Formatter.getFlowVelocityQ(context); |
109 | 109 |
110 writer.writeNext(new String[] { | 110 if (data.getType().equals("main")) { |
111 kmF.format(data.getKM(i)), | 111 /* Only a main channel value selected */ |
112 valF.format(data.getVMain(i)), | 112 writer.writeNext(new String[] { |
113 valF.format(data.getVTotal(i)), | 113 kmF.format(data.getKM(i)), |
114 valF.format(data.getTauMain(i)), | 114 valF.format(data.getVMain(i)), |
115 qF.format(data.getQ(i)) + "=" + data.getZone(), | 115 "", |
116 RiverUtils.getLocationDescription(flys, data.getKM(i)), | 116 valF.format(data.getTauMain(i)), |
117 }); | 117 qF.format(data.getQ(i)) + "=" + data.getZone(), |
118 RiverUtils.getLocationDescription(flys, data.getKM(i)), | |
119 }); | |
120 } else if (data.getType().equals("total")) { | |
121 /* Only a total channel value selected */ | |
122 writer.writeNext(new String[] { | |
123 kmF.format(data.getKM(i)), | |
124 "", | |
125 valF.format(data.getVTotal(i)), | |
126 valF.format(data.getTauMain(i)), | |
127 qF.format(data.getQ(i)) + "=" + data.getZone(), | |
128 RiverUtils.getLocationDescription(flys, data.getKM(i)), | |
129 }); | |
130 } else { | |
131 /* In this case the type is main_total */ | |
132 writer.writeNext(new String[] { | |
133 kmF.format(data.getKM(i)), | |
134 valF.format(data.getVMain(i)), | |
135 valF.format(data.getVTotal(i)), | |
136 valF.format(data.getTauMain(i)), | |
137 qF.format(data.getQ(i)) + "=" + data.getZone(), | |
138 RiverUtils.getLocationDescription(flys, data.getKM(i)), | |
139 }); | |
140 } | |
118 } | 141 } |
119 } | 142 } |
120 } | 143 } |
121 | 144 |
122 | 145 |