comparison gnv-artifacts/src/main/java/de/intevation/gnv/math/Interpolation3D.java @ 528:44415ae01ddb

Fixed issue gnv/issue159 gnv-artifacts/trunk@624 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 25 Jan 2010 18:25:19 +0000
parents 1bf058f1a2d1
children 9a828e5a2390
comparison
equal deleted inserted replaced
527:f598702b2a10 528:44415ae01ddb
19 */ 19 */
20 public class Interpolation3D 20 public class Interpolation3D
21 implements Serializable 21 implements Serializable
22 { 22 {
23 private static Logger log = Logger.getLogger(Interpolation3D.class); 23 private static Logger log = Logger.getLogger(Interpolation3D.class);
24
25 public static final int CULL_POINT_THRESHOLD = Integer.getInteger(
26 "gnv.interpolation3d.cull.point.threshold", 1000);
27 24
28 public static final int DEFAULT_WIDTH = 1024; 25 public static final int DEFAULT_WIDTH = 1024;
29 public static final int DEFAULT_HEIGHT = 768; 26 public static final int DEFAULT_HEIGHT = 768;
30 27
31 public static final double EPS = 1e-6d; 28 public static final double EPS = 1e-6d;
107 104
108 if (M < 1 || N < 2) { // nothing to do 105 if (M < 1 || N < 2) { // nothing to do
109 return false; 106 return false;
110 } 107 }
111 108
112 Envelope relevantArea = M > CULL_POINT_THRESHOLD
113 ? Interpolation2D.pathBoundingBox(path, 0.05d)
114 : null;
115
116 List<GridCell> cells = GridCell.pointsToGridCells( 109 List<GridCell> cells = GridCell.pointsToGridCells(
117 points, relevantArea); 110 points, Interpolation2D.relevantArea(path, points));
118 111
119 if (cells.isEmpty()) { 112 if (cells.isEmpty()) {
120 log.warn("no cells found"); 113 log.warn("no cells found");
121 return false; 114 return false;
122 } 115 }

http://dive4elements.wald.intevation.org