comparison gnv-artifacts/src/main/java/de/intevation/gnv/math/AreaInterpolation.java @ 808:2e951160c43d

Finished the javadoc of the math package. gnv-artifacts/trunk@890 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 08 Apr 2010 16:35:02 +0000
parents d766fe2d917a
children 22c18083225e
comparison
equal deleted inserted replaced
807:a645bd23c1c8 808:2e951160c43d
13 import java.util.List; 13 import java.util.List;
14 14
15 import org.apache.log4j.Logger; 15 import org.apache.log4j.Logger;
16 16
17 /** 17 /**
18 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> 18 * Does an area interpolation for "Horizontalschnitte".
19 *
20 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a>
19 */ 21 */
20 public class AreaInterpolation 22 public class AreaInterpolation
21 implements Serializable 23 implements Serializable
22 { 24 {
23 private static Logger log = Logger.getLogger(AreaInterpolation.class); 25 private static Logger log = Logger.getLogger(AreaInterpolation.class);
24 26
27 /**
28 * The generated raster.
29 */
25 protected double [] raster; 30 protected double [] raster;
26 31
32 /**
33 * The width of the raster.
34 */
27 protected int width; 35 protected int width;
36 /**
37 * The height of the raster.
38 */
28 protected int height; 39 protected int height;
29 40
41 /**
42 * Default constructor.
43 */
30 public AreaInterpolation() { 44 public AreaInterpolation() {
31 } 45 }
32 46
47 /**
48 * Returns the width of the generated raster.
49 * @return the width of the raster.
50 */
33 public int getWidth() { 51 public int getWidth() {
34 return width; 52 return width;
35 } 53 }
36 54
55 /**
56 * Returns the height of the raster.
57 * @return The height of the raster.
58 */
37 public int getHeight() { 59 public int getHeight() {
38 return height; 60 return height;
39 } 61 }
40 62
63 /**
64 * The generated raster.
65 * @return
66 */
41 public double [] getRaster() { 67 public double [] getRaster() {
42 return raster; 68 return raster;
43 } 69 }
44 70
71 /**
72 * Epsilon for numerical stability.
73 */
45 public static final double EPS = 1e-6d; 74 public static final double EPS = 1e-6d;
46 75
47 76
77 /**
78 * Fills a raster by interpolating the input values.
79 * @param points The attributed input values.
80 * @param boundingBox The world area where to interpolate.
81 * @param samples The width and height of the raster.
82 * @param depth The callback to query the depth at a given point.
83 * @param extrapolationRounds Number of extrapolation point layers
84 * to generate before doing the interpolation.
85 * @return true if the interpolation succeeds else false.
86 */
48 public boolean interpolate( 87 public boolean interpolate(
49 List<? extends Point2d> points, 88 List<? extends Point2d> points,
50 Envelope boundingBox, 89 Envelope boundingBox,
51 Dimension samples, 90 Dimension samples,
52 XYDepth depth, 91 XYDepth depth,

http://dive4elements.wald.intevation.org