From 893bc3d14348806b0ff1ecc9786937a9311f101f 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: 1b8beb3f8d68a0008bdfc049fd836708a3555fef [formerly 97edff9f7c2c77cd4a721d83e8d23913d0873c35] [formerly cc111ab9ace8d3a389693962284a308974aaffe3] [formerly 1b8beb3f8d68a0008bdfc049fd836708a3555fef [formerly 97edff9f7c2c77cd4a721d83e8d23913d0873c35] [formerly cc111ab9ace8d3a389693962284a308974aaffe3] [formerly 258d57e82554fdec19e65d778dcf7f3fc93593d4 [formerly cc111ab9ace8d3a389693962284a308974aaffe3 [formerly 8aaf5e65d7c8ecbced6252d4a98af6223c77d5a0]]]] Former-commit-id: 258d57e82554fdec19e65d778dcf7f3fc93593d4 Former-commit-id: 712815ee18387948cb9552e1ca21c43a501e9d48 [formerly 4e81d2432c7243cf5ab69f464ba6084f84b1cf24] [formerly 6ca4a7d453c44b2e3a855ba1e88fd28485927549 [formerly 1e5c074e3b5dc5ce12cc38f89502d917d1595d16]] Former-commit-id: 98df734d7d4b6cec5aaffaedd02aad173354c879 [formerly a3bda1957c08ad0d0aea8afdcda9dcb1a0134db7] Former-commit-id: e220ddf5156143754357bf9edec9679f25223631 --- .../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;