From f8f4d8573ea42fe4131cb93a247cf16a2142cc43 Mon Sep 17 00:00:00 2001 From: "Qinglu.Lin" Date: Tue, 28 Apr 2015 10:36:19 -0400 Subject: [PATCH 1/6] ASM #17359 - Warngen: it takes long time to get warning areas hatched when switching from Marine Weather Statement to Special Marine Warning Change-Id: I02d432e4d335069a15700c9dc564bd19dbd14527 Former-commit-id: 3820522a7b6adb79f9eca4e75f66f93779ef7698 --- .../viz/warngen/gui/WarngenDialog.java | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java index 7d6aab1662..1dc47d40da 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java @@ -159,6 +159,10 @@ import com.vividsolutions.jts.geom.Polygon; * Jul 01, 2014 DR 17450 D. Friedman Use list of templates from backup site. * Jul 21, 2014 3419 jsanchez Created a hidden button to make recreating polygons easier. * Feb 26, 2015 3353 rjpeter Fixed NPE on clear. + * Apr 27, 2015 DR 17359 Qinglu Lin Updated changeTemplate(). The approach for solving slowness issue while switching from + * one marine product to another is to skip computing hatching area. The hatching area might + * not be as expected if percentage/area is different between the two products. But the + * chance for that to occur is trivial. * * * @author chammack @@ -1657,14 +1661,17 @@ public class WarngenDialog extends CaveSWTDialog implements .equalsIgnoreCase(lastAreaSource); boolean snapHatchedAreaToPolygon = isDifferentAreaSources; boolean preservedSelection = !isDifferentAreaSources; - // If template has a different hatched area source from the previous - // template, then the warned area would be based on the polygon and not - // preserved. - try { - warngenLayer.updateWarnedAreas(snapHatchedAreaToPolygon, - preservedSelection); - } catch (VizException e1) { - statusHandler.handle(Priority.PROBLEM, "WarnGen Error", e1); + if (isDifferentAreaSources || !warngenLayer.getConfiguration() + .getHatchedAreaSource().getAreaSource().toLowerCase().equals("marinezones")) { + // If template has a different hatched area source from the previous + // template, then the warned area would be based on the polygon and not + // preserved. + try { + warngenLayer.updateWarnedAreas(snapHatchedAreaToPolygon, + preservedSelection); + } catch (VizException e1) { + statusHandler.handle(Priority.PROBLEM, "WarnGen Error", e1); + } } // Properly sets the "Create Text" button. setInstructions(); From dfa0c5a0f704924c0ec9f5c4a4a3343a4eeaaba2 Mon Sep 17 00:00:00 2001 From: David Friedman Date: Tue, 28 Apr 2015 16:25:25 +0000 Subject: [PATCH 2/6] ASM #15008 - Local and regional warnings may not display when overlaid on other products Change-Id: I2e43dbbd7389b80bc04020ad17ad935a26bd2b0a Former-commit-id: e036f27f76ed8a77cf65e57f1d29835b9702936d --- .../com/raytheon/viz/warnings/rsc/WarningsResource.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java b/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java index f3bfa3e899..9094497fc5 100644 --- a/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java +++ b/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java @@ -68,6 +68,7 @@ import com.vividsolutions.jts.geom.Geometry; * Mar 04, 2014 2832 njensen Moved disposeInternal() to abstract class * Apr 07, 2014 2959 njensen Correct handling of color change * Apr 14, 2014 DR 17257 D. Friedman Redo time matching on per-minute refresh. + * Apr 28, 2015 ASM #15008 D. Friedman Create polygon for EXTs even if original product is not found. * * * @@ -268,9 +269,11 @@ public class WarningsResource extends AbstractWWAResource { } } } - // create the new polygon for the CON outside of the above - // for loop - if (createShape != null) { + /* Create a new polygon for the follow-up to the original + * product found in the above loop. Also create a polygon + * for EXT actions even if the original was not found. + */ + if (createShape != null || act == WarningAction.EXT) { initShape(target, warnrec); } } else { From c5d45e6cddff51385f81d25ad9795a0218caec5b Mon Sep 17 00:00:00 2001 From: David Friedman Date: Wed, 29 Apr 2015 22:31:03 +0000 Subject: [PATCH 3/6] ASM #17310 - WarnGen: a large portion of hatched area was not included in polygon Change-Id: I4c6a98813149c01e6c878cc880f5e619937273dc Former-commit-id: addc3cc1bfedd9c36e41319ca528b9dadceff390 --- .../raytheon/viz/warngen/gis/PolygonUtil.java | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PolygonUtil.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PolygonUtil.java index 9943db6592..edb6cce44f 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PolygonUtil.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PolygonUtil.java @@ -54,6 +54,7 @@ import com.vividsolutions.jts.geom.LinearRing; import com.vividsolutions.jts.geom.Point; import com.vividsolutions.jts.geom.Polygon; import com.vividsolutions.jts.geom.PrecisionModel; +import com.vividsolutions.jts.geom.TopologyException; import com.vividsolutions.jts.geom.prep.PreparedGeometry; import com.vividsolutions.jts.geom.prep.PreparedGeometryFactory; import com.vividsolutions.jts.precision.SimpleGeometryPrecisionReducer; @@ -89,6 +90,7 @@ import com.vividsolutions.jts.precision.SimpleGeometryPrecisionReducer; * 06/27/2014 DR 17443 D. Friedman Fix some odd cases in which parts of a polygon not covering a * hatched area would be retained after redrawing. * 07/22/2014 DR 17475 Qinglu Lin Updated createPolygonByPoints() and created second createPolygonByPoints(). + * 07/29/2015 DR 17310 D. Friedman Use Geometry.buffer() to fix self-intersections. Fix bug in alterVertexes. * * * @author mschenke @@ -547,6 +549,19 @@ public class PolygonUtil { Polygon rval = gf.createPolygon(gf.createLinearRing(points .toArray(new Coordinate[points.size()])), null); + if (!rval.isValid()) { + System.out.format("Polygon %s is invalid. Attempting to fix...\n", rval); + try { + Polygon p2 = (Polygon) rval.buffer(0.0); + rval = gf.createPolygon((LinearRing) p2.getExteriorRing()); + } catch (TopologyException e) { + System.out.format("...fix failed\n"); + } catch (ClassCastException e) { + System.out.format("...resulted in something other than a polygon\n"); + } + System.out.format("...fixed. Result: %s\n", rval); + } + if (rval.isValid() == false) { System.out.println("Fixing intersected segments"); Coordinate[] coords = rval.getCoordinates(); @@ -1675,8 +1690,8 @@ public class PolygonUtil { if (intersectCoord != null) { index1 = calcShortestDistance(intersectCoord, ls1); index2 = calcShortestDistance(intersectCoord, ls2); - Coordinate c = new Coordinate(0.5*(coord[index1].x + coord[2+index2].x), - 0.5*(coord[index1].y + coord[2+index2].y)); + Coordinate c = new Coordinate(0.5*(coord[index[index1]].x + coord[index[2+index2]].x), + 0.5*(coord[index[index1]].y + coord[index[2+index2]].y)); PolygonUtil.round(c, 2); coord[index[index1]] = new Coordinate(c); coord[index[2+index2]] = new Coordinate(c); From 8df7d2a14bd1b9cce24a0887170cd271edfa293e Mon Sep 17 00:00:00 2001 From: "Yun.Teng" Date: Mon, 4 May 2015 18:23:34 +0100 Subject: [PATCH 4/6] ASM #17417 - AvnFPS retrieve multiple sites from configuration file Change-Id: I0edf02ac1ae06a4a4d4ce926390cc7d003acba3c Former-commit-id: 5c59562cb0fcfe0b1669cf5f19bb4a320e0f199b --- .../raytheon/viz/avnconfig/TafSiteConfigIni.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/cave/com.raytheon.viz.avnconfig/src/com/raytheon/viz/avnconfig/TafSiteConfigIni.java b/cave/com.raytheon.viz.avnconfig/src/com/raytheon/viz/avnconfig/TafSiteConfigIni.java index 9e41793774..e1dd58b42d 100644 --- a/cave/com.raytheon.viz.avnconfig/src/com/raytheon/viz/avnconfig/TafSiteConfigIni.java +++ b/cave/com.raytheon.viz.avnconfig/src/com/raytheon/viz/avnconfig/TafSiteConfigIni.java @@ -65,7 +65,8 @@ import com.raytheon.viz.avnconfig.AvnConfigConstants.triggerType; * Feb 16, 2011 7878 rferrel Modifications to use ids.cfg file. * Apr 08, 2011 8856 rferrel Can now make a new station's templates * May 24, 2011 9060 rferrel Limit downloading of localization files. - * Aug 09, 2013 2033 mschenke Switched File.separator to IPathManager.SEPARATOR + * Aug 09, 2013 2033 mschenke Switched File.separator to IPathManager.SEPARATOR + * May 04, 2015 17417 yteng Get all sites from product * * * @@ -299,13 +300,10 @@ public class TafSiteConfigIni implements ITafSiteConfig { HierarchicalINIConfiguration config = getProductConfig(product); if (config != null) { config.setDelimiterParsingDisabled(true); - String sites = config.getString("sites.idents"); - if (sites != null) { - String[] idents = config.getString("sites.idents").split( - "\\s*,\\s*", 0); - - for (String id : idents) { - siteList.add(id); + String[] sites = config.getStringArray("sites.idents"); + if (sites != null && sites.length > 0) { + for (String site : sites) { + siteList.add(site); } } } From 52e70e2572cbae68af6bd3a7a86273b1a31f6835 Mon Sep 17 00:00:00 2001 From: Melissa Porricel Date: Fri, 8 May 2015 12:51:59 -0400 Subject: [PATCH 5/6] ASM #7951 - Add RTMA menu items to Misc/Aviation VB menu Change-Id: Idddde521d6c2403d8a76f3341e977d217b8469d6 Former-commit-id: 4f1ad3c4db5d5e8ec77870c34a9d66c440be2691 --- .../fields/planview-timeseries/sfc2d/aviation.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cave/com.raytheon.viz.volumebrowser/localization/menus/volumebrowser/fields/planview-timeseries/sfc2d/aviation.xml b/cave/com.raytheon.viz.volumebrowser/localization/menus/volumebrowser/fields/planview-timeseries/sfc2d/aviation.xml index 5040f304ef..48d43f5c54 100644 --- a/cave/com.raytheon.viz.volumebrowser/localization/menus/volumebrowser/fields/planview-timeseries/sfc2d/aviation.xml +++ b/cave/com.raytheon.viz.volumebrowser/localization/menus/volumebrowser/fields/planview-timeseries/sfc2d/aviation.xml @@ -19,7 +19,10 @@ further_licensing_information. --> + + + From adf477f575f9ea4f35b238ae7bb0e298e8914d31 Mon Sep 17 00:00:00 2001 From: "Xuezhi.Wei" Date: Mon, 11 May 2015 11:51:49 +0000 Subject: [PATCH 6/6] ASM #17442 New ndm-modes.xml for ingestHydro for ALR Change-Id: I2857355665f2901a43ab7fcdc40477a5ffbebd45 Former-commit-id: a0f91c6b8fab3a98ef404c37d49cbbe9b0cdaeba --- .../modes/ndm-modes.xml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 edexOsgi/com.raytheon.uf.edex.ndm/modes/ndm-modes.xml diff --git a/edexOsgi/com.raytheon.uf.edex.ndm/modes/ndm-modes.xml b/edexOsgi/com.raytheon.uf.edex.ndm/modes/ndm-modes.xml new file mode 100644 index 0000000000..635e953186 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.ndm/modes/ndm-modes.xml @@ -0,0 +1,29 @@ + + + + + + + ndm-ingest.xml + + \ No newline at end of file