comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/geom/Lines.java @ 2679:22c8a9b4de31

Minimal doc, TODO. flys-artifacts/trunk@4377 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 10 May 2012 09:28:01 +0000
parents 2be59d5b342c
children b94b367d8b4d
comparison
equal deleted inserted replaced
2678:d35e37b6a211 2679:22c8a9b4de31
68 this.area = area; 68 this.area = area;
69 } 69 }
70 } 70 }
71 71
72 72
73 /**
74 * For a cross section given as points and a waterlevel (in meters),
75 * create a set of lines that represent the water surface, assuming it
76 * is distributed horizontally equally.
77 * @param points the points describing the river bed.
78 * @param waterLevel the height of the horizontal water line.
79 * @return A list of Lines representing the water surface and the
80 * calculated area between water surface and river bed.
81 */
73 public static ListWithArea fillWater(List<Point2D> points, double waterLevel) { 82 public static ListWithArea fillWater(List<Point2D> points, double waterLevel) {
74 83
75 boolean debug = log.isDebugEnabled(); 84 boolean debug = log.isDebugEnabled();
76 85
77 if (debug) { 86 if (debug) {
93 if (waterLevel > p.getY()) { 102 if (waterLevel > p.getY()) {
94 result.add(new Line2D.Double( 103 result.add(new Line2D.Double(
95 p.getX(), waterLevel, 104 p.getX(), waterLevel,
96 p.getX(), waterLevel)); 105 p.getX(), waterLevel));
97 } 106 }
107 // TODO continue calculating area.
98 return new ListWithArea(result, 0d); 108 return new ListWithArea(result, 0d);
99 } 109 }
100 110
101 double minX = Double.MAX_VALUE; 111 double minX = Double.MAX_VALUE;
102 double minY = Double.MAX_VALUE; 112 double minY = Double.MAX_VALUE;

http://dive4elements.wald.intevation.org