comparison gnv-artifacts/src/main/java/de/intevation/gnv/math/AreaInterpolation.java @ 593:b248531fa20b

Added experimental support for extrapolation in "Horizontalschnitte" gnv-artifacts/trunk@648 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 31 Jan 2010 21:50:15 +0000
parents 44415ae01ddb
children c4156275c1e1
comparison
equal deleted inserted replaced
592:3c939c95c477 593:b248531fa20b
47 47
48 public boolean interpolate( 48 public boolean interpolate(
49 List<? extends Point2d> points, 49 List<? extends Point2d> points,
50 Envelope boundingBox, 50 Envelope boundingBox,
51 Dimension samples, 51 Dimension samples,
52 XYDepth depth 52 XYDepth depth,
53 int extrapolationRounds
53 ) { 54 ) {
54 boolean debug = log.isDebugEnabled(); 55 boolean debug = log.isDebugEnabled();
55 56
56 if (points == null || points.isEmpty()) { 57 if (points == null || points.isEmpty()) {
57 log.warn("no points to interpolate"); 58 log.warn("no points to interpolate");
60 61
61 List<GridCell> cells = GridCell.pointsToGridCells( 62 List<GridCell> cells = GridCell.pointsToGridCells(
62 points, 63 points,
63 Interpolation2D.relevantArea( 64 Interpolation2D.relevantArea(
64 boundingBox, 65 boundingBox,
65 points)); 66 points),
67 extrapolationRounds);
66 68
67 if (cells.isEmpty()) { 69 if (cells.isEmpty()) {
68 log.warn("no cells to interpolate"); 70 log.warn("no cells to interpolate");
69 return false; 71 return false;
70 } 72 }

http://dive4elements.wald.intevation.org