From f1d6cff7a5b54ce935ff7a43c30ce79fee37d2bd Mon Sep 17 00:00:00 2001 From: "Kiran.Shrestha" Date: Wed, 17 Dec 2014 21:03:18 +0000 Subject: [PATCH] ASM #14130 Satellite: Derived Products Plots problems for SSM/I Point Data Change-Id: Id3c2189c017bf6341bc09236dbd39aaff937e2c8 Former-commit-id: 5f7e529f3703a24a1b8d47d574b04bb12fd7cf38 [formerly 7f731a767f3707a430d4e24775ec0b224bd30218] [formerly 5f7e529f3703a24a1b8d47d574b04bb12fd7cf38 [formerly 7f731a767f3707a430d4e24775ec0b224bd30218] [formerly 10de2332318cb9893b07f5d44622d0cf6bd2e8cc [formerly 56ff684e6425b43883603f46ef16127e8356450a]]] Former-commit-id: 10de2332318cb9893b07f5d44622d0cf6bd2e8cc Former-commit-id: dbf9c9fc4cca3f0d65a3e5b9bc3768ae992ba6dc [formerly 9061406068b51cd04ec90c85da15780705c5612f] Former-commit-id: 6586802ea5471daebe1deebeb040406900f05012 --- .../plotModels/ssmiVILPlotDesign.svg | 2 +- .../viz/pointdata/PlotModelFactory.java | 35 +++++++++++-------- .../localization/bundles/SSMIWindPlot.xml | 4 +-- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/cave/com.raytheon.viz.pointdata/localization/plotModels/ssmiVILPlotDesign.svg b/cave/com.raytheon.viz.pointdata/localization/plotModels/ssmiVILPlotDesign.svg index 17f4a8d156..cd7ca7fe23 100644 --- a/cave/com.raytheon.viz.pointdata/localization/plotModels/ssmiVILPlotDesign.svg +++ b/cave/com.raytheon.viz.pointdata/localization/plotModels/ssmiVILPlotDesign.svg @@ -29,7 +29,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" style="stroke: rgb(255,255,255);"> 0 0 75 - 0 + 0 diff --git a/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/PlotModelFactory.java b/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/PlotModelFactory.java index a5c6783215..066bcb15e7 100644 --- a/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/PlotModelFactory.java +++ b/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/PlotModelFactory.java @@ -93,6 +93,7 @@ import com.raytheon.viz.pointdata.rsc.PlotResourceData; * Mar 21, 2014 2868 njensen Refactored python usage to PythonJobCoordinator * Jun 06, 2014 2061 bsteffen Rename and add support for data formats in sampling. * Aug 07, 2014 3478 bclement removed PointDataDescription.Type.Double + * Dec 16, 2014 16193 kshrestha Updated range limits * * * @@ -1096,7 +1097,9 @@ public class PlotModelFactory { if (element.lookup != null && sValue != null) { String lu = null; - lu = element.lookup.lookup(sValue); + if (!sValue.equals("?")){ + lu = element.lookup.lookup(sValue); + } if (lu != null) { sValue = lu.trim(); } @@ -1119,8 +1122,6 @@ public class PlotModelFactory { case LONG: Number value = ob.getNumber(element.parameter); if (value != null && value.doubleValue() != -9999.0) { - if (value.doubleValue() >= lowerLimit - && value.doubleValue() <= upperLimit) { double displayValue = 0.0; if (element.unit != null) { if (element.converter == null) { @@ -1139,16 +1140,18 @@ public class PlotModelFactory { } else { displayValue = value.doubleValue(); } - if (element.format != null) { - StringBuilder sb = new StringBuilder(); - Formatter testing = new Formatter(sb); - testing.format(element.format, displayValue); - sValue = sb.toString(); - testing.close(); - } else { - sValue = Double.toString(displayValue); + + if (isValidValue(displayValue)){ + if (element.format != null) { + StringBuilder sb = new StringBuilder(); + Formatter testing = new Formatter(sb); + testing.format(element.format, displayValue); + sValue = sb.toString(); + testing.close(); + } else { + sValue = Double.toString(displayValue); + } } - } } break; case STRING: @@ -1157,14 +1160,18 @@ public class PlotModelFactory { default: element.plotNode.setNodeValue(" "); } - if (element.lookup != null) { - sValue = element.lookup.lookup(sValue); + if (element.lookup != null && sValue != null) { + String lu = null; + lu = element.lookup.lookup(sValue); + if (!lu.equals("")) + sValue = lu; } if (sValue != null) { element.plotNode.setNodeValue(sValue.substring(element.trim)); return !sValue.trim().isEmpty(); } else if (plotMissingData) { element.plotNode.setNodeValue("m"); + setPlotMissingData(false); return true; } else { element.plotNode.setNodeValue(" "); diff --git a/cave/com.raytheon.viz.satellite/localization/bundles/SSMIWindPlot.xml b/cave/com.raytheon.viz.satellite/localization/bundles/SSMIWindPlot.xml index 24d99ef9fd..bfb8bf11b1 100644 --- a/cave/com.raytheon.viz.satellite/localization/bundles/SSMIWindPlot.xml +++ b/cave/com.raytheon.viz.satellite/localization/bundles/SSMIWindPlot.xml @@ -36,7 +36,7 @@ plotModelFile="${svg}" retrieveData="false" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true" - lowerLimit="0" upperLimit="34" plotMissingData="true"> + lowerLimit="0" upperLimit="34"> @@ -102,7 +102,7 @@ plotModelFile="${svg}" retrieveData="false" isUpdatingOnMetadataOnly="false" isRequeryNecessaryOnTimeMatch="true" - lowerLimit="-1.1" upperLimit="-0.9"> + lowerLimit="-1.1" upperLimit="-0.9" plotMissingData="true">