comparison gnv-artifacts/src/main/java/de/intevation/gnv/math/Interpolation2D.java @ 474:ab29e4ff2fda

Added area interpolation needed for "Horizontalschnitt" gnv-artifacts/trunk@540 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 14 Jan 2010 10:34:05 +0000
parents f42ed4f10b79
children 70adafe2b9d5
comparison
equal deleted inserted replaced
473:a6a33ef35809 474:ab29e4ff2fda
133 Point2d [] neighbors = new Point2d[4]; 133 Point2d [] neighbors = new Point2d[4];
134 134
135 int missedInterpolations = 0; 135 int missedInterpolations = 0;
136 int interpolations = 0; 136 int interpolations = 0;
137 137
138 L1Comparator invL1 = new L1Comparator(center);
139
138 for (double p = from; p <= to; p += dP) { 140 for (double p = from; p <= to; p += dP) {
139 if (!linearToMap.locate(p, center)) { 141 if (!linearToMap.locate(p, center)) {
140 continue; 142 continue;
141 } 143 }
142 queryBuffer.init( 144 queryBuffer.init(
143 center.x - dxMax, center.x + dxMax, 145 center.x - dxMax, center.x + dxMax,
144 center.y - dyMax, center.y + dyMax); 146 center.y - dyMax, center.y + dyMax);
145 147
146 List potential = spatialIndex.query(queryBuffer); 148 List potential = spatialIndex.query(queryBuffer);
147 149
148 L1Comparator invL1 = new L1Comparator(center);
149 Collections.sort(potential, invL1); 150 Collections.sort(potential, invL1);
150 151
151 neighbors[0] = neighbors[1] = 152 neighbors[0] = neighbors[1] =
152 neighbors[2] = neighbors[3] = null; 153 neighbors[2] = neighbors[3] = null;
153 154

http://dive4elements.wald.intevation.org