comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java @ 2652:9d2a06c3a134

Added DataType for lines that also stores width, use it. Added HasLabel interface for some series. flys-artifacts/trunk@4318 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Fri, 27 Apr 2012 09:58:21 +0000
parents 77cdc344ef77
children 0143b44631cc
comparison
equal deleted inserted replaced
2651:9e9eb9d97548 2652:9d2a06c3a134
256 * 256 *
257 * @return an array holding coordinates of points of surface of water ( 257 * @return an array holding coordinates of points of surface of water (
258 * in the form {{x1, x2} {y1, y2}} ). 258 * in the form {{x1, x2} {y1, y2}} ).
259 */ 259 */
260 @Override 260 @Override
261 public double [][] getWaterLines(int idx, FastCrossSectionLine csl) { 261 public Lines.LineData getWaterLines(int idx, FastCrossSectionLine csl) {
262 logger.debug("getWaterLines(" + idx + ")"); 262 logger.debug("getWaterLines(" + idx + ")");
263 263
264 List<Point2D> points = csl.getPoints(); 264 List<Point2D> points = csl.getPoints();
265 265
266 WKms wkms = getWKms(0); 266 WKms wkms = getWKms(0);
269 269
270 // Find W at km. 270 // Find W at km.
271 double wAtKm = getWAtKm(wkms, km); 271 double wAtKm = getWAtKm(wkms, km);
272 if (wAtKm == -1) { 272 if (wAtKm == -1) {
273 logger.warn("Waterlevel at km " + km + " unknown."); 273 logger.warn("Waterlevel at km " + km + " unknown.");
274 return new double[][] {{}}; 274 return new Lines.LineData(new double[][] {{}}, 0d);
275 } 275 }
276 276
277 return Lines.createWaterLines(points, wAtKm); 277 return Lines.createWaterLines(points, wAtKm);
278 } 278 }
279 279

http://dive4elements.wald.intevation.org