From f4e30720b6ab8ce0cf486cb1c13902d8273fb962 Mon Sep 17 00:00:00 2001 From: Zihou Wang Date: Fri, 27 Feb 2015 15:44:43 +0000 Subject: [PATCH 1/5] VLab Issue #6612 - DR_14627 TDWR radar menu extra 0.0; fixes #6612 Change-Id: Ib04c560a4edf1c160bcf2591b94871fb0758abce Former-commit-id: dc15dfbf87b79d38c97f1b7cd14c0f93e021e150 --- .../uf/common/dataplugin/radar/util/TerminalRadarUtils.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/util/TerminalRadarUtils.java b/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/util/TerminalRadarUtils.java index fdd591ea75..cfecc3c455 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/util/TerminalRadarUtils.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.radar/src/com/raytheon/uf/common/dataplugin/radar/util/TerminalRadarUtils.java @@ -47,6 +47,7 @@ import com.raytheon.uf.common.localization.PathManagerFactory; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * May 24, 2010 mnash Initial creation + * Feb 11, 2015 14627 zwang Remove the extra elevation 0.0 * * * @@ -117,10 +118,6 @@ public class TerminalRadarUtils { for (Double y : mapSet.get("HAZ")) { theMap.put(TiltAngleBin.getPrimaryElevationAngle(y), y); } - // add the base case if necessary - if (!theMap.containsKey(0.0)) { - theMap.put(0.0, 0.0); - } List list = new ArrayList(theMap.values()); Collections.sort(list); radarElevations.put("t" + lineVals[0].toLowerCase(), list); From 76b867c6f9dce13c4a97db372097914206af76fd Mon Sep 17 00:00:00 2001 From: Zihou Wang Date: Fri, 27 Feb 2015 16:19:31 +0000 Subject: [PATCH 2/5] VLab Issue #6615 - DR_17086 Derived TDWR products do not have green time; fixes #6615 Change-Id: Id810ac9ef4fdf0840253c30f52ca9ea3384d2da0 Former-commit-id: 9c3f0157d1d231555bd984d901204915c26bbf6d --- .../src/com/raytheon/edex/plugin/radar/RadarDecoder.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/RadarDecoder.java b/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/RadarDecoder.java index bf98fef6dd..07ccec1ccc 100644 --- a/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/RadarDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.radar/src/com/raytheon/edex/plugin/radar/RadarDecoder.java @@ -100,6 +100,7 @@ import com.raytheon.uf.edex.database.cluster.ClusterTask; * Jan 21, 2014 2627 njensen Removed decode()'s try/catch, camel route will do try/catch * May 14, 2014 2536 bclement moved WMO Header to common, removed TimeTools usage * Dec 26, 2014 ASM#632 dhuffman Added AlertMessageSanityCheck() for this DR. + * Feb 27, 2015 17086 zwang Corrected the elevation of volume based TDWR products * * * @@ -348,7 +349,8 @@ public class RadarDecoder extends AbstractDecoder { // determine to use the primary elevations or the elevation // in the terminal radar configuration file - if (TerminalRadarUtils.isTerminalRadar(record.getIcao())) { + if (TerminalRadarUtils.isTerminalRadar(record.getIcao()) + && info.isElevation()) { Double elevation = TerminalRadarUtils.getPrimarysMap( record.getIcao()).get( TiltAngleBin.getPrimaryElevationAngle(record From bd49e81e7f1710b3c375887caefc603c1f6f7d31 Mon Sep 17 00:00:00 2001 From: Zihou Wang Date: Fri, 27 Feb 2015 18:15:38 +0000 Subject: [PATCH 3/5] VLab Issue #6616 - DR_17099 Can not display TLAS elev 0.8 product; fixes #6616 Change-Id: I085db53fab11899acf65118d5f87a1c6421e6f59 Former-commit-id: a92820ad4717a20cb8904b80ab0531739fe71a31 --- .../rcm/config/awips1/Awips1ProdDistInfoBuilder.java | 5 +++-- .../utility/common_static/base/radar/tiltAngleGroups.txt | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) mode change 100644 => 100755 edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/radar/tiltAngleGroups.txt diff --git a/RadarServer/com.raytheon.rcm.server/src/com/raytheon/rcm/config/awips1/Awips1ProdDistInfoBuilder.java b/RadarServer/com.raytheon.rcm.server/src/com/raytheon/rcm/config/awips1/Awips1ProdDistInfoBuilder.java index 4ef0d4aba3..0fe8f4be8e 100755 --- a/RadarServer/com.raytheon.rcm.server/src/com/raytheon/rcm/config/awips1/Awips1ProdDistInfoBuilder.java +++ b/RadarServer/com.raytheon.rcm.server/src/com/raytheon/rcm/config/awips1/Awips1ProdDistInfoBuilder.java @@ -143,12 +143,13 @@ public class Awips1ProdDistInfoBuilder { // Because the radar ingest system uses zero as the value that stands for the // null tilt, any bin including 0.0 must have 0.0 as the primary tilt. // ... not sure if this applies to us + // 02/27/2015 DR17099 zwang For TLAS, the first elev 0.8 should match to 0.5 // Sequence of (group-rep1, min1, max1, group-rep2, min2, max2, ...) protected static int[] angleGroups = { 0, 0, 3, - 5, 4, 7, - 9, 8, 11, + 5, 4, 8, + 9, 9, 11, 15, 12, 16, 18, 17, 20, 24, 21, 26, diff --git a/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/radar/tiltAngleGroups.txt b/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/radar/tiltAngleGroups.txt old mode 100644 new mode 100755 index af19922b6d..5da70ff7f6 --- a/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/radar/tiltAngleGroups.txt +++ b/edexOsgi/com.raytheon.edex.plugin.radar/utility/common_static/base/radar/tiltAngleGroups.txt @@ -8,8 +8,8 @@ // primary min max // angle angle angle 0.0 0.0 0.3 - 0.5 0.4 0.7 - 0.9 0.8 1.1 + 0.5 0.4 0.8 + 0.9 0.9 1.1 1.5 1.2 1.6 1.8 1.7 2.0 2.4 2.1 2.6 From 7d7aa1f443063cff36255027bd21cdb4df1d9054 Mon Sep 17 00:00:00 2001 From: Jordan Gerth Date: Mon, 2 Mar 2015 19:25:12 -0600 Subject: [PATCH 4/5] VLab Issue #6704 - Add satellite source and configurability to satellite legends Change-Id: Id2fbc581f062d8355cf05d3c1e930df1cbf55c49 Former-commit-id: 79c5f9c91e97eef3b113ca411a6477090b6366e2 --- .../META-INF/MANIFEST.MF | 3 +- .../localization/satellite/customLegends.xml | 15 ++ .../viz/satellite/SatelliteConstants.java | 154 ++++++++++-------- .../viz/satellite/SatelliteCustomLegends.java | 138 ++++++++++++++++ .../satellite/rsc/SatBlendedResourceData.java | 3 +- .../viz/satellite/rsc/SatResource.java | 21 ++- 6 files changed, 255 insertions(+), 79 deletions(-) create mode 100644 cave/com.raytheon.viz.satellite/localization/satellite/customLegends.xml create mode 100644 cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/SatelliteCustomLegends.java diff --git a/cave/com.raytheon.viz.satellite/META-INF/MANIFEST.MF b/cave/com.raytheon.viz.satellite/META-INF/MANIFEST.MF index b3982026d6..add6e30f4e 100644 --- a/cave/com.raytheon.viz.satellite/META-INF/MANIFEST.MF +++ b/cave/com.raytheon.viz.satellite/META-INF/MANIFEST.MF @@ -27,7 +27,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8", com.raytheon.viz.alerts, com.raytheon.uf.viz.core.rsc;bundle-version="1.14", javax.measure -Import-Package: com.raytheon.viz.core.rsc, +Import-Package: com.raytheon.viz.awipstools, + com.raytheon.viz.core.rsc, com.raytheon.viz.core.rsc.hdf5 Export-Package: com.raytheon.viz.satellite, com.raytheon.viz.satellite.rsc diff --git a/cave/com.raytheon.viz.satellite/localization/satellite/customLegends.xml b/cave/com.raytheon.viz.satellite/localization/satellite/customLegends.xml new file mode 100644 index 0000000000..c5bc87bdb0 --- /dev/null +++ b/cave/com.raytheon.viz.satellite/localization/satellite/customLegends.xml @@ -0,0 +1,15 @@ + + + + + GOES-13(N) Imager VisibleGOES-13 Visible Imagery + GOES-14(O) Imager VisibleGOES-14 Visible Imagery + GOES-15(P) Imager VisibleGOES-15 Visible Imagery + Imager VisibleVisible Imagery + + \ No newline at end of file diff --git a/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/SatelliteConstants.java b/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/SatelliteConstants.java index 7d68ad2b77..e46c30c59b 100644 --- a/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/SatelliteConstants.java +++ b/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/SatelliteConstants.java @@ -32,91 +32,92 @@ import java.util.HashMap; * ------------ ---------- ----------- -------------------------- * 02/26/09 jsanchez Initial Creation. * 03/16/09 800 jsanchez Updated legend. - * 12/16/14 15196 kshrestha Converted Millimeters to Inches for Total Precip Water + * 12/16/14 15196 kshrestha Converted Millimeters to Inches for Total Precip Water + * 03/02/15 DCS 14960 jgerth Support custom legends to override the default constants * * */ public class SatelliteConstants { - + private static final String GRID_CLOUD_AMOUNT_LEGEND = "GOES Sounder DPI Cloud Amount (%)"; - + private static final String GRID_CLOUD_TOP_PRESSURE_OR_HEIGHT_LEGEND = "GOES Sounder DPI Cloud Top Height (ft/100 MSL)"; - + private static final String IMAGER_11U_IR_LEGEND = "IR Satellite ( C )"; - + private static final String IMAGER_12U_IR_LEGEND = "IR 12u Satellite"; - + private static final String IMAGER_13U_IR_LEGEND = "IR 13u Satellite"; - + private static final String IMAGER_3P9U_IR_LEGEND = "IR 3.9u Satellite ( C )"; - + private static final String IMAGER_6P7_6P5U_IR_WV_LEGEND = "Water Vapor Satellite"; - + private static final String IMAGER_VISIBLE_LEGEND = "Visible Satellite"; - + private static final String RAIN_FALL_RATE_LEGEND = "Rainfall Rate (mm/hr)"; - + private static final String SOUNDER_11U_IMAGER_LEGEND = "GOES Sndr IR Satellite ( C )"; - + private static final String SOUNDER_14U_IMAGERY_LEGEND = "GOES Sndr IR 14.1u Satellite ( C )"; - + private static final String SOUNDER_4U_IMAGERY_LEGEND = "GOES Sndr IR 4.0u Satellite ( C )"; - + private static final String SOUNDER_4P5U_IMAGERY_LEGEND = "GOES Sndr IR 4.5u Satellite ( C )"; - + private static final String SOUNDER_6P5U_IMAGERY_LEGEND = "GOES Sndr Water Vapor 6.5u Satellite (Counts)"; - + private static final String SOUNDER_7U_IMAGERY_LEGEND = "GOES Sndr Water Vapor 7.0u Satellite (Counts)"; - + private static final String SOUNDER_7P4U_IMAGERY_LEGEND = "GOES Sndr Water Vapor 7.4u Satellite (Counts)"; - + private static final String SOUNDER_BASED_DERIVED_LI_LEGEND = "GOES Sounder DPI Lifted Index ( C )"; - + private static final String SOUNDER_BASED_DERIVED_PW_LEGEND = "Total Precip Water (in)"; - + private static final String SOUNDER_BASED_DERIVED_SFC_SKIN_LEGEND = "GOES Sounder DPI Skin Temperature ( C )"; - + private static final String SOUNDER_VIS_IMAGERY_LEGEND = "GOES Sndr Visible Satellite (Counts)"; - + private static final String IMAGER_11U_39U_IR_LEGEND = "11u-3.9u Satellite (counts)"; - + private static final String IMAGER_11U_13U_IR_LEGEND = "11u-13u Satellite (counts)"; - + private static final String IMAGER_11U_12U_IR_LEGEND = "11u-12u Satellite (counts)"; - + private static final String IR_IN_WV__LEGEND = "IR in WV Satellite (C)"; - + private static final String POES_IR_LEGEND = "POES IR Satellite (C)"; - + private static final String POES_VIS_LEGEND = "POES Visible Satellite"; - + private static final String POES_3P7U_IR_LEGEND = "POES IR 3.7u Satellite (C)"; - + private static final String POES_11U_37U_IR_LEGEND = "POES 11u-3.7u Satellite (counts)"; - + private static final String PERCENT_OF_NORMAL_LEGEND = "Percent of Normal TPW (%)"; - + public static final String DMSP = "DMSP"; - + public static final String POES = "POES-NPOESS"; - + public static final String MISC = "Miscellaneous"; - + public static final String COMP = "Composite"; - + public static final String PRECIP = "Sounder Based Derived Precipitable Water (PW)"; - + public static final String RAIN = "Rain fall rate"; - - private static final HashMap LEGEND_MAP = new HashMap(); - - static { + + private static final HashMap LEGEND_MAP = new HashMap(); + + static { LEGEND_MAP.put("Gridded Cloud Amount",GRID_CLOUD_AMOUNT_LEGEND); - LEGEND_MAP.put("Gridded Cloud Top Pressure or Height",GRID_CLOUD_TOP_PRESSURE_OR_HEIGHT_LEGEND); - LEGEND_MAP.put("Imager 11 micron IR",IMAGER_11U_IR_LEGEND); - LEGEND_MAP.put("Imager 12 micron IR",IMAGER_12U_IR_LEGEND); - LEGEND_MAP.put("Imager 13 micron (IR)",IMAGER_13U_IR_LEGEND); - LEGEND_MAP.put("Imager 3.9 micron IR",IMAGER_3P9U_IR_LEGEND); + LEGEND_MAP.put("Gridded Cloud Top Pressure or Height",GRID_CLOUD_TOP_PRESSURE_OR_HEIGHT_LEGEND); + LEGEND_MAP.put("Imager 11 micron IR",IMAGER_11U_IR_LEGEND); + LEGEND_MAP.put("Imager 12 micron IR",IMAGER_12U_IR_LEGEND); + LEGEND_MAP.put("Imager 13 micron IR",IMAGER_13U_IR_LEGEND); + LEGEND_MAP.put("Imager 3.9 micron IR",IMAGER_3P9U_IR_LEGEND); LEGEND_MAP.put("Imager 6.7-6.5 micron IR (WV)",IMAGER_6P7_6P5U_IR_WV_LEGEND); LEGEND_MAP.put("Imager Visible",IMAGER_VISIBLE_LEGEND); LEGEND_MAP.put(RAIN,RAIN_FALL_RATE_LEGEND); @@ -135,38 +136,47 @@ public class SatelliteConstants { LEGEND_MAP.put("Polar IR",POES_IR_LEGEND); LEGEND_MAP.put("Polar Vis",POES_VIS_LEGEND); LEGEND_MAP.put("Polar 3.7u",POES_3P7U_IR_LEGEND); - + //Derived Parameters LEGEND_MAP.put("satDif11u3_9uIR",IMAGER_11U_39U_IR_LEGEND); LEGEND_MAP.put("satDif11u13uIR",IMAGER_11U_13U_IR_LEGEND); LEGEND_MAP.put("satDif11u12uIR",IMAGER_11U_12U_IR_LEGEND); LEGEND_MAP.put("satDivWVIR",IR_IN_WV__LEGEND); LEGEND_MAP.put("poesDif11u3_7uIR",POES_11U_37U_IR_LEGEND); - } - - public static String getLegend(String productName, String creatingEntity) { - String rVal = LEGEND_MAP.get(productName); - if(productName.equals(PRECIP) || productName.equals(RAIN)){ - if(creatingEntity.equals(COMP)){ - rVal = "GOES Sounder DPI " + rVal; - } else if(creatingEntity.equals(DMSP)){ - rVal = "DMSP SSM/I " + rVal; - } else if(creatingEntity.equals(POES)){ - if (productName.equals("Rain fall rate")) { - rVal = "Blended Rain Rate (mm/hr)"; - } - else { - rVal = "POES AMSU " + rVal; - } - } else if(creatingEntity.equals(MISC)){ - rVal = "Blended " + rVal; - } - } - if(rVal == null || rVal.length() == 0) { - rVal = productName; - } - return rVal; - - } + } + public static String getLegend(String productName, String creatingEntity) { + String cl = null; + if (creatingEntity != null && creatingEntity.length() != 0) + cl = SatelliteCustomLegends.getInstance().getCustomLegend(creatingEntity + " " + productName); + if (cl == null) + cl = SatelliteCustomLegends.getInstance().getCustomLegend(productName); + String rVal; + if (cl != null) + rVal = cl; + else { + rVal = LEGEND_MAP.get(productName); + if(productName.equals(PRECIP) || productName.equals(RAIN)){ + if(creatingEntity.equals(COMP)){ + rVal = "GOES Sounder DPI " + rVal; + } else if(creatingEntity.equals(DMSP)){ + rVal = "DMSP SSM/I " + rVal; + } else if(creatingEntity.equals(POES)){ + if (productName.equals("Rain fall rate")) { + rVal = "Blended Rain Rate (mm/hr)"; + } + else { + rVal = "POES AMSU " + rVal; + } + } else if(creatingEntity.equals(MISC)){ + rVal = "Blended " + rVal; + } + } + } + if (rVal == null || rVal.length() == 0) + rVal = productName; + if (creatingEntity != null && creatingEntity.length() > 0 && cl == null) + rVal = creatingEntity + " " + rVal; + return rVal; + } } diff --git a/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/SatelliteCustomLegends.java b/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/SatelliteCustomLegends.java new file mode 100644 index 0000000000..dde8e04705 --- /dev/null +++ b/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/SatelliteCustomLegends.java @@ -0,0 +1,138 @@ +package com.raytheon.viz.satellite; + +import java.io.File; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.Unmarshaller; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlRootElement; + +import com.raytheon.uf.common.localization.IPathManager; +import com.raytheon.uf.common.localization.LocalizationContext; +import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType; +import com.raytheon.uf.common.localization.PathManagerFactory; +import com.raytheon.uf.common.status.IUFStatusHandler; +import com.raytheon.uf.common.status.UFStatus; + +/** + * This code unmarshals an XML file to modify the default product legends for imagery handled + * through the raytheon viz satellite resources. + * + * This is similar to code that Tom Kretz previously developed for the edex regionalsat plug-in. + * + * The default customLegends.xml file contains the following: + *
+ * 
+ * 
+ *	
+ *		GOES-13(N) Imager VisibleGOES-13 Visible Imagery
+ *		GOES-14(O) Imager VisibleGOES-14 Visible Imagery
+ *		GOES-15(P) Imager VisibleGOES-15 Visible Imagery
+ *		Imager VisibleVisible Imagery
+ *	
+ * 
+ * 
+ * 
+ * + *
+ * 
+ * SOFTWARE HISTORY
+ *                   
+ * date          Ticket#     Engineer    Description
+ * -----------  ----------  ----------- --------------------------
+ * 4/21/2014    DCS 14960   jgerth      Initial Creation
+ * 
+ * 
+ * + * @author jgerth + * @version 1.0 + */ + +public class SatelliteCustomLegends { + private static final IUFStatusHandler theHandler = UFStatus + .getHandler(SatelliteCustomLegends.class); + private static final String LOOKUP_DIR = "satellite"; + + @XmlAccessorType(XmlAccessType.NONE) + public static abstract class AbstractLookup { + public abstract Map getMap(); + } + + @XmlRootElement + @XmlAccessorType(XmlAccessType.FIELD) + private static class CustomLegends extends AbstractLookup { + public HashMap map = new HashMap(); + + @Override + public Map getMap() { + return map; + } + } + + private CustomLegends customLegendsLookup; + + public SatelliteCustomLegends() { + try { + init(); + } catch (Exception e) { + theHandler.error("Failed to initialize lookups", e); + } + } + + // initialize the lookup tables from the configuration files + private void init() throws Exception { + JAXBContext context = JAXBContext.newInstance(CustomLegends.class); + Unmarshaller u = context.createUnmarshaller(); + customLegendsLookup = load(new CustomLegends(), "customLegends.xml", u); + } + + private static , K, V> T load(T combinedLookup, String fileName, Unmarshaller u) throws Exception { + IPathManager pm = PathManagerFactory.getPathManager(); + + List contexts = Arrays.asList(pm.getLocalSearchHierarchy(LocalizationType.CAVE_STATIC)); + Collections.reverse(contexts); + for (LocalizationContext ctx : contexts) { + File f = pm.getFile(ctx, LOOKUP_DIR + File.separator + fileName); + if (f != null && f.isFile()) { + try { + @SuppressWarnings("unchecked") + T lookup = (T) u.unmarshal(f); + if (!combinedLookup.getClass().isAssignableFrom(lookup.getClass())) { + throw new Exception(String.format("file contains %s, expected %s", + lookup.getClass(), combinedLookup.getClass())); + } + combinedLookup.getMap().putAll(lookup.getMap()); + } catch (Exception e) { + theHandler.error(String.format("%s: %s", f, e.getMessage()), e); + } + } + } + return combinedLookup; + } + + /** + * @param cl + * @return + */ + public String getCustomLegend(String cl) { + return customLegendsLookup.map.get(cl); + } + + private static SatelliteCustomLegends instance; + + public static synchronized SatelliteCustomLegends getInstance() { + if (instance == null) + instance = new SatelliteCustomLegends(); + return instance; + } + + public static synchronized void reload() { + instance = new SatelliteCustomLegends(); + } +} diff --git a/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/rsc/SatBlendedResourceData.java b/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/rsc/SatBlendedResourceData.java index e811b02621..c32d7a2aaa 100644 --- a/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/rsc/SatBlendedResourceData.java +++ b/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/rsc/SatBlendedResourceData.java @@ -78,6 +78,7 @@ import com.raytheon.uf.viz.datacube.DataCubeContainer; * Jun 17, 2009 2493 jsanchez Displayed both times in CONUS scale. * Apr 18, 2014 2947 bsteffen Allow resources being blended to omit * load properties. + * Mar 3, 2015 DCS 14960 jgerth Slight modification to getName * * * @@ -136,7 +137,7 @@ public class SatBlendedResourceData extends AbstractRequestableResourceData if (rsc != null) { if (s.length() == 0) { s = rsc.getName(); - } else if (!s.equals(rsc.getName())) { + } else if (!s.contains(rsc.getName())) { s += " + " + rsc.getName(); } } diff --git a/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/rsc/SatResource.java b/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/rsc/SatResource.java index 294f382bc4..3abc1aae6a 100644 --- a/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/rsc/SatResource.java +++ b/cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/rsc/SatResource.java @@ -83,6 +83,7 @@ import com.raytheon.viz.satellite.inventory.DerivedSatelliteRecord; import com.raytheon.viz.satellite.tileset.SatDataRetriever; import com.raytheon.viz.satellite.tileset.SatTileSetRenderable; import com.vividsolutions.jts.geom.Coordinate; +import com.raytheon.viz.awipstools.IToolChangedListener; /** * Provides satellite raster rendering support @@ -123,6 +124,7 @@ import com.vividsolutions.jts.geom.Coordinate; * Jun 12, 2014 3238 bsteffen Implement Interrogatable * Aug 21, 2014 DR 17313 jgerth Set no data value if no data mapping * Oct 15, 2014 3681 bsteffen create renderable in interrogate if necessary. + * Mar 3, 2015 DCS 14960 jgerth Retrieve legend from style rules if available * * * @@ -131,7 +133,7 @@ import com.vividsolutions.jts.geom.Coordinate; */ public class SatResource extends AbstractPluginDataObjectResource - implements ImageProvider, Interrogatable { + implements ImageProvider, Interrogatable, IToolChangedListener { /** * String id to look for satellite-provided data values @@ -338,6 +340,7 @@ public class SatResource extends match.setLevels(Arrays.asList((Level) level)); match.setCreatingEntityNames(Arrays.asList(record.getCreatingEntity())); Unit unit = SatDataRetriever.getRecordUnit(record); + String lg = null; try { StyleRule sr = StyleManager.getInstance().getStyleRule( StyleManager.StyleType.IMAGERY, match); @@ -364,10 +367,10 @@ public class SatResource extends unit); sampleRange = preferences.getSamplePrefs(); - String lg = preferences.getLegend(); + lg = preferences.getLegend(); // test, so legend is not over written with empty string - if (lg != null && !lg.trim().isEmpty()) { - legend = lg; + if (lg != null && lg.trim().isEmpty()) { + lg = null; } } catch (StyleException e) { throw new VizException(e.getLocalizedMessage(), e); @@ -402,7 +405,11 @@ public class SatResource extends getCapability(ColorMapCapability.class).setColorMapParameters( colorMapParameters); - this.legend = getLegend(record); + if (lg != null) { + this.legend = lg; + } else { + this.legend = getLegend(record); + } } @Override @@ -648,4 +655,8 @@ public class SatResource extends return result; } + @Override + public void toolChanged() { + issueRefresh(); + } } From 7fd62ccf839b29fb193c503e4f519d01a466c781 Mon Sep 17 00:00:00 2001 From: Joshua Watson Date: Thu, 5 Mar 2015 11:55:07 -0500 Subject: [PATCH 5/5] VLab Issue #6761 - Removed non-functional IFPS menu items and renamed Eta to NAM for menu and display purposes in baseTDLSurface.xml. Changed stdWindDir to windDir in stdDesign.svg; fixes #6761 Change-Id: Ie07f461ae6c85054b233f9cfc68d229c80c9789f Former-commit-id: e0bcd4f251526348d91930953c6c447e423f03ce --- .../menus/local/baseTDLSurface.xml | 71 ++++++++++--------- .../plotModels/bufrmos/stdDesign.svg | 2 +- 2 files changed, 39 insertions(+), 34 deletions(-) diff --git a/cave/com.raytheon.uf.viz.d2d.ui.local/localization/menus/local/baseTDLSurface.xml b/cave/com.raytheon.uf.viz.d2d.ui.local/localization/menus/local/baseTDLSurface.xml index 84c955bc1a..7621ced789 100644 --- a/cave/com.raytheon.uf.viz.d2d.ui.local/localization/menus/local/baseTDLSurface.xml +++ b/cave/com.raytheon.uf.viz.d2d.ui.local/localization/menus/local/baseTDLSurface.xml @@ -20,10 +20,12 @@ --> + - + @@ -192,98 +194,101 @@ - + + + menuText="Station Plot" id="NAMMOSStationPlot" > - + + menuText="MaxT/MinT" id="NAMMOSMaxTMinTPlot" > - + + menuText="Ceil/Vis" id="NAMMOSCeilVisPlot"> - + - + + menuText="POP 12Hr" id="NAMMOSPop12HrPlot"> - + + menuText="POP 6Hr" id="NAMMOSPop6HrPlot"> - + + menuText="Tstorm 12Hr" id="NAMMOSTs12HrPlot"> - + + menuText="Tstorm 6Hr" id="NAMMOSTs6HrPlot"> - + + menuText="Svr Tstorm 12Hr" id="NAMMOSSts12HrPlot"> - + + menuText="Svr Tstorm 6Hr" id="NAMMOSSts6HrPlot"> - + + menuText="Cond Rain" id="NAMMOSCondRainPlot"> - + + menuText="Cond Freezing Precip" id="NAMMOSCondFPPlot"> - + + menuText="Cond Snow" id="NAMMOSCondSnowPlot"> - + + menuText="QPF 12Hr" id="NAMMOSQPF12HrPlot"> - + + menuText="QPF 6Hr" id="NAMMOSQPF6HrPlot"> - + + menuText="SnowFall 24hr" id="NAMMOSSnowFall24HrPlot"> - + diff --git a/cave/com.raytheon.viz.pointdata/localization/plotModels/bufrmos/stdDesign.svg b/cave/com.raytheon.viz.pointdata/localization/plotModels/bufrmos/stdDesign.svg index 35ada6db8f..e68cba6e50 100644 --- a/cave/com.raytheon.viz.pointdata/localization/plotModels/bufrmos/stdDesign.svg +++ b/cave/com.raytheon.viz.pointdata/localization/plotModels/bufrmos/stdDesign.svg @@ -64,7 +64,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" style="stroke: rgb(255,255,255);"> 0 M - + 0 arrow