diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java @ 2120:f021080cb409

Use improved caching for cross section lines data. flys-artifacts/trunk@3690 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 16 Jan 2012 17:38:39 +0000
parents 701658081f4f
children d626ae185305
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java	Mon Jan 16 15:51:46 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java	Mon Jan 16 17:38:39 2012 +0000
@@ -30,7 +30,8 @@
 import de.intevation.artifacts.common.utils.XMLUtils;
 
 import de.intevation.flys.geom.Lines;
-import de.intevation.flys.model.CrossSectionLine;
+
+import de.intevation.flys.artifacts.model.FastCrossSectionLine;
 
 /**
  * Artifact to access additional "waterlevel"-type of data, like the height
@@ -256,14 +257,15 @@
      * @return an array holding coordinates of points of surface of water (
      *         in the form {{x1, x2} {y1, y2}} ).
      */
-    public double [][] getWaterLines(int idx, CrossSectionLine csl) {
+    @Override
+    public double [][] getWaterLines(int idx, FastCrossSectionLine csl) {
         logger.debug("getWaterLines(" + idx + ")");
 
-        List<Point2D> points = csl.fetchCrossSectionLinesPoints();
+        List<Point2D> points = csl.getPoints();
 
         WKms wkms = getWKms(0);
 
-        double km = csl.getKm().doubleValue();
+        double km = csl.getKm();
 
         // Find W at km.
         double wAtKm = getWAtKm(wkms, km);

http://dive4elements.wald.intevation.org