Mercurial > dive4elements > gnv-client
diff gnv-artifacts/src/main/java/de/intevation/gnv/math/AreaInterpolation.java @ 501:70adafe2b9d5
Speed up the "Horizontalschnitte"
gnv-artifacts/trunk@584 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 20 Jan 2010 14:47:30 +0000 |
parents | 4080b57dcb52 |
children | d9d933e06875 |
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/math/AreaInterpolation.java Wed Jan 20 08:50:10 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/math/AreaInterpolation.java Wed Jan 20 14:47:30 2010 +0000 @@ -77,7 +77,8 @@ } } - double [] buffer = Interpolation2D.calculateBuffer(relevantPoints); + double [] buffer = Interpolation2D + .calculateBufferRemoveOutlier(relevantPoints); double dxMax = buffer[0]; double dyMax = buffer[1]; @@ -111,6 +112,8 @@ double minX = boundingBox.getMinX(); double minY = boundingBox.getMinY(); + long startTime = System.currentTimeMillis(); + int row = 0; for (int j = 0; j < H; ++j, row += W) { double y = j*cellHeight + 0.5d*cellHeight + minY; @@ -177,6 +180,12 @@ } } + long stopTime = System.currentTimeMillis(); + + if (debug) { + log.debug("interpolation took: " + (stopTime - startTime)/1000f + " secs"); + } + this.raster = raster; this.width = W; this.height = H;