From 314c03e7b644420791dce4c9624cab856b807d39 Mon Sep 17 00:00:00 2001 From: Steve Harris Date: Mon, 29 Oct 2012 12:15:56 -0500 Subject: [PATCH] 12.11.1-12 baseline Former-commit-id: 8682e4f6caad7671e6a8606745778f07e908544f [formerly 14a4f6c31948361ff83aa64d6eaca3d958fd1d8f] Former-commit-id: 9ff9cb8aa318b7d64d0bd7f43b49ea03499c6dd7 --- .../uf/viz/d2d/core/time/TimeMatcher.java | 36 +++++++++---------- .../viz/gfe/makehazard/MakeHazardDialog.java | 3 +- .../edex/plugin/gfe/db/dao/GFEDao.java | 6 ++-- .../gfe/server/database/D2DGridDatabase.java | 6 ++-- .../server/database/NetCDFGridDatabase.java | 12 +++++-- .../gfe/server/database/NetCDFUtils.java | 11 ------ rpms/build/common/lookupRPM.sh | 4 +++ 7 files changed, 37 insertions(+), 41 deletions(-) diff --git a/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/TimeMatcher.java b/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/TimeMatcher.java index 5835596c5c..b98565f68f 100644 --- a/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/TimeMatcher.java +++ b/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/TimeMatcher.java @@ -651,21 +651,12 @@ public class TimeMatcher { dtd = (rv.intrinsicPeriod * 3) / 2; dataFcsts = rv.haveForecasts; - if (fspatial) { - dtf = dt; - frameFcsts = dataFcsts; - } else { - rv = intrinsicPeriod(frameTimes, frameFcsts); - dtf = rv.intrinsicPeriod; - frameFcsts = rv.haveForecasts; - } + rv = intrinsicPeriod(frameTimes, frameFcsts); + dtf = rv.intrinsicPeriod; + frameFcsts = rv.haveForecasts; - if (dt > ONE_MINUTE_MS && dt <= ELEVEN_MINUTES_MS - && dtf > ONE_MINUTE_MS && dtf <= ELEVEN_MINUTES_MS - && radarOnRadarYes) { - if (dtf < dt) { - dt = dtf; - } + if (fspatial) { + frameFcsts = dataFcsts; } else if (dtf > dt) { dt = dtf; } @@ -683,12 +674,17 @@ public class TimeMatcher { dt++; } - if (dt > dtd || frameTimes[ef].getMatchValid() - latest.getTime() > dtd) { - // The first check makes sure that dtd is always bigger than dt - // since dtd is supposed to add extra padding to the time. The - // second check makes it so that if the latest frameTime is past the - // latest depictTime by more than dtd than we ignore dtd by setting - // it to dt which makes it a no op. + if (dt > dtd || dt < dtf + || frameTimes[ef].getMatchValid() - latest.getTime() > dtd) { + // Three conditions here: + // 1) dtd is supposed to provide extra padding compared to dt, so if + // dt is bigger then set them equal to avoid reducing the padding. + // 2) Clear the extra padding if the acceptable depict time spacing + // is not bigger than the frame time spacing + // 3) Clear the extra padding if the latest frame time is not within + // dtd of the latest depict time + + // setting dtd to dt makes any use of dtd a noop. dtd = dt; } diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/makehazard/MakeHazardDialog.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/makehazard/MakeHazardDialog.java index 650fd16c55..b3f331fcad 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/makehazard/MakeHazardDialog.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/makehazard/MakeHazardDialog.java @@ -25,6 +25,7 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; +import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -724,7 +725,7 @@ public class MakeHazardDialog extends CaveSWTDialog implements private List getZoneList() { List> zoneGroupings = zoneSelector.getZoneGroupings(); - List zoneList = null; + List zoneList = Collections.emptyList(); if (zoneGroupings.size() > 0) { zoneList = zoneGroupings.get(0); } diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java index e8beb87a3b..bc8129bee3 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java @@ -849,10 +849,10 @@ public class GFEDao extends DefaultPluginDao { if (dTimeList.contains(tr)) { timeList.add(new TimeRange(tr.getStart(), tr.getStart())); } + } - if (!timeList.isEmpty()) { - return timeList; - } + if (!timeList.isEmpty()) { + return timeList; } } else { List results = executeD2DParmQuery(id); diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java index 6b9d00a565..7d5464987f 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java @@ -177,9 +177,9 @@ public class D2DGridDatabase extends VGridDatabase { + ": GFE domain does not overlap dataset domain."); this.remap = null; } else { - this.remap = new RemapGrid(NetCDFUtils.subGridGL( - dbId.toString(), this.inputLoc, subdomain), - this.outputLoc); + GridLocation subGloc = new GridLocation(dbId.toString(), + this.inputLoc, subdomain); + this.remap = new RemapGrid(subGloc, this.outputLoc); } } diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/NetCDFGridDatabase.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/NetCDFGridDatabase.java index 21f05b500f..6f5c15b11f 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/NetCDFGridDatabase.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/NetCDFGridDatabase.java @@ -19,6 +19,7 @@ **/ package com.raytheon.edex.plugin.gfe.server.database; +import java.awt.Point; import java.awt.Rectangle; import java.util.ArrayList; import java.util.Arrays; @@ -51,6 +52,7 @@ import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.time.TimeRange; import com.raytheon.uf.edex.database.DataAccessLayerException; +import com.vividsolutions.jts.geom.Coordinate; /** * Database that reads netCDF files like A1 @@ -205,9 +207,13 @@ public class NetCDFGridDatabase extends VGridDatabase { + ": GFE domain does not overlap dataset domain."); this.remap = null; } else { - this.remap = new RemapGrid(NetCDFUtils.subGridGL( - this.dbId.toString(), this.inputGloc, this.subdomain), - this.outputGloc); + GridLocation subGloc = new GridLocation(this.dbId.toString(), + this.inputGloc.getProjection(), new Point( + this.subdomain.width, this.subdomain.height), + new Coordinate(this.subdomain.x, this.subdomain.y), + new Coordinate(this.subdomain.width, + this.subdomain.height), "GMT"); + this.remap = new RemapGrid(subGloc, this.outputGloc); } loadParms(); } diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/NetCDFUtils.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/NetCDFUtils.java index 05985b5dae..31bf23dcdb 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/NetCDFUtils.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/NetCDFUtils.java @@ -370,15 +370,4 @@ public class NetCDFUtils { return rval; } - - public static GridLocation subGridGL(String id, GridLocation igloc, - Rectangle subd) { - // Coordinate nwo = igloc.worldCoordinate(subd.origin()); - // Coordinate nwe = igloc.worldCoordinate(subd.upperRight()); - // CartDomain2D swd (nwo, nwe - nwo); - // return GridLocation(igloc.projection()->pdata(), - // subd.extent() + Point (1, 1), swd); - - return new GridLocation(id, igloc, subd); - } } diff --git a/rpms/build/common/lookupRPM.sh b/rpms/build/common/lookupRPM.sh index c821172fda..a4ecd48f6e 100644 --- a/rpms/build/common/lookupRPM.sh +++ b/rpms/build/common/lookupRPM.sh @@ -117,6 +117,10 @@ function lookupRPM() fi # awips2 rpms. + if [ "${1}" = "Installer.ncep-database" ]; then + export RPM_SPECIFICATION="${awips2_core_dir}/Installer.ncep-database" + return 0 + fi if [ "${1}" = "awips2-adapt-native" ]; then export RPM_SPECIFICATION="${awips2_core_dir}/Installer.adapt-native" return 0