From 5a51e704567fd14cd7109fbdc00bcc05f017c805 Mon Sep 17 00:00:00 2001 From: Ron Anderson Date: Fri, 2 Nov 2012 14:43:32 -0500 Subject: [PATCH] Issue #1260 Added an extra grid cell around the slab to improve interpolation results. Change-Id: I9ffaa42402aa4527946bcc973577bfc7b2232f57 Former-commit-id: 51bbb17d43e7e458e75f3229ec1521ecc04517e9 --- .../edex/plugin/gfe/server/database/NetCDFUtils.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/NetCDFUtils.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/NetCDFUtils.java index 31bf23dcdb..0c9d07917a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/NetCDFUtils.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/NetCDFUtils.java @@ -353,10 +353,12 @@ public class NetCDFUtils { yindex.add(igc.y); } - int xmin = Collections.min(xindex) - 1; - int xmax = Collections.max(xindex) + 1; - int ymin = Collections.min(yindex) - 1; - int ymax = Collections.max(yindex) + 1; + // find min/max plus a little extra for so interpolation doesn't have + // edge effects + int xmin = Collections.min(xindex) - 2; + int xmax = Collections.max(xindex) + 2; + int ymin = Collections.min(yindex) - 2; + int ymax = Collections.max(yindex) + 2; xmin = Math.max(0, xmin); ymin = Math.max(0, ymin);