From 382c7c4edd5da011fea8abd2d62bd209cc2794a5 Mon Sep 17 00:00:00 2001 From: Chip Gobs Date: Wed, 25 Jun 2014 15:46:12 -0400 Subject: [PATCH 01/23] VLab Issue #4015 - MPE - This is the MPEFieldgen LSATPRE Field generation fix. Change-Id: I950192bc25dd1be78cf77e58f18946c86ac38623 Former-commit-id: 83a5ed0e92d48a6497251637711faca39afc6978 [formerly a948c8cc9ffdd19c26cee8c547984aec114e4221] Former-commit-id: 0e64ccc33a1c45a8703fce56aaeba649e2521245 --- .../src/MPEFieldGen/TEXT/main_mpe_fieldgen.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nativeLib/rary.ohd.pproc/src/MPEFieldGen/TEXT/main_mpe_fieldgen.c b/nativeLib/rary.ohd.pproc/src/MPEFieldGen/TEXT/main_mpe_fieldgen.c index 9112c7c8e5..46e6a049fe 100644 --- a/nativeLib/rary.ohd.pproc/src/MPEFieldGen/TEXT/main_mpe_fieldgen.c +++ b/nativeLib/rary.ohd.pproc/src/MPEFieldGen/TEXT/main_mpe_fieldgen.c @@ -776,8 +776,11 @@ void main_mpe_fieldgen_for_calls_from_editor(int num_args, char ** args) break; case lsatpre : - ptrMPEParams->polarizationType = SinglePol ; - runLSatpre ( ptrRunDate, + sprintf( message , "STATUS: BEFORE calling MPEFieldGen_runLSatpre in main \n") ; + printMessage( message, logFile ); + + ptrMPEParams->polarizationType = SinglePol ; + MPEFieldGen_runLSatpre ( ptrRunDate, ptrGeoData, ptrMPEParams, gageSize, iug, ivg, zg, From 915eaba2ec9d66338444ee0d7f8dd4d58bd272f1 Mon Sep 17 00:00:00 2001 From: Chip Gobs Date: Thu, 26 Jun 2014 11:53:25 -0400 Subject: [PATCH 02/23] VLab Issue #4016 - HPE - Processor for DSA product. Fixes problem due to format change in DSA product. Change-Id: I4a5004d5a2678177918fdc83bd374329ed5e7ff8 Former-commit-id: 037f7fc71fd6d3c18e37bd5b6f9ab7b59b073d7b [formerly 6f8dd4fb1d7aa47fdf7eb1aa481aac837b8b201f] Former-commit-id: ed91c57e63dc9ff14faa2ebaf8cec4d3dee6f938 --- .../hydrodualpol/DSAProductProcessor.java | 41 +++++++++++++++---- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/ohd/gov.noaa.nws.ohd.edex.plugin.hydrodualpol/src/gov/noaa/nws/ohd/edex/plugin/hydrodualpol/DSAProductProcessor.java b/ohd/gov.noaa.nws.ohd.edex.plugin.hydrodualpol/src/gov/noaa/nws/ohd/edex/plugin/hydrodualpol/DSAProductProcessor.java index 7c313e79b4..e79ffe2f20 100644 --- a/ohd/gov.noaa.nws.ohd.edex.plugin.hydrodualpol/src/gov/noaa/nws/ohd/edex/plugin/hydrodualpol/DSAProductProcessor.java +++ b/ohd/gov.noaa.nws.ohd.edex.plugin.hydrodualpol/src/gov/noaa/nws/ohd/edex/plugin/hydrodualpol/DSAProductProcessor.java @@ -281,15 +281,37 @@ public class DSAProductProcessor { // parse string 1 //statusHandler.handle(Priority.INFO, "\n" + "orig string 1 = " + productText[0]); - String productText0 = productText[0].replace("ADAP(", ""); - //statusHandler.handle(Priority.INFO, "\n" + "new string 1 = " + productText0); - + + String productText0 = productText[0]; //"+" indicates that consecutive delimiters be treated as one - String [] valuesFromString1 = productText0.split("[ )]+"); - //for (int i = 0; i < valuesFromString1.length; i++) - //{ - // statusHandler.handle(Priority.INFO,valuesFromString1[i]); - //} + //String [] valuesFromString1 = productText0.split("[ )]+"); -- original parse + + String [] valuesFromString1 = new String [10]; + + // remove "ADAP(" and ")" from string leaving "36" as the first substring + valuesFromString1[0] = productText0.substring(0,8).replace("ADAP(", "").replace(")",""); + + /* parse out remaining substrings from first string + valuesFromString1[1] = productText0.substring(8,16); + valuesFromString1[2] = productText0.substring(16,24); + valuesFromString1[3] = productText0.substring(24,32); + valuesFromString1[4] = productText0.substring(32,40); + valuesFromString1[5] = productText0.substring(40,48); + valuesFromString1[6] = productText0.substring(48,56); + valuesFromString1[7] = productText0.substring(56,64); + valuesFromString1[8] = productText0.substring(64,72); + valuesFromString1[9] = productText0.substring(72,80); + */ + + for (int i = 1; i < 10; i++) + { + valuesFromString1[i] = productText0.substring((i*8),((i+1)*8)); + } + + for (int i = 0; i < valuesFromString1.length; i++) + { + statusHandler.handle(Priority.INFO,valuesFromString1[i]); + } // parse string 2 //statusHandler.handle(Priority.INFO, "\n" + "string 2 = " + productText[1]); @@ -334,8 +356,9 @@ public class DSAProductProcessor { private void processDSAAdaptParameters(String radid, String obstime, String [] stringArray1, String [] stringArray2, String [] stringArray3, String [] stringArray4) { + + //statusHandler.handle(Priority.INFO, " In function processDSAAdaptParameters"); /* - statusHandler.handle(Priority.INFO, " In function processDSAAdaptParameters"); for (int i = 0; i < stringArray1.length; i++) { statusHandler.handle(Priority.INFO,stringArray1[i]); From f731a2050e38fdeea7db724b90048617c4e9fffb Mon Sep 17 00:00:00 2001 From: Baoyu Yin Date: Thu, 7 Aug 2014 09:39:24 -0400 Subject: [PATCH 03/23] VLab Issue #4370 - AWIPS2_DR_16154 and AWIPS2_DR_17212; closes #4370 Change-Id: If5ae492896f702b1857a1abcd13df5f517015704 Former-commit-id: 00156b84ae2e09d3a0909f300f8d95936cec627e [formerly 1795f54a4a9ccdade1f8e3a1c4bfb04c859c24f5] Former-commit-id: 8228a5d2ce8f409f13c287407e6af87f978c3314 --- .../localization/bundles/AllRegionalWarnings.xml | 10 +++++----- .../localization/bundles/LocalCWAFloodWarnings.xml | 10 +++++----- .../bundles/LocalRegionalFloodWarnings.xml | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings.xml b/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings.xml index f318130191..e219202574 100644 --- a/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings.xml +++ b/cave/com.raytheon.viz.warnings/localization/bundles/AllRegionalWarnings.xml @@ -27,7 +27,7 @@ - + @@ -198,7 +198,7 @@ - + @@ -232,7 +232,7 @@ - + @@ -266,7 +266,7 @@ - + @@ -280,4 +280,4 @@ - \ No newline at end of file + diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/LocalCWAFloodWarnings.xml b/cave/com.raytheon.viz.warnings/localization/bundles/LocalCWAFloodWarnings.xml index 7ca50b789f..77d9e8baed 100644 --- a/cave/com.raytheon.viz.warnings/localization/bundles/LocalCWAFloodWarnings.xml +++ b/cave/com.raytheon.viz.warnings/localization/bundles/LocalCWAFloodWarnings.xml @@ -28,7 +28,7 @@ - + @@ -62,7 +62,7 @@ - + @@ -96,7 +96,7 @@ - + @@ -130,7 +130,7 @@ - + @@ -144,4 +144,4 @@ - \ No newline at end of file + diff --git a/cave/com.raytheon.viz.warnings/localization/bundles/LocalRegionalFloodWarnings.xml b/cave/com.raytheon.viz.warnings/localization/bundles/LocalRegionalFloodWarnings.xml index d7187dc417..2eb75bd840 100644 --- a/cave/com.raytheon.viz.warnings/localization/bundles/LocalRegionalFloodWarnings.xml +++ b/cave/com.raytheon.viz.warnings/localization/bundles/LocalRegionalFloodWarnings.xml @@ -27,7 +27,7 @@ - + @@ -61,7 +61,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -129,7 +129,7 @@ - + @@ -143,4 +143,4 @@ - \ No newline at end of file + From 02e926f56974a713be377c71be5eeeabeea09646 Mon Sep 17 00:00:00 2001 From: Baoyu Yin Date: Fri, 8 Aug 2014 14:55:59 -0400 Subject: [PATCH 04/23] VLab Issue #4396 - AWIPS2_DR_16265 minor typo in KXXX Menu; closes #4396 Change-Id: I44c1ad9968117233c16cb8082d07b9aa233e0d6d Former-commit-id: f355240287e7616a95cba4ebe9af7e17ea017c8b [formerly 35283455a8562c02e888d5d955f739fcb7adbf3f] Former-commit-id: dafff40283c357e8aed986d589f6bf3b4996870d --- .../localization/menus/radar/dualPol/baseRadarBestResZV.xml | 4 ++-- .../localization/menus/radar/klgx/baseRadarBestResZV.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cave/com.raytheon.viz.radar/localization/menus/radar/dualPol/baseRadarBestResZV.xml b/cave/com.raytheon.viz.radar/localization/menus/radar/dualPol/baseRadarBestResZV.xml index 8546d25234..1d89edb6b2 100644 --- a/cave/com.raytheon.viz.radar/localization/menus/radar/dualPol/baseRadarBestResZV.xml +++ b/cave/com.raytheon.viz.radar/localization/menus/radar/dualPol/baseRadarBestResZV.xml @@ -19,7 +19,7 @@ further_licensing_information. --> - - \ No newline at end of file + diff --git a/cave/com.raytheon.viz.radar/localization/menus/radar/klgx/baseRadarBestResZV.xml b/cave/com.raytheon.viz.radar/localization/menus/radar/klgx/baseRadarBestResZV.xml index 2605b6b893..2c38e21b10 100644 --- a/cave/com.raytheon.viz.radar/localization/menus/radar/klgx/baseRadarBestResZV.xml +++ b/cave/com.raytheon.viz.radar/localization/menus/radar/klgx/baseRadarBestResZV.xml @@ -19,7 +19,7 @@ further_licensing_information. --> - Date: Fri, 8 Aug 2014 15:18:25 -0400 Subject: [PATCH 05/23] =?UTF-8?q?VLab=20Issue=20#4395=20-=20AWIPS2=5FDR=5F?= =?UTF-8?q?=E2=80=8B17383=20Volume=20Browser=20missing=2050mb=20and=20100m?= =?UTF-8?q?b=20layers;=20closes=20#4395?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I1fff3834c00c2807f3b3f286f51ba4d5b6e65ca9 Former-commit-id: ab6421ed601f4e5bbf50dae459db6bf4e02c6ed6 [formerly 053ab9de9f5d9e6a881c8211efa02e5f659818ab] Former-commit-id: a48096697541fc31b3942c3bdeed8082d7282198 --- .../menus/xml/planesMenusPlanView.xml | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/planesMenusPlanView.xml b/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/planesMenusPlanView.xml index bef0192877..0f841e6b89 100644 --- a/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/planesMenusPlanView.xml +++ b/cave/com.raytheon.viz.volumebrowser/localization/menus/xml/planesMenusPlanView.xml @@ -71,7 +71,38 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2220,8 +2220,8 @@ J/kg - 1 - 450 + -1000 + -1 Grid/gridded data From 8e88237eab4796b1f37c6e98d8998b504203f215 Mon Sep 17 00:00:00 2001 From: Baoyu Yin Date: Thu, 28 Aug 2014 09:50:26 -0400 Subject: [PATCH 08/23] VLab Issue #4554 - AWIPS2_DR_17469 Radar Digital Vertical Integrated Liquid wrongly capped at value of >60 kg*m^-2; fixes #4554 Change-Id: I78b45576bd2be9e3baa1f85da5a124de60842e3b Former-commit-id: ebc018c7f64e6260dd24a19766f41b1e932d74a6 [formerly 8d3b878a9c32b77e7bb19b087e7da8de492a4481] Former-commit-id: 2d3589e7afba2fd0a6a9d5645d1dc72297407c6a --- .../common_static/base/styleRules/radarImageryStyleRules.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.radar/utility/common_static/base/styleRules/radarImageryStyleRules.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.radar/utility/common_static/base/styleRules/radarImageryStyleRules.xml index 38cc86c1b0..9a4ac18764 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.radar/utility/common_static/base/styleRules/radarImageryStyleRules.xml +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.radar/utility/common_static/base/styleRules/radarImageryStyleRules.xml @@ -416,6 +416,7 @@ + @@ -672,4 +673,4 @@ - \ No newline at end of file + From cbc7d2813fff630eba8967086f0610738cef6c9e Mon Sep 17 00:00:00 2001 From: Baoyu Yin Date: Fri, 29 Aug 2014 10:17:54 -0400 Subject: [PATCH 09/23] VLab Issue #4563 - AWIPS2_DR_17371 Changes made in MPE editor not available in D-2D; fixes #4563 Change-Id: I5f5c55486f209b89ecf276bb38d3d42c7f60d1d1 Former-commit-id: bfc550b378d565ed9ef1c5354d9c5cef01802c0f [formerly 5189ae1c3ce12320045c431d9552036ea9272cef] Former-commit-id: bf5bb1bacf1543e518ff5c5cdb847c8424f70739 --- .../utility/edex_static/base/grib/models/gribModels_RFC-9.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/models/gribModels_RFC-9.xml b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/models/gribModels_RFC-9.xml index 5483816d9d..7510f72056 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/models/gribModels_RFC-9.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/models/gribModels_RFC-9.xml @@ -23,7 +23,7 @@ - MPE-Mosaic + MPE-Local
9
0 304 @@ -52,6 +52,7 @@
+ From 7f80279179c24bef34312a1cb2bb905c41e1ff92 Mon Sep 17 00:00:00 2001 From: Baoyu Yin Date: Thu, 4 Sep 2014 07:53:38 -0400 Subject: [PATCH 10/23] VLab Issue #4567 - AWIPS2_DR_16933: Text Script Editor Edit Menu Delete Line Option; fixes #4567 Change-Id: I10e1dbdd6352adcfa39ae8980230a95afdc8cec1 Former-commit-id: 309e1bc6847b5ebe1742fc6c622751a0a3e639db [formerly d9f69c85c6432a937f70c16053f45d5214ce5147] Former-commit-id: fd229c716dd6af4caa6e6cb6e4006e01638e7204 --- .../viz/texteditor/scripting/dialogs/ScriptEditorDialog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/scripting/dialogs/ScriptEditorDialog.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/scripting/dialogs/ScriptEditorDialog.java index 108728ff7d..e90674c9b6 100644 --- a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/scripting/dialogs/ScriptEditorDialog.java +++ b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/scripting/dialogs/ScriptEditorDialog.java @@ -553,7 +553,7 @@ public class ScriptEditorDialog extends CaveSWTDialog implements IScriptEditor { item.addSelectionListener(listener); item = new MenuItem(subMenu, SWT.PUSH); - item.setText("Line\tF7"); + item.setText("Line\tF8"); item.setAccelerator(SWT.F8); item.setData(EditMenuSelection.DEL_LINE); item.addSelectionListener(listener); From 5ad996e60ef5e0aacdf14a87a72ceefa824d0e07 Mon Sep 17 00:00:00 2001 From: Baoyu Yin Date: Thu, 4 Sep 2014 08:23:53 -0400 Subject: [PATCH 11/23] VLab Issue #4608 - AWIPS2_DR_16259 Minor Typo in Volume Menu of D2D 4-PanelFamilies ; fixes #4608 Change-Id: I73a3f5a441e33dffe3dc7f3962c3fceec930ce3a Former-commit-id: 73f7935f46c7b4e700a5b0644a464ae7c8d6c727 [formerly cb4e2e652ba3763725b8ec7e6d528748d2472a6b] Former-commit-id: 9e110936e81e917b7c3529995fbd4ca7011d4d2a --- .../localization/menus/volume/index.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/index.xml b/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/index.xml index f84d6c1b63..0f46a6300f 100644 --- a/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/index.xml +++ b/cave/com.raytheon.viz.volumebrowser/localization/menus/volume/index.xml @@ -35,7 +35,7 @@ - Date: Fri, 5 Sep 2014 10:21:32 -0400 Subject: [PATCH 12/23] VLab Issue #4609 - AWIPS2_DR_15762 Spelling error Upper Air Menu - Tallahassee ; fixes #4609 Change-Id: Iab5a67594a0fe20e5e7326e3f25ae426326f1ab3 Former-commit-id: d6e2e2168303e9a59cd0720cbfdd48001979e083 [formerly 5c311cc979052e214129f77150daad2cdfbd17fc] Former-commit-id: 15de59d02f332749a4d362de8d9cc4dc1b3a15d3 --- .../localization/menus/upperair/baseUSEastern.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cave/com.raytheon.uf.viz.d2d.ui.upperair/localization/menus/upperair/baseUSEastern.xml b/cave/com.raytheon.uf.viz.d2d.ui.upperair/localization/menus/upperair/baseUSEastern.xml index 5db3590ee1..c86d43ca8b 100644 --- a/cave/com.raytheon.uf.viz.d2d.ui.upperair/localization/menus/upperair/baseUSEastern.xml +++ b/cave/com.raytheon.uf.viz.d2d.ui.upperair/localization/menus/upperair/baseUSEastern.xml @@ -150,7 +150,7 @@
@@ -179,4 +179,4 @@ editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
-
\ No newline at end of file + From 0ac99fce21cfb630699457877d961870ca6b8ad6 Mon Sep 17 00:00:00 2001 From: Baoyu Yin Date: Fri, 5 Sep 2014 10:37:27 -0400 Subject: [PATCH 13/23] VLab Issue #4613 - AWIPS2_DR_14755 Thin Client synchronize misspelled ; fixes #4613 Change-Id: I5cf6380bd73f500298d6b1644238abc4d51efdef Former-commit-id: ebe548d86050da4e5e87289bf71127fab817f48e [formerly b5ec42cbbc7c064098075e347b90e4f22045f66d] Former-commit-id: dc58405bf6dc4519a2043db83d1a82a1353cb1fa --- .../viz/thinclient/cave/preferences/SyncLocalizationEditor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cave/com.raytheon.uf.viz.thinclient.cave/src/com/raytheon/uf/viz/thinclient/cave/preferences/SyncLocalizationEditor.java b/cave/com.raytheon.uf.viz.thinclient.cave/src/com/raytheon/uf/viz/thinclient/cave/preferences/SyncLocalizationEditor.java index 17323ab095..4863c160a9 100644 --- a/cave/com.raytheon.uf.viz.thinclient.cave/src/com/raytheon/uf/viz/thinclient/cave/preferences/SyncLocalizationEditor.java +++ b/cave/com.raytheon.uf.viz.thinclient.cave/src/com/raytheon/uf/viz/thinclient/cave/preferences/SyncLocalizationEditor.java @@ -178,7 +178,7 @@ public class SyncLocalizationEditor extends BooleanFieldEditor { MessageBox msgBox = new MessageBox(button.getShell(), SWT.YES | SWT.NO | SWT.CANCEL | SWT.ICON_WARNING); msgBox.setText("Do you want to synchronize?"); - msgBox.setMessage("If there are files missing locally, your CAVE might not work correctly. It is recommended that you synchronize all localization files with edex before enabling this option. Synchronizing will take lots of time and bandwidth.\n\n Would you like to syncronize now?"); + msgBox.setMessage("If there are files missing locally, your CAVE might not work correctly. It is recommended that you synchronize all localization files with edex before enabling this option. Synchronizing will take lots of time and bandwidth.\n\n Would you like to synchronize now?"); int result = msgBox.open(); if (result == SWT.CANCEL) { getChangeControl(button.getParent()).setSelection(false); From db7c16b305297b749bf9e4eda2c9c9684a0ab7a2 Mon Sep 17 00:00:00 2001 From: Baoyu Yin Date: Fri, 5 Sep 2014 11:18:21 -0400 Subject: [PATCH 14/23] VLab Issue #4623 - AWIPS2_DR_17363 LAPS freezing level height not computed prevents display of hail product; fixes #4623 Change-Id: I3b608e9024dbe70e08a549b5469c2fb09e448a9a Former-commit-id: 70082169768d21bd6317d3781b6e112c62a57116 [formerly 61838d538f73adb6279ba55d5fe3c5b02d3a28f4] Former-commit-id: 3e39cd9bb5780f6e37897e8f293684ef54b3fe67 --- .../localization/volumebrowser/LevelMappingFile.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/cave/com.raytheon.viz.volumebrowser/localization/volumebrowser/LevelMappingFile.xml b/cave/com.raytheon.viz.volumebrowser/localization/volumebrowser/LevelMappingFile.xml index 90686e481f..8008a1ecfd 100644 --- a/cave/com.raytheon.viz.volumebrowser/localization/volumebrowser/LevelMappingFile.xml +++ b/cave/com.raytheon.viz.volumebrowser/localization/volumebrowser/LevelMappingFile.xml @@ -1206,6 +1206,7 @@ + From 11f1e39b07e1158a2de13332e8b14c59fccb86cf Mon Sep 17 00:00:00 2001 From: Baoyu Yin Date: Fri, 5 Sep 2014 13:35:07 -0400 Subject: [PATCH 15/23] VLab Issue #4624 - AWIPS2_DR_17545 Volume Browser MMP units are wrong ; fixes #4624 Change-Id: I407cf142f9adfc7601b14e12e33223cf344b596c Former-commit-id: 7f317934ac8a54272479840f5f73e0ef663f201b [formerly 0eb76fb764113196683d8ae771d7cf37ccc86495] Former-commit-id: 2c4a9fbe7c353f27b1f8399f2f9295802cadbb6b --- .../common_static/base/derivedParameters/definitions/mmp.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edexOsgi/com.raytheon.uf.common.derivparam/utility/common_static/base/derivedParameters/definitions/mmp.xml b/edexOsgi/com.raytheon.uf.common.derivparam/utility/common_static/base/derivedParameters/definitions/mmp.xml index 867c16123f..761da0c416 100644 --- a/edexOsgi/com.raytheon.uf.common.derivparam/utility/common_static/base/derivedParameters/definitions/mmp.xml +++ b/edexOsgi/com.raytheon.uf.common.derivparam/utility/common_static/base/derivedParameters/definitions/mmp.xml @@ -82,7 +82,7 @@ - + From da10a7b4acb8099a80ffe11ae3321434ed10535e Mon Sep 17 00:00:00 2001 From: Chip Gobs Date: Mon, 8 Sep 2014 11:34:03 -0400 Subject: [PATCH 16/23] VLab Issue #4602 Fixes MPE Gage Table Data Reading problem introduced in a earlier 14.3.1 build, a.k.a Redmine O&M DR 16699 Change-Id: I12b879fb873f66d43d7f735165fa4f303c026174 Former-commit-id: 4911ac19179623ee947f2ea4ed11fb756bc434fb [formerly 4d87ebeef93e561a303566853fd2616316c568ca] Former-commit-id: fc8a7d48ca04d4fd3f968a11aa8ca662c6f26663 --- .../viz/mpe/ui/dialogs/gagetable/GageTableDataManager.java | 4 ++-- .../component-deploy.xml | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 ohd/gov.noaa.nws.ohd.edex.plugin.hydrodualpol/component-deploy.xml diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/gagetable/GageTableDataManager.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/gagetable/GageTableDataManager.java index 4ab07af25f..8294c4a111 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/gagetable/GageTableDataManager.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/gagetable/GageTableDataManager.java @@ -62,6 +62,7 @@ import com.vividsolutions.jts.geom.Coordinate; * May 20, 2013 15962 lbousaidi Added a new routine getRadarIdsTrue() * for Radar Sites dialog. * Mar 05, 2014 17114 lbousaidi display PC data in gage table. + * Sep 04, 2014 16699 cgobs Fixed 14.3.1 issue with reading MPE field data. * * * @author mpduff @@ -1136,10 +1137,9 @@ public class GageTableDataManager { double returnValue = -999.0; try { - String cv_use = dataType.getCv_use(); String dirname = appsDefaults.getToken(dataType.getDirToken()); String fname = FileUtil.join(dirname, - cv_use + sdf.format(displayManager.getCurrentEditDate()) + "z"); + dataType.getFileNamePrefix() + sdf.format(displayManager.getCurrentEditDate()) + "z"); Rectangle extent = dataManager.getHRAPExtent(); diff --git a/ohd/gov.noaa.nws.ohd.edex.plugin.hydrodualpol/component-deploy.xml b/ohd/gov.noaa.nws.ohd.edex.plugin.hydrodualpol/component-deploy.xml deleted file mode 100644 index 221864b6a9..0000000000 --- a/ohd/gov.noaa.nws.ohd.edex.plugin.hydrodualpol/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - From 69450976c8fec412af714c03fa12e15864a4a8a2 Mon Sep 17 00:00:00 2001 From: Chip Gobs Date: Mon, 8 Sep 2014 12:06:45 -0400 Subject: [PATCH 17/23] VLab Issue #4611 Fixes O&M Redmine DR 14448 - which concerns displaying changes to a color set just after the changes are saved, instead of after the ColorScaleManager is closed. Change-Id: I0156612302853141392c263eab8b54a16c3be7a3 Former-commit-id: 25e4ed8d511a1ac008c3ae8c696e35d163db0c13 [formerly 44f6bf08a72b5450d6d0db40ff49dd5123cf811c] Former-commit-id: 8c6e70ccabdce61932e2c48e15d2cc22e40e9202 --- .../colorscalemgr/ColorScaleMgrAction.java | 21 ++++++++- .../colorscalemgr/ColorScaleMgrDlg.java | 27 ++++++++++- .../ui/actions/MPEColorScaleMgrAction.java | 47 ++++++++++++++++++- 3 files changed, 91 insertions(+), 4 deletions(-) diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/colorscalemgr/ColorScaleMgrAction.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/colorscalemgr/ColorScaleMgrAction.java index a03c7eabaa..97f278de2c 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/colorscalemgr/ColorScaleMgrAction.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/colorscalemgr/ColorScaleMgrAction.java @@ -49,7 +49,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback; * 6/27/06 lvenable Initial Creation. * 04/07/2010 4671 mpduff Have the map update upon closure of the dialog. * 07/02/2013 2088 rferrel Changes for non-blocking ColorScaleMgrDlg. - * + * 9/4/2014 14448 cgobs Make HydroView redisplay after save of color settings in ColorScaleMgr * * * @author lvenable @@ -97,6 +97,25 @@ public class ColorScaleMgrAction extends AbstractHandler { } } }); + + colorScaleDlg.setSaveCallback(new ColorScaleMgrDlg.ISaveCallback() { + + public void execute() { + + HydroDisplayManager displayManager = HydroDisplayManager + .getInstance(); + + boolean dataChanged = true; + displayManager.setColorChanged(dataChanged); + + // redraw the main display + displayManager.setDataChanged(dataChanged); + StationDisplay sd = StationDisplay.getInstance(); + sd.redraw(); + + } + }); + colorScaleDlg.open(); } else { colorScaleDlg.bringToTop(); diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/colorscalemgr/ColorScaleMgrDlg.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/colorscalemgr/ColorScaleMgrDlg.java index 7f5b029bfe..ae067bfac6 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/colorscalemgr/ColorScaleMgrDlg.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/colorscalemgr/ColorScaleMgrDlg.java @@ -73,7 +73,8 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback; * disappearing after save * 01 Jul 2013 2088 rferrel Changes for non-blocking dialogs. * 06 Sep 2013 #2342 lvenable Fixed color memory leaks and a null point exception. - * + * 04 Sep 2014 14448 cgobs Make MPE redisplay after save of color settings in ColorScaleMgr + * * * @author lvenable * @version 1.0 @@ -96,6 +97,19 @@ public class ColorScaleMgrDlg extends CaveSWTDialog { */ private ColorChooserDlg colorDlg; + /** + * callback to be execute upon saving of a color set + * generally used to update the display with the newly-saved color set + */ + private ISaveCallback saveCallback; + + public interface ISaveCallback { + + public void execute(); + + } + + /** * User's name. */ @@ -915,6 +929,7 @@ public class ColorScaleMgrDlg extends CaveSWTDialog { } }; + /** * Update the color label on the display * @@ -2016,9 +2031,17 @@ public class ColorScaleMgrDlg extends CaveSWTDialog { updateDurationCombo(); updateColorValueLabelBar(); - + + if (this.saveCallback != null) { + this.saveCallback.execute(); + } setReturnValue(true); } + + public void setSaveCallback(ISaveCallback iSaveCallback) + { + this.saveCallback = iSaveCallback; + } /** * dataType has changed, update dialog diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/MPEColorScaleMgrAction.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/MPEColorScaleMgrAction.java index 7cd3e6761a..ebc51cb0cd 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/MPEColorScaleMgrAction.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/MPEColorScaleMgrAction.java @@ -48,6 +48,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback; * Jan 16, 2014 #2691 lvenable Fixed null pointer exception that occurs when closing * the MPE perspective while the ColorScaleMgrDlg is * visible. + * 04 Sep 2014 14448 cgobs Make MPE redisplay after save of color settings in ColorScaleMgr * * * @author mschenke @@ -103,10 +104,54 @@ public class MPEColorScaleMgrAction extends AbstractHandler { DisplayFieldData dt = MPEDisplayManager.getCurrent() .getDisplayFieldType(); - MPEDisplayManager.getCurrent().displayFieldData(dt); + int displayedAccumHrs = mdm.getDisplayedAccumHrs(); + mdm.displayFieldData(dt,displayedAccumHrs ); } } }); + + + //anonymous class declaration for the purposes of a callback execute upon save to database + colorScaleDlg.setSaveCallback(new ColorScaleMgrDlg.ISaveCallback() { + + public void execute() { + + MPEDisplayManager mdm = MPEDisplayManager.getCurrent(); + + // If the MPE Display Manager is null then return as no + // action is needed. + if (mdm == null) { + return; + } + + + + MPEFieldResource displayedFieldResource = mdm + .getDisplayedFieldResource(); + + if (displayedFieldResource != null) { + MPEFieldResourceData resourceData = displayedFieldResource + .getResourceData(); + displayedFieldResource + .getCapability(ColorMapCapability.class) + .setColorMapParameters( + MPEDisplayManager.createColorMap( + resourceData.getCvUseString(), + resourceData + .getDurationInHours(), + resourceData.getDataUnits(), + resourceData.getDisplayUnits())); + DisplayFieldData dt = MPEDisplayManager.getCurrent() + .getDisplayFieldType(); + + int displayedAccumHrs = mdm.getDisplayedAccumHrs(); + + + mdm.displayFieldData(dt, displayedAccumHrs); + } + } + }); + colorScaleDlg.open(); } else { colorScaleDlg.bringToTop(); From 3c350e52d28261471e5727b8866357674c3b52d7 Mon Sep 17 00:00:00 2001 From: Chip Gobs Date: Mon, 8 Sep 2014 12:06:45 -0400 Subject: [PATCH 18/23] VLab Issue #4611 Fixes O&M Redmine DR 14448 - which concerns displaying changes to a color set just after the changes are saved, instead of redisplaying after the ColorScaleManager is closed. Change-Id: I0156612302853141392c263eab8b54a16c3be7a3 Former-commit-id: 31d32a2e8263200e3998d6d98f4c21be37402f9d [formerly 6fe0cf5e013896af2e3380a9f93168e8fa66068b] Former-commit-id: 5573a077bf22b70267cd6255e15c51b137bd9cb1 --- .../colorscalemgr/ColorScaleMgrAction.java | 21 ++++++++- .../colorscalemgr/ColorScaleMgrDlg.java | 27 ++++++++++- .../ui/actions/MPEColorScaleMgrAction.java | 47 ++++++++++++++++++- 3 files changed, 91 insertions(+), 4 deletions(-) diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/colorscalemgr/ColorScaleMgrAction.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/colorscalemgr/ColorScaleMgrAction.java index a03c7eabaa..97f278de2c 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/colorscalemgr/ColorScaleMgrAction.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/colorscalemgr/ColorScaleMgrAction.java @@ -49,7 +49,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback; * 6/27/06 lvenable Initial Creation. * 04/07/2010 4671 mpduff Have the map update upon closure of the dialog. * 07/02/2013 2088 rferrel Changes for non-blocking ColorScaleMgrDlg. - * + * 9/4/2014 14448 cgobs Make HydroView redisplay after save of color settings in ColorScaleMgr * * * @author lvenable @@ -97,6 +97,25 @@ public class ColorScaleMgrAction extends AbstractHandler { } } }); + + colorScaleDlg.setSaveCallback(new ColorScaleMgrDlg.ISaveCallback() { + + public void execute() { + + HydroDisplayManager displayManager = HydroDisplayManager + .getInstance(); + + boolean dataChanged = true; + displayManager.setColorChanged(dataChanged); + + // redraw the main display + displayManager.setDataChanged(dataChanged); + StationDisplay sd = StationDisplay.getInstance(); + sd.redraw(); + + } + }); + colorScaleDlg.open(); } else { colorScaleDlg.bringToTop(); diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/colorscalemgr/ColorScaleMgrDlg.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/colorscalemgr/ColorScaleMgrDlg.java index 7f5b029bfe..ae067bfac6 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/colorscalemgr/ColorScaleMgrDlg.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/colorscalemgr/ColorScaleMgrDlg.java @@ -73,7 +73,8 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback; * disappearing after save * 01 Jul 2013 2088 rferrel Changes for non-blocking dialogs. * 06 Sep 2013 #2342 lvenable Fixed color memory leaks and a null point exception. - * + * 04 Sep 2014 14448 cgobs Make MPE redisplay after save of color settings in ColorScaleMgr + * * * @author lvenable * @version 1.0 @@ -96,6 +97,19 @@ public class ColorScaleMgrDlg extends CaveSWTDialog { */ private ColorChooserDlg colorDlg; + /** + * callback to be execute upon saving of a color set + * generally used to update the display with the newly-saved color set + */ + private ISaveCallback saveCallback; + + public interface ISaveCallback { + + public void execute(); + + } + + /** * User's name. */ @@ -915,6 +929,7 @@ public class ColorScaleMgrDlg extends CaveSWTDialog { } }; + /** * Update the color label on the display * @@ -2016,9 +2031,17 @@ public class ColorScaleMgrDlg extends CaveSWTDialog { updateDurationCombo(); updateColorValueLabelBar(); - + + if (this.saveCallback != null) { + this.saveCallback.execute(); + } setReturnValue(true); } + + public void setSaveCallback(ISaveCallback iSaveCallback) + { + this.saveCallback = iSaveCallback; + } /** * dataType has changed, update dialog diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/MPEColorScaleMgrAction.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/MPEColorScaleMgrAction.java index 7cd3e6761a..ebc51cb0cd 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/MPEColorScaleMgrAction.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/MPEColorScaleMgrAction.java @@ -48,6 +48,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback; * Jan 16, 2014 #2691 lvenable Fixed null pointer exception that occurs when closing * the MPE perspective while the ColorScaleMgrDlg is * visible. + * 04 Sep 2014 14448 cgobs Make MPE redisplay after save of color settings in ColorScaleMgr * * * @author mschenke @@ -103,10 +104,54 @@ public class MPEColorScaleMgrAction extends AbstractHandler { DisplayFieldData dt = MPEDisplayManager.getCurrent() .getDisplayFieldType(); - MPEDisplayManager.getCurrent().displayFieldData(dt); + int displayedAccumHrs = mdm.getDisplayedAccumHrs(); + mdm.displayFieldData(dt,displayedAccumHrs ); } } }); + + + //anonymous class declaration for the purposes of a callback execute upon save to database + colorScaleDlg.setSaveCallback(new ColorScaleMgrDlg.ISaveCallback() { + + public void execute() { + + MPEDisplayManager mdm = MPEDisplayManager.getCurrent(); + + // If the MPE Display Manager is null then return as no + // action is needed. + if (mdm == null) { + return; + } + + + + MPEFieldResource displayedFieldResource = mdm + .getDisplayedFieldResource(); + + if (displayedFieldResource != null) { + MPEFieldResourceData resourceData = displayedFieldResource + .getResourceData(); + displayedFieldResource + .getCapability(ColorMapCapability.class) + .setColorMapParameters( + MPEDisplayManager.createColorMap( + resourceData.getCvUseString(), + resourceData + .getDurationInHours(), + resourceData.getDataUnits(), + resourceData.getDisplayUnits())); + DisplayFieldData dt = MPEDisplayManager.getCurrent() + .getDisplayFieldType(); + + int displayedAccumHrs = mdm.getDisplayedAccumHrs(); + + + mdm.displayFieldData(dt, displayedAccumHrs); + } + } + }); + colorScaleDlg.open(); } else { colorScaleDlg.bringToTop(); From a06a4667a3e200610b8528306a557ad75ceebdf4 Mon Sep 17 00:00:00 2001 From: Chip Gobs Date: Mon, 8 Sep 2014 12:37:20 -0400 Subject: [PATCH 19/23] VLab Issue #4612 Fix for Redmine O&M DR 283 concerning the faulty ability of a user to select filtered out stations when performing quality code operations in MPE in GroupEdit Mode. Change-Id: Ib8da13cfa2085aeb6efba96e7a1789912534bddd Former-commit-id: 874db74c548294a589c7e291e49544e1462634cd [formerly 7df28e4d5c1d8a03db5500939b0af2905d11a4aa] Former-commit-id: f7624b0609cff92967da95c7e187e90a0c5bd095 --- .../viz/mpe/ui/actions/GroupEditPrecipStns.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/GroupEditPrecipStns.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/GroupEditPrecipStns.java index 949eebae3a..98b0bc8d00 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/GroupEditPrecipStns.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/GroupEditPrecipStns.java @@ -36,7 +36,7 @@ import com.vividsolutions.jts.geom.Coordinate; * ------------ ---------- ----------- -------------------------- * Jun 17, 2009 snaples Initial creation * May 06, 2011 #8994 jpiatt Added set precipitation value as zero - * + * Sep 04, 2014 283 cgobs Fixed possible selection of filtered-out gages * * * @author snaples @@ -80,11 +80,25 @@ public class GroupEditPrecipStns { continue; } + //precip filter if (DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[i].frain[time_pos].data < QcPrecipOptionsDialog .getPointFilterValue()) { continue; } + //reverse precip filter + if (DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[i].frain[time_pos].data > QcPrecipOptionsDialog + .getPointFilterReverseValue()) { + continue; + } + + //elevation filter + if (DailyQcUtils.precip_stations.get(i).elev < DailyQcUtils.elevation_filter_value) + { + continue; + } + + /* Retrieve the latitude and longitude of this station. */ lat = DailyQcUtils.precip_stations.get(i).lat; lon = DailyQcUtils.precip_stations.get(i).lon; From 478c9db8d3cc2f502c5e35ad486e38dff7d90dee Mon Sep 17 00:00:00 2001 From: Jordan Gerth Date: Mon, 15 Sep 2014 16:30:22 -0500 Subject: [PATCH 20/23] VLab Issue #4723 - Ingest LambertConformal projection with two standard parallels using RegionalSat; fixes #4723 Change-Id: I20b309f4e994259a54e6bdb2276bc09a6b60a885 Former-commit-id: 0b425f94eb66a43e42e460c9b2f3eb14ed68cd0d [formerly baf75c177b595dcfb545436586c31d28080b8281] Former-commit-id: d6eb692733f1d38198d38d608d1570a0a7ad06e5 --- .../util/satellite/SatSpatialFactory.java | 56 +++++++++++++------ .../decoder/RegionalSatDecoder.java | 50 ++++++++++------- 2 files changed, 70 insertions(+), 36 deletions(-) diff --git a/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/util/satellite/SatSpatialFactory.java b/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/util/satellite/SatSpatialFactory.java index 525fff7d4e..d57a4f2c48 100644 --- a/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/util/satellite/SatSpatialFactory.java +++ b/edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/util/satellite/SatSpatialFactory.java @@ -43,7 +43,7 @@ import com.vividsolutions.jts.geom.Envelope; * Sep 30, 2013 2333 mschenke Refactored to store points in crs space * Apr 15, 2014 3017 bsteffen Add new getCoverage methods to support * either one corner + dx/dy or two corners. - * + * Sep 15, 2014 DR 17303 jgerth Support for second standard latitude * */ public class SatSpatialFactory { @@ -141,18 +141,20 @@ public class SatSpatialFactory { * @param ny * the number of rows of data. * @param lov - * the longitude orientatition, used by + * the longitude orientation, used by * {@link #PROJ_CYLIN_EQUIDISTANT}, {@link #PROJ_LAMBERT}, * {@link #PROJ_POLAR}. * @param latin * the latitude at which the projection is tangent to the earths * surface, used by {@link #PROJ_CYLIN_EQUIDISTANT}, * {@link #PROJ_LAMBERT}, {@link #PROJ_MERCATOR}. + * @param latin2 + * the second standard latitude, used by {@link #PROJ_LAMBERT}. * @param la1 * the latitude of a corner of the grid, if dy is positive this * is an upper corner. * @param lo1 - * the longitide of a corner of the grid, if dx is positive this + * the longitude of a corner of the grid, if dx is positive this * is a left corner * @param dx * the distance between columns measured in CRS meters. @@ -163,10 +165,10 @@ public class SatSpatialFactory { * @throws DecoderException */ public SatMapCoverage getCoverageSingleCorner(int crsType, int nx, int ny, - double lov, double latin, double la1, double lo1, double dx, + double lov, double latin, double latin2, double la1, double lo1, double dx, double dy) throws DecoderException { try { - ProjectedCRS crs = createCRS(crsType, lov, latin, 0.0); + ProjectedCRS crs = createCRS(crsType, lov, latin, latin2, 0.0); DirectPosition2D corner = new DirectPosition2D(lo1, la1); MathTransform fromLatLon = MapUtil.getTransformFromLatLon(crs); fromLatLon.transform(corner, corner); @@ -193,10 +195,19 @@ public class SatSpatialFactory { } } + /** + * @see {@link #getCoverageSingleCorner(int, int, int, double, double, double, double, double, double, double)} + */ + public SatMapCoverage getCoverageSingleCorner(int crsType, int nx, int ny, + double lov, double latin, double la1, double lo1, double dx, + double dy) throws DecoderException { + return getCoverageSingleCorner(crsType, nx, ny, lov, latin, latin, la1, lo1, dx, dy); + } + /** * * Create a {@link SatMapCoverage} with an area defined by two corners. The - * two corners must be opposite(diagnol) from eachother. They caan be either + * two corners must be opposite (diagonal) from each other. They can be either * the upper left and lower right or the upper right and lower left corners. * * @param crsType @@ -204,36 +215,38 @@ public class SatSpatialFactory { * {@link #PROJ_CYLIN_EQUIDISTANT}, {@link #PROJ_LAMBERT}, * {@link #PROJ_MERCATOR}, {@link #PROJ_POLAR}. * @param lov - * the longitude orientatition, used by + * the longitude orientation, used by * {@link #PROJ_CYLIN_EQUIDISTANT}, {@link #PROJ_LAMBERT}, * {@link #PROJ_POLAR}. * @param latin * the latitude at which the projection is tangent to the earths * surface, used by {@link #PROJ_CYLIN_EQUIDISTANT}, * {@link #PROJ_LAMBERT}, {@link #PROJ_MERCATOR}. + * @param latin2 + * the second standard latitude, used by {@link #PROJ_LAMBERT}. * @param la1 * the latitude of a corner of the grid. * @param lo1 - * the longitide of a corner of the grid. + * the longitude of a corner of the grid. * @param la2 * the latitude of a corner of the grid., should be opposite * corner from la1. * @param lo2 - * the longitide of a corner of the grid, should be opposite + * the longitude of a corner of the grid, should be opposite * corner from lo1 * @return a {@link SatMapCoverage} matching these parameters that has been * loaded from or persisted to the database. * @throws DecoderException */ public SatMapCoverage getCoverageTwoCorners(int crsType, int nx, int ny, - double lov, double latin, double la1, double lo1, double la2, + double lov, double latin, double latin2, double la1, double lo1, double la2, double lo2) throws DecoderException { try { double cm = 0.0; if ((lo1 > 0.0) && (lo2 < 0.0)) { cm = 180.0; } - ProjectedCRS crs = createCRS(crsType, lov, latin, cm); + ProjectedCRS crs = createCRS(crsType, lov, latin, latin2, cm); DirectPosition2D corner1 = new DirectPosition2D(lo1, la1); DirectPosition2D corner2 = new DirectPosition2D(lo2, la2); MathTransform fromLatLon = MapUtil.getTransformFromLatLon(crs); @@ -262,6 +275,15 @@ public class SatSpatialFactory { } } + /** + * @see {@link #getCoverageTwoCorners(int, int, int, double, double, double, double, double, double, double)} + */ + public SatMapCoverage getCoverageTwoCorners(int crsType, int nx, int ny, + double lov, double latin, double la1, double lo1, double la2, + double lo2) throws DecoderException { + return getCoverageTwoCorners(crsType, nx, ny, lov, latin, latin, la1, lo1, la2, lo2); + } + /** Load or persist a {@link SatMapCoverage} */ private synchronized SatMapCoverage checkPersisted( SatMapCoverage mapCoverage) { @@ -294,25 +316,27 @@ public class SatSpatialFactory { * {@link #PROJ_CYLIN_EQUIDISTANT}, {@link #PROJ_LAMBERT}, * {@link #PROJ_MERCATOR}, {@link #PROJ_POLAR}. * @param lov * @param lov - * the longitude orientatition, used by + * the longitude orientation, used by * {@link #PROJ_CYLIN_EQUIDISTANT}, {@link #PROJ_LAMBERT}, * {@link #PROJ_POLAR}. * @param latin * the latitude at which the projection is tangent to the earths * surface, used by {@link #PROJ_CYLIN_EQUIDISTANT}, * {@link #PROJ_LAMBERT}, {@link #PROJ_MERCATOR}. + * @param latin2 + * the second standard latitude, used by {@link #PROJ_LAMBERT}. * @param cm * the central meridian of the projection, only used by * {@link #PROJ_MERCATOR}. * @return */ private static ProjectedCRS createCRS(int crsType, double lov, - double latin, double cm) { + double latin, double latin2, double cm) { switch (crsType) { case PROJ_MERCATOR: return createMercatorCrs(latin, cm); case PROJ_LAMBERT: - return createLambertCrs(latin, lov); + return createLambertCrs(latin, latin2, lov); case PROJ_CYLIN_EQUIDISTANT: return createEqCylCrs(latin, lov); default: @@ -325,9 +349,9 @@ public class SatSpatialFactory { MapUtil.AWIPS_EARTH_RADIUS, latin, cm); } - private static ProjectedCRS createLambertCrs(double latin, double lov) { + private static ProjectedCRS createLambertCrs(double latin, double latin2, double lov) { return MapUtil.constructLambertConformal(MapUtil.AWIPS_EARTH_RADIUS, - MapUtil.AWIPS_EARTH_RADIUS, latin, latin, lov); + MapUtil.AWIPS_EARTH_RADIUS, latin, latin2, lov); } private static ProjectedCRS createEqCylCrs(double latin, double lov) { diff --git a/ost/gov.noaa.nws.ost.edex.plugin.regionalsat/src/gov/noaa/nws/ost/edex/plugin/regionalsat/decoder/RegionalSatDecoder.java b/ost/gov.noaa.nws.ost.edex.plugin.regionalsat/src/gov/noaa/nws/ost/edex/plugin/regionalsat/decoder/RegionalSatDecoder.java index 803c1be345..5e8fc10905 100644 --- a/ost/gov.noaa.nws.ost.edex.plugin.regionalsat/src/gov/noaa/nws/ost/edex/plugin/regionalsat/decoder/RegionalSatDecoder.java +++ b/ost/gov.noaa.nws.ost.edex.plugin.regionalsat/src/gov/noaa/nws/ost/edex/plugin/regionalsat/decoder/RegionalSatDecoder.java @@ -61,6 +61,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; * IDataRecord required by the SatelliteDao * Aug 30, 2013 2298 rjpeter Make getPluginName abstract * Apr 15, 2014 3017 bsteffen Call new methods in SatSpatialFactory + * Sep 11, 2014 DR 17303 jgerth Support for second standard latitude * * * @author tk @@ -116,26 +117,26 @@ public class RegionalSatDecoder extends AbstractDecoder { netCdfFile = NetcdfFile.openInMemory(filename, data); // set the source; Alaska Region - if (source == null) { - source = "Source"; // use to look up source value; default of - // Source + String gaSourceStr = "Unknown"; + Attribute gaSource = netCdfFile.findGlobalAttribute("source"); + if (gaSource != null) { + gaSourceStr = gaSource.getStringValue().trim(); } - record.setSource(getSource(source)); // lookup source value + record.setSource(getSource(gaSourceStr).replace("/", " ")); // lookup source value // set the creating entity Attribute satName = netCdfFile.findGlobalAttribute("satelliteName"); - String entity = null; // "HRPT"; "GOESR-PG"; "Blended2"; if (satName != null) { - entity = satName.getStringValue(); + entity = satName.getStringValue().trim(); } if (entity != null) { String parsed = getCreatingEntity(entity); if ((parsed != null) && (parsed.length() > 0)) { - record.setCreatingEntity(parsed); + record.setCreatingEntity(parsed.replace("/", " ")); } else { - record.setCreatingEntity(entity); + record.setCreatingEntity(entity.replace("/", " ")); } } else { record.setCreatingEntity("Unknown"); @@ -156,9 +157,9 @@ public class RegionalSatDecoder extends AbstractDecoder { pev = getPhysicalElement(entity, channel); String element = pev.name; if (pev.name != null) { - record.setPhysicalElement(element); + record.setPhysicalElement(element.replace("/", " ")); } else { - record.setPhysicalElement(channel); + record.setPhysicalElement(channel.replace("/", " ")); } } else { record.setPhysicalElement("Imager Visible"); @@ -181,10 +182,10 @@ public class RegionalSatDecoder extends AbstractDecoder { // read the valid time in seconds and store the time in milliseconds long time = netCdfFile.findVariable("validTime").readScalarLong(); // time - // in - // seconds + // in + // seconds calendar.setTimeInMillis(time * 1000); // need to convert seconds to - // milliseconds + // milliseconds /* * Date date = new Date(); // used for setting the test data time @@ -199,9 +200,10 @@ public class RegionalSatDecoder extends AbstractDecoder { .getNumericValue().floatValue(); int mapProjection = SatSpatialFactory.PROJ_POLAR; // STEREOGRAPHIC - // projection - // default + // projection + // default float latin = 0.0f; // set to zero for Stereographic projections + Attribute rot = netCdfFile.findGlobalAttribute("rotation"); float rotation = 0.0f; // read the projection @@ -214,6 +216,9 @@ public class RegionalSatDecoder extends AbstractDecoder { if (projection.equalsIgnoreCase("LAMBERT") || projection.equalsIgnoreCase("LAMBERT_CONFORMAL")) { mapProjection = SatSpatialFactory.PROJ_LAMBERT; + if (rot != null) { + rotation = rot.getNumericValue().floatValue(); + } } else if (projection.equalsIgnoreCase("MERCATOR")) { mapProjection = SatSpatialFactory.PROJ_MERCATOR; } else if (projection @@ -222,7 +227,6 @@ public class RegionalSatDecoder extends AbstractDecoder { } } else { - Attribute rot = netCdfFile.findGlobalAttribute("rotation"); if (rot != null) { rotation = rot.getNumericValue().floatValue(); // STEREOGRAPHIC projection add rotation to lov @@ -274,9 +278,15 @@ public class RegionalSatDecoder extends AbstractDecoder { "Unable to decode Satellite: Encountered Unknown projection"); } // end of if map projection block - SatMapCoverage mapCoverage = SatSpatialFactory.getInstance() - .getCoverageTwoCorners(mapProjection, nx, ny, lov, latin, - la1, lo1, la2, lo2); + SatMapCoverage mapCoverage; + if (mapProjection == SatSpatialFactory.PROJ_LAMBERT && rot != null && rotation != latin) + mapCoverage = SatSpatialFactory.getInstance() + .getCoverageTwoCorners(mapProjection, nx, ny, lov, latin, rotation, + la1, lo1, la2, lo2); + else + mapCoverage = SatSpatialFactory.getInstance() + .getCoverageTwoCorners(mapProjection, nx, ny, lov, latin, + la1, lo1, la2, lo2); record.setTraceId(traceId); record.setCoverage(mapCoverage); @@ -357,4 +367,4 @@ public class RegionalSatDecoder extends AbstractDecoder { this.filename = file; } -} +} \ No newline at end of file From 898b37129322991a8f6f83c8ceb590aff5cb8cc9 Mon Sep 17 00:00:00 2001 From: Jordan Gerth Date: Mon, 15 Sep 2014 18:48:21 -0500 Subject: [PATCH 21/23] VLab Issue #4487 - Dim. DR 17313, Additional true color capabilities; fixes #4487 Change-Id: I701f302aa5958e89522208fd7915f5077cf97616 Former-commit-id: 8f5903920cb50c7e921d325cb387ff781d0d498f [formerly 1300009502bafd34fee13c8d21d65208b1069bda] Former-commit-id: 86b34a2f708edf7c2811f3d27e999183a0088d3b --- .../uf/viz/truecolor/rsc/ChannelInfo.java | 15 +- .../uf/viz/truecolor/rsc/ChannelResource.java | 24 +++ .../truecolor/rsc/TrueColorResourceGroup.java | 152 +++++++++++++----- .../rsc/TrueColorResourceGroupData.java | 10 +- .../imaging/GLColormappedImageExtension.java | 5 +- .../rsc/general/AbstractGridResource.java | 105 +++++++----- .../viz/satellite/rsc/SatResource.java | 6 +- .../prefs/DataMappingPreferences.java | 79 ++++++++- 8 files changed, 303 insertions(+), 93 deletions(-) diff --git a/cave/com.raytheon.uf.viz.truecolor/src/com/raytheon/uf/viz/truecolor/rsc/ChannelInfo.java b/cave/com.raytheon.uf.viz.truecolor/src/com/raytheon/uf/viz/truecolor/rsc/ChannelInfo.java index 373da39d85..bae11f5918 100644 --- a/cave/com.raytheon.uf.viz.truecolor/src/com/raytheon/uf/viz/truecolor/rsc/ChannelInfo.java +++ b/cave/com.raytheon.uf.viz.truecolor/src/com/raytheon/uf/viz/truecolor/rsc/ChannelInfo.java @@ -28,6 +28,7 @@ import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; +import com.raytheon.uf.common.colormap.prefs.ColorMapParameters; import com.raytheon.uf.viz.truecolor.extension.ITrueColorImagingExtension.Channel; /** @@ -41,7 +42,7 @@ import com.raytheon.uf.viz.truecolor.extension.ITrueColorImagingExtension.Channe * ------------- -------- ----------- -------------------------- * Aug 20, 2012 mschenke Initial creation * Apr 18, 2014 2947 bsteffen Support unitless data. - * + * Sep 9, 2014 DR 17313 jgerth Support for ColorMapParameters * * * @@ -60,7 +61,9 @@ public class ChannelInfo { @XmlElement private double rangeMax = 1.0; - private Unit unit = Unit.ONE; + private Unit unit; + + private ColorMapParameters parameters; /** * @return the channel @@ -144,6 +147,14 @@ public class ChannelInfo { : null; } + public ColorMapParameters getParameters() { + return parameters; + } + + public void setParameters(ColorMapParameters parameters) { + this.parameters = parameters; + } + /* * (non-Javadoc) * diff --git a/cave/com.raytheon.uf.viz.truecolor/src/com/raytheon/uf/viz/truecolor/rsc/ChannelResource.java b/cave/com.raytheon.uf.viz.truecolor/src/com/raytheon/uf/viz/truecolor/rsc/ChannelResource.java index ce6ec13c4c..59be1668c3 100644 --- a/cave/com.raytheon.uf.viz.truecolor/src/com/raytheon/uf/viz/truecolor/rsc/ChannelResource.java +++ b/cave/com.raytheon.uf.viz.truecolor/src/com/raytheon/uf/viz/truecolor/rsc/ChannelResource.java @@ -25,6 +25,7 @@ import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import com.raytheon.uf.viz.core.rsc.AbstractResourceData; +import com.raytheon.uf.viz.core.rsc.LoadProperties; import com.raytheon.uf.viz.truecolor.extension.ITrueColorImagingExtension.Channel; /** @@ -37,18 +38,26 @@ import com.raytheon.uf.viz.truecolor.extension.ITrueColorImagingExtension.Channe * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Aug 16, 2012 mschenke Initial creation + * Aug 22, 2014 DR 17313 jgerth Support for load properties * * * * @author mschenke * @version 1.0 */ +/** + * @author awips + * + */ @XmlAccessorType(XmlAccessType.NONE) public class ChannelResource { @XmlElement protected AbstractResourceData resourceData; + @XmlElement + protected LoadProperties loadProperties; + @XmlElement protected Channel channel; @@ -100,6 +109,21 @@ public class ChannelResource { this.channelName = channelName; } + /** + * @return the loadProperties + */ + public LoadProperties getLoadProperties() { + return loadProperties; + } + + /** + * @param loadProperties + * the loadProperties to set + */ + public void setLoadProperties(LoadProperties loadProperties) { + this.loadProperties = loadProperties; + } + /* * (non-Javadoc) * diff --git a/cave/com.raytheon.uf.viz.truecolor/src/com/raytheon/uf/viz/truecolor/rsc/TrueColorResourceGroup.java b/cave/com.raytheon.uf.viz.truecolor/src/com/raytheon/uf/viz/truecolor/rsc/TrueColorResourceGroup.java index be4dbb84eb..13bab937de 100644 --- a/cave/com.raytheon.uf.viz.truecolor/src/com/raytheon/uf/viz/truecolor/rsc/TrueColorResourceGroup.java +++ b/cave/com.raytheon.uf.viz.truecolor/src/com/raytheon/uf/viz/truecolor/rsc/TrueColorResourceGroup.java @@ -25,11 +25,13 @@ import java.util.IdentityHashMap; import java.util.Map; import javax.measure.converter.UnitConverter; +import javax.measure.unit.Unit; import org.eclipse.swt.graphics.Rectangle; import org.opengis.referencing.crs.CoordinateReferenceSystem; import com.raytheon.uf.common.colormap.prefs.ColorMapParameters; +import com.raytheon.uf.common.geospatial.ReferencedCoordinate; import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.viz.core.DrawableImage; @@ -69,6 +71,7 @@ import com.vividsolutions.jts.geom.Coordinate; * ------------- -------- ----------- -------------------------- * Aug 06, 2012 mschenke Initial creation * Apr 18, 2014 2947 bsteffen Support unitless data. + * Sep 10, 2014 DR 17313 jgerth Add inspect method * * * @@ -140,7 +143,7 @@ public class TrueColorResourceGroup extends * Mapping to keep colormap parameters in sync with ChannelInfo in * resourceData */ - private Map channelInfoMap = new IdentityHashMap(); + private Map channelInfoMap = new IdentityHashMap(); /** * @param resourceData @@ -246,9 +249,9 @@ public class TrueColorResourceGroup extends for (ChannelResource cr : resourceData.getChannelResources()) { for (ResourcePair rp : resources) { if (cr.getResourceData() == rp.getResourceData()) { - DisplayedChannelResource displayedResource = new DisplayedChannelResource( + DisplayedChannelResource displayedResource = new DisplayedChannelResource( cr, rp.getResource()); - AbstractVizResource resource = rp.getResource(); + AbstractVizResource resource = rp.getResource(); resource.init(target); // Check resource for required capabilities @@ -256,16 +259,7 @@ public class TrueColorResourceGroup extends if (resource.hasCapability(ImagingCapability.class)) { ImagingCapability imaging = resource .getCapability(ImagingCapability.class); - if (imaging.getProvider() != null) { - if (resource - .hasCapability(ColorMapCapability.class) == false) { - error = "does not have ColorMapCapability"; - } else if (resource.getCapability( - ColorMapCapability.class) - .getColorMapParameters() == null) { - error = "does not have ColorMapParameters set"; - } - } else { + if (imaging.getProvider() == null) { error = "does not have image provider set on the ImagingCapability"; } } else { @@ -279,35 +273,32 @@ public class TrueColorResourceGroup extends if (error == null) { // No errors so far, check for ChannelInfo override - ColorMapParameters params = resource.getCapability( - ColorMapCapability.class) + ColorMapCapability cmapCap = resource + .getCapability(ColorMapCapability.class); + ColorMapParameters params = cmapCap .getColorMapParameters(); + ChannelInfo ci = resourceData .getChannelInfo(displayedResource.getChannel()); - if (ci == null - || ci.getUnit().isCompatible( - params.getDataUnit())) { - if (ci == null) { - ci = new ChannelInfo(); - ci.setChannel(displayedResource.getChannel()); - resourceData.setChannelInfo(ci); - } else { - params.setDisplayUnit(ci.getUnit()); - params.setColorMapMin((float) params - .getDisplayToDataConverter().convert( - ci.getRangeMin())); - params.setColorMapMax((float) params - .getDisplayToDataConverter().convert( - ci.getRangeMax())); + if (ci == null) { + ci = new ChannelInfo(); + ci.setChannel(displayedResource.getChannel()); + if (params != null) { + ci.setUnit(params.getColorMapUnit()); + ci.setRangeMin(params.getColorMapMin()); + ci.setRangeMax(params.getColorMapMax()); } - channelInfoMap.put(params, ci); - resourceChanged( - ChangeType.CAPABILITY, - resource.getCapability(ColorMapCapability.class)); - } else { - error = "is not compatible with custom ChannelInfo for Channel=" - + displayedResource.getChannel(); + resourceData.setChannelInfo(ci); } + + channelInfoMap.put(cmapCap, ci); + + if (params != null && params.getColorMapUnit() == null) { + // no colormap units set, default to ChannelInfo + params.setColorMapUnit(ci.getUnit()); + } + + initializeParameters(ci, params); } if (error != null) { @@ -317,7 +308,9 @@ public class TrueColorResourceGroup extends + error); resources.remove(rp); } else { - resource.getResourceData().addChangeListener(this); + // Listener will handle case where params are changed + // after the fact and we will reinitialize + resource.getResourceData().addChangeListener(this); displayedResources.put(displayedResource.getChannel(), displayedResource); } @@ -430,19 +423,90 @@ public class TrueColorResourceGroup extends if (toDisplay == null) { toDisplay = UnitConverter.IDENTITY; } - ChannelInfo ci = channelInfoMap.get(params); + ChannelInfo ci = channelInfoMap.get(object); if (ci != null) { - ci.setRangeMin(toDisplay.convert( - params.getColorMapMin())); - ci.setRangeMax(toDisplay.convert( - params.getColorMapMax())); - ci.setUnit(params.getDisplayUnit()); + if (ci.getParameters() != params) { + // Reinitialize params from channel info + initializeParameters(ci, params); + } else { + ci.setRangeMin(toDisplay.convert(params + .getColorMapMin())); + ci.setRangeMax(toDisplay.convert(params + .getColorMapMax())); + ci.setUnit(params.getDisplayUnit()); + } } } } issueRefresh(); } + @Override + public String inspect(ReferencedCoordinate coord) throws VizException { + String label = ""; + for (Channel c : Channel.values()) { + DisplayedChannelResource dcr = displayedResources.get(c); + if (dcr != null) { + String ri = dcr.resource.inspect(coord); + label += c.name() + ": " + ri; + if (dcr.resource.hasCapability(ColorMapCapability.class) && ri.replaceAll("[^\\d]", "").length() > 0) { + ColorMapParameters cmp = dcr.resource.getCapability(ColorMapCapability.class).getColorMapParameters(); + UnitConverter uc = cmp.getColorMapToDisplayConverter(); + if (uc == null) + uc = UnitConverter.IDENTITY; + double cmmax = uc.convert(cmp.getColorMapMax()); + double cmmin = uc.convert(cmp.getColorMapMin()); + String rirall; + if (ri.charAt(0) == ('-')) + rirall = "-" + (ri.substring(1) + "x").replaceAll("[^\\d.]", " "); + else + rirall = (ri + "x").replaceAll("[^\\d.]", " "); + try { + double value = Double.parseDouble(rirall.substring(0,rirall.indexOf(" "))); + double percent = ((value - cmmin) * 100.0 / (cmmax - cmmin)); + if (percent < 0) + percent = 0.0; + else if (percent > 100) + percent = 100.0; + label += " (" + Math.round(percent) + "%)\n"; + } catch (Exception e) { + label += "\n"; + } + } else + label += "\n"; + } + } + if (label.length() > 0) + return label; + else + return "NO DATA"; + } + + private static void initializeParameters(ChannelInfo ci, + ColorMapParameters params) { + if (params != null) { + ci.setParameters(params); + if (ci.getUnit() != null && params.getColorMapUnit() != null + && ci.getUnit().isCompatible(params.getColorMapUnit())) { + params.setDisplayUnit(ci.getUnit()); + UnitConverter displayToCmap = params + .getDisplayToColorMapConverter(); + params.setColorMapMin( + (float) displayToCmap.convert(ci.getRangeMin()), + true); + params.setColorMapMax( + (float) displayToCmap.convert(ci.getRangeMax()), + true); + } else { + UnitConverter cmapToDisplay = params + .getColorMapToDisplayConverter(); + ci.setRangeMin(cmapToDisplay.convert(params.getColorMapMin())); + ci.setRangeMax(cmapToDisplay.convert(params.getColorMapMax())); + ci.setUnit(params.getDisplayUnit()); + } + } + } + public Collection getChannelResources() { return displayedResources.values(); } diff --git a/cave/com.raytheon.uf.viz.truecolor/src/com/raytheon/uf/viz/truecolor/rsc/TrueColorResourceGroupData.java b/cave/com.raytheon.uf.viz.truecolor/src/com/raytheon/uf/viz/truecolor/rsc/TrueColorResourceGroupData.java index eaaf98a5fb..5a857970f8 100644 --- a/cave/com.raytheon.uf.viz.truecolor/src/com/raytheon/uf/viz/truecolor/rsc/TrueColorResourceGroupData.java +++ b/cave/com.raytheon.uf.viz.truecolor/src/com/raytheon/uf/viz/truecolor/rsc/TrueColorResourceGroupData.java @@ -50,6 +50,7 @@ import com.raytheon.uf.viz.truecolor.extension.ITrueColorImagingExtension.Channe * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Aug 6, 2012 mschenke Initial creation + * Aug 22, 2014 DR 17313 jgerth Support for load properties * * * @@ -94,16 +95,19 @@ public class TrueColorResourceGroupData extends AbstractResourceData implements } }; for (ChannelResource resource : channelResources) { - addResource(resource.getResourceData()); + addResource(resource.getResourceData(), resource.getLoadProperties()); } } return resourceList; } - private void addResource(AbstractResourceData resourceData) { + private void addResource(AbstractResourceData resourceData, LoadProperties loadProp) { ResourcePair rp = new ResourcePair(); rp.setResourceData(resourceData); - rp.setLoadProperties(new LoadProperties()); + if (loadProp == null) + rp.setLoadProperties(new LoadProperties()); + else + rp.setLoadProperties(loadProp); rp.setProperties(new ResourceProperties()); resourceList.add(rp); } diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/imaging/GLColormappedImageExtension.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/imaging/GLColormappedImageExtension.java index 2b4b38dc82..1438ee1a1b 100644 --- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/imaging/GLColormappedImageExtension.java +++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/imaging/GLColormappedImageExtension.java @@ -63,7 +63,7 @@ import com.raytheon.viz.core.gl.objects.GLTextureObject; * Oct 16, 2013 2333 mschenke Cleaned up load shader method, used isScaled. * Added support for colormapping in non-data unit. * Nov 20, 2013 2492 bsteffen Mosaic in image units. - * + * Aug 21, 2014 DR 17313 jgerth Support for true color * * * @@ -212,7 +212,8 @@ public class GLColormappedImageExtension extends AbstractGLSLImagingExtension // datamapping is not set, the data has already been mapped to // colorMapUnits and we need not do anything GLDataMapping dataMapping = glImage.getDataMapping(); - if (dataMapping == null && colorMapParameters.getDataMapping() == null) { + if (dataMapping == null && colorMapParameters.getDataMapping() == null && + colorMapParameters.getColorMap() != null) { Unit dataUnit = glImage.getDataUnit(); int colorMapSize = colorMapParameters.getColorMap().getSize(); float colorMapMin = colorMapParameters.getColorMapMin(); diff --git a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/general/AbstractGridResource.java b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/general/AbstractGridResource.java index 9e4a976abc..06ca3ae524 100644 --- a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/general/AbstractGridResource.java +++ b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/general/AbstractGridResource.java @@ -22,6 +22,8 @@ package com.raytheon.viz.grid.rsc.general; import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -64,12 +66,14 @@ import com.raytheon.uf.common.style.contour.ContourPreferences; import com.raytheon.uf.common.style.image.ColorMapParameterFactory; import com.raytheon.uf.common.style.image.ImagePreferences; import com.raytheon.uf.common.time.DataTime; +import com.raytheon.uf.viz.core.DrawableImage; import com.raytheon.uf.viz.core.IGraphicsTarget; import com.raytheon.uf.viz.core.VizApp; import com.raytheon.uf.viz.core.drawables.ColorMapLoader; import com.raytheon.uf.viz.core.drawables.IRenderable; import com.raytheon.uf.viz.core.drawables.PaintProperties; import com.raytheon.uf.viz.core.drawables.PaintStatus; +import com.raytheon.uf.viz.core.drawables.ext.IImagingExtension.ImageProvider; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.map.IMapDescriptor; import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData; @@ -125,7 +129,7 @@ import com.vividsolutions.jts.geom.Coordinate; * Jan 14, 2014 2594 bsteffen Switch vector mag/dir to use data source * instead of raw float data. * Feb 28, 2014 2791 bsteffen Switch all data to use data source. - * + * Aug 21, 2014 DR 17313 jgerth Implements ImageProvider * * * @@ -134,7 +138,7 @@ import com.vividsolutions.jts.geom.Coordinate; * @param */ public abstract class AbstractGridResource - extends AbstractVizResource { + extends AbstractVizResource implements ImageProvider { private static final transient IUFStatusHandler statusHandler = UFStatus .getHandler(AbstractGridResource.class); @@ -345,6 +349,7 @@ public abstract class AbstractGridResource this.getCapability(ImagingCapability.class) .setInterpolationState(true); } + this.getCapability(ImagingCapability.class).setProvider(this); altDisplayTypes.add(DisplayType.CONTOUR); break; case BARB: @@ -438,43 +443,6 @@ public abstract class AbstractGridResource } } - @Override - protected void paintInternal(IGraphicsTarget target, - PaintProperties paintProps) throws VizException { - DataTime time = paintProps.getDataTime(); - if (time == null) { - time = getTimeForResource(); - } - if (time == null) { - return; - } - synchronized (renderableMap) { - if (renderableMap.containsKey(time)) { - for (IRenderable renderable : renderableMap.get(time)) { - renderable.paint(target, paintProps); - } - return; - } - - List dataList = requestData(time); - if (dataList == null) { - updatePaintStatus(PaintStatus.INCOMPLETE); - return; - } - - List renderableList = new ArrayList( - dataList.size()); - for (GeneralGridData data : dataList) { - IRenderable renderable = createRenderable(target, data); - if (renderable != null) { - renderableList.add(renderable); - renderable.paint(target, paintProps); - } - } - renderableMap.put(time, renderableList); - } - } - /** * Create a renderable for this data. * @@ -993,4 +961,63 @@ public abstract class AbstractGridResource return new ArrayList(list); } + public Collection getImages(IGraphicsTarget target, PaintProperties paintProps) throws VizException { + if (getCapability(DisplayTypeCapability.class).getDisplayType() != DisplayType.IMAGE) { + throw new VizException("Grid resource not configured for image rendering"); + } + Collection renderables = getOrCreateRenderables(target, paintProps); + if (renderables.isEmpty()) { + return Collections.emptyList(); + } + + List images = new ArrayList(); + for (IRenderable renderable : renderables) { + images.addAll(((TileSetRenderable)renderable).getImagesToRender(target, paintProps)); + } + return images; + } + + protected Collection getOrCreateRenderables( + IGraphicsTarget target, PaintProperties paintProps) + throws VizException { + DataTime time = paintProps.getDataTime(); + if (time == null) { + time = getTimeForResource(); + } + if (time == null) { + return Collections.emptyList(); + } + + List renderables; + + synchronized (renderableMap) { + if (renderableMap.containsKey(time)) { + renderables = renderableMap.get(time); + } else { + List dataList = requestData(time); + if (dataList == null) { + updatePaintStatus(PaintStatus.INCOMPLETE); + return Collections.emptyList(); + } + + renderables = new ArrayList(dataList.size()); + for (GeneralGridData data : dataList) { + IRenderable renderable = createRenderable(target, data); + if (renderable != null) { + renderables.add(renderable); + } + } + renderableMap.put(time, renderables); + } + } + return renderables; + } + + @Override + protected void paintInternal(IGraphicsTarget target, + PaintProperties paintProps) throws VizException { + for (IRenderable renderable : getOrCreateRenderables(target, paintProps)) { + renderable.paint(target, paintProps); + } + } } 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 41f30e9b68..0cdee24cdd 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 @@ -101,6 +101,7 @@ import com.vividsolutions.jts.geom.Coordinate; * Apr 09, 2014 2947 bsteffen Improve flexibility of sat derived * parameters, implement ImageProvider * May 06, 2014 njensen Improve error message + * Aug 21, 2014 DR 17313 jgerth Set no data value if no data mapping * * * @@ -354,7 +355,8 @@ public class SatResource extends if (persisted != null) { colorMapParameters.applyPersistedParameters(persisted); } - colorMapParameters.setNoDataValue(0); + if (colorMapParameters.getDataMapping() == null) + colorMapParameters.setNoDataValue(0); getCapability(ColorMapCapability.class).setColorMapParameters( colorMapParameters); @@ -423,7 +425,7 @@ public class SatResource extends if (dataMapping != null) { // if the pixel value matches the data mapping entry use that // label instead - String label = dataMapping.getLabelValueForDataValue(measuredValue); + String label = dataMapping.getSampleOrLabelValueForDataValue(measuredValue); if (label != null) { return label; } diff --git a/edexOsgi/com.raytheon.uf.common.colormap/src/com/raytheon/uf/common/colormap/prefs/DataMappingPreferences.java b/edexOsgi/com.raytheon.uf.common.colormap/src/com/raytheon/uf/common/colormap/prefs/DataMappingPreferences.java index 1e0e85dc1a..7f553d245a 100644 --- a/edexOsgi/com.raytheon.uf.common.colormap/src/com/raytheon/uf/common/colormap/prefs/DataMappingPreferences.java +++ b/edexOsgi/com.raytheon.uf.common.colormap/src/com/raytheon/uf/common/colormap/prefs/DataMappingPreferences.java @@ -39,6 +39,7 @@ import com.raytheon.uf.common.units.PiecewisePixel; * ------------ ---------- ----------- -------------------------- * 6/2013 DR 16070 jgerth Interpolation capability * Aug 2, 2013 2211 mschenke Backed out 16070 changes + * Aug 21, 2014 DR 17313 jgerth New methods * * * @@ -249,7 +250,7 @@ public class DataMappingPreferences { } else if (">".equals(operator)) { greaterThanEntries.add(entry); Collections - .sort(greaterThanEntries, Collections.reverseOrder()); + .sort(greaterThanEntries, Collections.reverseOrder()); } else if ("<".equals(operator)) { lessThanEntries.add(entry); Collections.sort(lessThanEntries); @@ -289,4 +290,80 @@ public class DataMappingPreferences { return null; } + /** + * Matches a number against the pixelValue in each entry based on the + * operator until the first match is found. + * + * jjg 7/24/2014 + * + * @param dataValue + * the data value to match + * @return The entry sample, if one exists. + */ + public String getSampleValueForDataValue(double dataValue) { + for (DataMappingEntry entry : equalsEntries) { + Double entryValue = entry.getPixelValue(); + if (entryValue.equals(dataValue)) { + return entry.getSample(); + } + } + + for (DataMappingEntry entry : lessThanEntries) { + Double entryValue = entry.getPixelValue(); + if (dataValue < entryValue) { + return entry.getSample(); + } + } + + for (DataMappingEntry entry : greaterThanEntries) { + Double entryValue = entry.getPixelValue(); + if (dataValue > entryValue) { + return entry.getSample(); + } + } + return null; + } + + /** + * Matches a number against the pixelValue in each entry based on the + * operator until the first match is found. + * + * jjg 7/24/2014 + * + * @param dataValue + * the data value to match + * @return The entry sample or label, if one exists. + */ + public String getSampleOrLabelValueForDataValue(double dataValue) { + for (DataMappingEntry entry : equalsEntries) { + Double entryValue = entry.getPixelValue(); + if (entryValue.equals(dataValue)) { + if (entry.getSample() == null) + return entry.getLabel(); + else + return entry.getSample(); + } + } + + for (DataMappingEntry entry : lessThanEntries) { + Double entryValue = entry.getPixelValue(); + if (dataValue < entryValue) { + if (entry.getSample() == null) + return entry.getLabel(); + else + return entry.getSample(); + } + } + + for (DataMappingEntry entry : greaterThanEntries) { + Double entryValue = entry.getPixelValue(); + if (dataValue > entryValue) { + if (entry.getSample() == null) + return entry.getLabel(); + else + return entry.getSample(); + } + } + return null; + } } From 9d2eaef5e77fb0a90e7d7b80f78ccc0ac6f11d95 Mon Sep 17 00:00:00 2001 From: "Brian.Dyke" Date: Wed, 17 Sep 2014 15:39:57 -0400 Subject: [PATCH 22/23] VLab Issue #4015 - MPE - This is the MPEFieldgen LSATPRE Field generation fix. Built library.ohd.pproc.so Former-commit-id: 05145d2f0d49f65a9ee8053224da6cda41a8489d [formerly 0448deecda7c53ac65bc66bc9751ec0e7f83eee1] Former-commit-id: 546b43dff64b2c06c00464802235859577f569b8 --- .../lib/native/linux32/library.ohd.pproc.so.REMOVED.git-id | 2 +- .../edex/lib/native/linux32/library.ohd.pproc.so.REMOVED.git-id | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nativeLib/files.native/awipsShare/hydroapps/lib/native/linux32/library.ohd.pproc.so.REMOVED.git-id b/nativeLib/files.native/awipsShare/hydroapps/lib/native/linux32/library.ohd.pproc.so.REMOVED.git-id index 9579d7ded4..85d33f3b5d 100644 --- a/nativeLib/files.native/awipsShare/hydroapps/lib/native/linux32/library.ohd.pproc.so.REMOVED.git-id +++ b/nativeLib/files.native/awipsShare/hydroapps/lib/native/linux32/library.ohd.pproc.so.REMOVED.git-id @@ -1 +1 @@ -ff870436dd7bd7bff19efe09fb08e415eec08992 \ No newline at end of file +198d9e1b995f9fcf55686c0992f4bb0612f429e0 \ No newline at end of file diff --git a/nativeLib/files.native/edex/lib/native/linux32/library.ohd.pproc.so.REMOVED.git-id b/nativeLib/files.native/edex/lib/native/linux32/library.ohd.pproc.so.REMOVED.git-id index 9579d7ded4..85d33f3b5d 100644 --- a/nativeLib/files.native/edex/lib/native/linux32/library.ohd.pproc.so.REMOVED.git-id +++ b/nativeLib/files.native/edex/lib/native/linux32/library.ohd.pproc.so.REMOVED.git-id @@ -1 +1 @@ -ff870436dd7bd7bff19efe09fb08e415eec08992 \ No newline at end of file +198d9e1b995f9fcf55686c0992f4bb0612f429e0 \ No newline at end of file From 0e4b8d2e9be083ef53e668701aea3b64c0f8f1c1 Mon Sep 17 00:00:00 2001 From: Chip Gobs Date: Thu, 18 Sep 2014 12:12:42 -0400 Subject: [PATCH 23/23] VLab Issue #4611 Adding missing changed file. Change-Id: Ifcc56c121bb13806a5a5e7fc4e6de6e36900867e Former-commit-id: 31efce6b8f79d7f3800d0248fb13673d9bbaa5e7 [formerly e68f56628f035ca2a20848a0e76f6efa8bbe1e8a] Former-commit-id: 0d046a56e8c29d1040814956e52d6bfae304331c --- .../src/com/raytheon/viz/mpe/ui/MPEDisplayManager.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/MPEDisplayManager.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/MPEDisplayManager.java index 4c278874cd..4a491b6a46 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/MPEDisplayManager.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/MPEDisplayManager.java @@ -1278,4 +1278,9 @@ public class MPEDisplayManager { return type; } + + public int getDisplayedAccumHrs() { + + return displayedAccumHrs; + } }