From a3bda1957c08ad0d0aea8afdcda9dcb1a0134db7 Mon Sep 17 00:00:00 2001 From: Max Schenkelberg Date: Fri, 16 Mar 2012 09:03:50 -0500 Subject: [PATCH] Issue #358 Fixed sampling issue with mosaic resource with best res resources Former-commit-id: cc111ab9ace8d3a389693962284a308974aaffe3 [formerly cc111ab9ace8d3a389693962284a308974aaffe3 [formerly 8aaf5e65d7c8ecbced6252d4a98af6223c77d5a0]] Former-commit-id: 258d57e82554fdec19e65d778dcf7f3fc93593d4 Former-commit-id: 1e5c074e3b5dc5ce12cc38f89502d917d1595d16 --- .../viz/radar/rsc/mosaic/RadarMosaicResource.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/mosaic/RadarMosaicResource.java b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/mosaic/RadarMosaicResource.java index 061b33b1c1..021cfcc55a 100644 --- a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/mosaic/RadarMosaicResource.java +++ b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/mosaic/RadarMosaicResource.java @@ -42,7 +42,6 @@ import com.raytheon.uf.common.geospatial.ReferencedCoordinate; import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.viz.core.IGraphicsTarget; import com.raytheon.uf.viz.core.drawables.ColorMapParameters; -import com.raytheon.uf.viz.core.drawables.IDescriptor.FramesInfo; import com.raytheon.uf.viz.core.drawables.PaintProperties; import com.raytheon.uf.viz.core.drawables.ResourcePair; import com.raytheon.uf.viz.core.exception.VizException; @@ -424,9 +423,8 @@ public class RadarMosaicResource extends } catch (Exception e) { // ignore } - FramesInfo descInfo = descriptor.getFramesInfo(); - FramesInfo rscFrameInfo = new FramesInfo(descInfo.getFrameTimes(), - descInfo.getFrameIndex(), timeMatchingMap); + + Map, DataTime> rscTimeMap = new HashMap, DataTime>(); Map, Map> rscInspectMap = new HashMap, Map>(); AbstractRadarResource highestRsc = null; String inspectString = null; @@ -443,6 +441,7 @@ public class RadarMosaicResource extends if (rsc instanceof AbstractRadarResource) { @SuppressWarnings("unchecked") AbstractRadarResource rr = (AbstractRadarResource) rsc; + rscTimeMap.put(rr, time); try { // Everything in this try block is to only sample // records within range @@ -481,8 +480,8 @@ public class RadarMosaicResource extends } for (AbstractRadarResource rr : resources) { - Map vals = rr.interrogate( - rscFrameInfo.getTimeForResource(rr), coord); + Map vals = rr.interrogate(rscTimeMap.get(rr), + coord); if (vals != null) { rscInspectMap.put(rr, vals); } @@ -503,8 +502,7 @@ public class RadarMosaicResource extends } if (highestRsc != null) { - inspectString = highestRsc.inspect( - rscFrameInfo.getTimeForResource(highestRsc), + inspectString = highestRsc.inspect(rscTimeMap.get(highestRsc), rscInspectMap.get(highestRsc)); } return inspectString == null ? "NO DATA" : inspectString;