comparison gnv-artifacts/src/main/java/de/intevation/gnv/math/Interpolation2D.java @ 366:086e3af38b96

Fixed index error in i-gap detection in 2D interpolation. gnv-artifacts/trunk@441 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 16 Dec 2009 22:10:46 +0000
parents f66088a43ecc
children 04a242c67fe6
comparison
equal deleted inserted replaced
365:f66088a43ecc 366:086e3af38b96
160 int numNeighbors = Integer.bitCount(mask); 160 int numNeighbors = Integer.bitCount(mask);
161 161
162 // only interpolate if we have all four neighbors 162 // only interpolate if we have all four neighbors
163 // and we do not have any gaps. 163 // and we do not have any gaps.
164 if (numNeighbors == 4 164 if (numNeighbors == 4
165 && !neighbors[0].hasIGap(neighbors[0]) 165 && !neighbors[0].hasIGap(neighbors[1])
166 && !neighbors[1].hasJGap(neighbors[3]) 166 && !neighbors[1].hasJGap(neighbors[3])
167 && !neighbors[3].hasIGap(neighbors[2]) 167 && !neighbors[3].hasIGap(neighbors[2])
168 && !neighbors[2].hasJGap(neighbors[0]) 168 && !neighbors[2].hasJGap(neighbors[0])
169 ) { 169 ) {
170 double z1 = interpolate( 170 double z1 = interpolate(

http://dive4elements.wald.intevation.org