Merge branch 'omaha_13.5.1' (13.5.1-7) into development
Conflicts: cave/com.raytheon.uf.viz.datadelivery/src/com/raytheon/uf/viz/datadelivery/subscription/subset/GriddedSubsetManagerDlg.java cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesAction.java cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/MPEFieldResource.java cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/rsc/SatResource.java edexOsgi/com.raytheon.uf.common.pointdata/src/com/raytheon/uf/common/pointdata/spatial/SurfaceObsLocation.java edexOsgi/com.raytheon.uf.edex.datadelivery.bandwidth/src/com/raytheon/uf/edex/datadelivery/bandwidth/BandwidthManager.java ncep/gov.noaa.nws.ncep.viz.customProjection/META-INF/MANIFEST.MF rpms/awips2.cave/deploy.builder/build.sh Former-commit-id:c6386e306f
[formerly 293586df88f53c2ddf6f7586bf71719298728022] Former-commit-id:15d1a6eab0
This commit is contained in:
commit
401ed88e44
408 changed files with 164879 additions and 21757 deletions
25
RadarServer/com.raytheon.rcm.lib/src/com/raytheon/rcm/request/DefaultFilter.java
Executable file → Normal file
25
RadarServer/com.raytheon.rcm.lib/src/com/raytheon/rcm/request/DefaultFilter.java
Executable file → Normal file
|
@ -21,6 +21,18 @@ package com.raytheon.rcm.request;
|
|||
|
||||
import com.raytheon.rcm.config.RadarType;
|
||||
|
||||
/**
|
||||
* Filters the duplicate requests
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------ ---------- ----------- --------------------------
|
||||
* Initial creation
|
||||
* 062413 DR16023 zwang Support all cuts for nexrad
|
||||
* </pre>
|
||||
*/
|
||||
|
||||
/* Should ref CODE src/cpc104/lib003/product_attr_table */
|
||||
|
||||
public class DefaultFilter extends Filter {
|
||||
|
@ -298,6 +310,19 @@ public class DefaultFilter extends Filter {
|
|||
boolean elevEq = false;
|
||||
|
||||
if (elevList != null) {
|
||||
// If one of the request is an all cuts, perform exact comparison
|
||||
if ((a.getElevationSelection() == Request.ALL_ELEVATIONS &&
|
||||
a.getElevationAngle() != 0) ||
|
||||
(b.getElevationSelection() == Request.ALL_ELEVATIONS &&
|
||||
b.getElevationAngle() != 0)) {
|
||||
if (a.getElevationSelection() == b.getElevationSelection() &&
|
||||
a.getElevationAngle() == b.getElevationAngle() ) {
|
||||
return COMPLETE_MATCH;
|
||||
}
|
||||
else {
|
||||
return NO_MATCH;
|
||||
}
|
||||
}
|
||||
// If elevList is provided, compare equivalent elevation angles.
|
||||
if (a.getElevationSelection() == b.getElevationSelection()) {
|
||||
if (a.getElevationSelection() == Request.ALL_ELEVATIONS &&
|
||||
|
|
|
@ -24,11 +24,20 @@
|
|||
#
|
||||
# PlotSPCWatches
|
||||
#
|
||||
# This procedure synchonizes the hazards from SPC that are in the active table.
|
||||
# This procedure synchronizes the hazards from SPC that are in the active table.
|
||||
#
|
||||
#
|
||||
# Author: lefebvre
|
||||
# ----------------------------------------------------------------------------
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 06/18/13 #2083 dgilling Code cleanup, reinstated logging
|
||||
# for every hazard grid written.
|
||||
#
|
||||
########################################################################
|
||||
|
||||
# The MenuItems list defines the GFE menu item(s) under which the
|
||||
# Procedure is to appear.
|
||||
|
@ -41,9 +50,7 @@ import time
|
|||
import HazardUtils
|
||||
import logging
|
||||
import UFStatusHandler
|
||||
import JUtil
|
||||
from java.io import File
|
||||
from java.lang import System
|
||||
|
||||
|
||||
PLUGIN_NAME = 'com.raytheon.viz.gfe'
|
||||
CATEGORY = 'GFE'
|
||||
|
@ -62,8 +69,6 @@ class Procedure (SmartScript.SmartScript):
|
|||
nonSPCRecords = []
|
||||
spcRecords = []
|
||||
spcCANRecords = []
|
||||
areas = []
|
||||
marineAreas = []
|
||||
|
||||
vtecTable = self.vtecActiveTable()
|
||||
vtecTable = self._hazUtils._filterVTECBasedOnGFEMode(vtecTable)
|
||||
|
@ -74,9 +79,6 @@ class Procedure (SmartScript.SmartScript):
|
|||
othActions = ['NEW','CON','EXT','EXA','EXB','CAN','EXP','UPG']
|
||||
spcActionsCAN = ['CAN']
|
||||
|
||||
# Get the local WFO id
|
||||
siteId = self._dbss.getSiteID()
|
||||
|
||||
# step 1: Separate into SPC/nonSPC/spcCAN, keep only certain actions
|
||||
for v in vtecTable:
|
||||
# filter based on phen/sig
|
||||
|
@ -113,10 +115,10 @@ class Procedure (SmartScript.SmartScript):
|
|||
filteredSPCWatches = []
|
||||
|
||||
for spcRec in spcRecords:
|
||||
removeRecord = 0
|
||||
removeRecord = False
|
||||
for nonSPCRec in nonSPCRecords:
|
||||
if self._recordCompare(spcRec, nonSPCRec, compare):
|
||||
removeRecord = 1 #match found in nonSPCRecord
|
||||
removeRecord = True #match found in nonSPCRecord
|
||||
break
|
||||
if not removeRecord:
|
||||
filteredSPCWatches.append(spcRec)
|
||||
|
@ -186,8 +188,8 @@ class Procedure (SmartScript.SmartScript):
|
|||
#Records are dictionaries. Fields are assumed to exist in both recs.
|
||||
for f in fields:
|
||||
if rec1[f] != rec2[f]:
|
||||
return 0
|
||||
return 1
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def removeAllWatches(self):
|
||||
|
@ -255,6 +257,14 @@ class Procedure (SmartScript.SmartScript):
|
|||
return watch
|
||||
|
||||
|
||||
|
||||
def writeHazard(self, key, startTime, endTime, zones):
|
||||
timeRange = self._hazUtils._makeTimeRange(startTime, endTime)
|
||||
zoneMask = self._hazUtils._makeMask(zones)
|
||||
self._hazUtils._addHazard("Hazards", timeRange, key, zoneMask)
|
||||
self.log.info("{} {} {} {}".format(self._hazUtils._printTime(startTime),
|
||||
self._hazUtils._printTime(endTime), key, zones))
|
||||
|
||||
def execute(self):
|
||||
# get the hazard utilities
|
||||
self._hazUtils = HazardUtils.HazardUtils(self._dbss, None)
|
||||
|
@ -272,7 +282,8 @@ class Procedure (SmartScript.SmartScript):
|
|||
self.log.warning("There are temporary hazard grids loaded. " +\
|
||||
"Please merge all hazards grids before running PlotSPCWatches.")
|
||||
self.cancel()
|
||||
|
||||
|
||||
# hazard locked anywhere by others?
|
||||
if self.lockedByOther('Hazards', 'SFC'):
|
||||
self.log.warning("There are conflicting locks (red locks - owned by others) on Hazards. " + \
|
||||
"Please resolve these before running PlotSPCWatches")
|
||||
|
@ -281,45 +292,38 @@ class Procedure (SmartScript.SmartScript):
|
|||
watchTable = self.getWatches()
|
||||
self.removeAllWatches()
|
||||
|
||||
sumMakeTime = 0.0
|
||||
sumMakeMask = 0.0
|
||||
sumAddHazard = 0.0
|
||||
wtv = watchTable.values()
|
||||
# AWIPS2 porting note: to improve performance of this procedure, we've
|
||||
# made a deviation in how the phenomena from the active table are saved
|
||||
# to grids
|
||||
# We write to the hazards grid in batches. The batches are based on a
|
||||
# set of zones all having the same phen-sig, ETN, and valid time.
|
||||
watchTable = watchTable.values()
|
||||
def sortkey(x):
|
||||
key = x['phen'] + x['sig'] + str(x['etn']) + \
|
||||
str(self._hazUtils._makeTimeRange(x['startTime'], x['endTime'])) + \
|
||||
x['id']
|
||||
return key
|
||||
watchTable.sort(key=sortkey)
|
||||
|
||||
if len(wtv) > 0:
|
||||
def sortkey(x):
|
||||
key = x['phen'] + x['sig'] + str(x['etn']) + \
|
||||
str(self._hazUtils._makeTimeRange(x['startTime'], x['endTime'])) + \
|
||||
x['id']
|
||||
return key
|
||||
hazKeyToWrite = None
|
||||
hazStartToWrite = None
|
||||
hazEndToWrite = None
|
||||
hazZonesToWrite = []
|
||||
for zh in watchTable:
|
||||
key = zh['phen'] + '.' + zh['sig'] + ":" + str(zh['etn'])
|
||||
if key != hazKeyToWrite or zh['startTime'] != hazStartToWrite or zh['endTime'] != hazEndToWrite:
|
||||
# we have a new hazard, save the previously collected hazard
|
||||
# data to a grid.
|
||||
if hazZonesToWrite:
|
||||
self.writeHazard(hazKeyToWrite, hazStartToWrite, hazEndToWrite, hazZonesToWrite)
|
||||
hazZonesToWrite = []
|
||||
hazKeyToWrite = key
|
||||
hazStartToWrite = zh['startTime']
|
||||
hazEndToWrite = zh['endTime']
|
||||
hazZonesToWrite.append(zh['id'])
|
||||
|
||||
wtv.sort(key = sortkey)
|
||||
#for zone in watchTable.keys():
|
||||
# zh = watchTable[zone]
|
||||
prevKey = None
|
||||
prevStart = None
|
||||
prevEnd = None
|
||||
ids = []
|
||||
for zh in wtv:
|
||||
key = zh['phen'] + '.' + zh['sig'] + ":" + str(zh['etn'])
|
||||
if key != prevKey or zh['startTime'] != prevStart or zh['endTime'] != prevEnd:
|
||||
# new alert
|
||||
if len(ids) > 0:
|
||||
zoneMask = self._hazUtils._makeMask(ids)
|
||||
timeRange = self._hazUtils._makeTimeRange(prevStart, prevEnd)
|
||||
self._hazUtils._addHazard("Hazards", timeRange, prevKey, zoneMask)
|
||||
ids = []
|
||||
prevKey = key
|
||||
prevStart = zh['startTime']
|
||||
prevEnd = zh['endTime']
|
||||
ids.append(zh['id'])
|
||||
|
||||
# handle the last zones
|
||||
zoneMask = self._hazUtils._makeMask(ids)
|
||||
timeRange = self._hazUtils._makeTimeRange(prevStart, prevEnd)
|
||||
self._hazUtils._addHazard("Hazards", timeRange, prevKey, zoneMask)
|
||||
# LogStream.logEvent(self._hazUtils._printTime(zh['startTime']),
|
||||
# self._hazUtils._printTime(zh['endTime']),
|
||||
# key, zh['id'])
|
||||
# write the last set of collected hazard information to a grid
|
||||
if hazZonesToWrite:
|
||||
self.writeHazard(hazKeyToWrite, hazStartToWrite, hazEndToWrite, hazZonesToWrite)
|
||||
|
||||
return
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
##
|
||||
# This software was developed and / or modified by Raytheon Company,
|
||||
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
#
|
||||
#
|
||||
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
# This software product contains export-restricted data whose
|
||||
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
# to non-U.S. persons whether in the United States or abroad requires
|
||||
# an export license or other authorization.
|
||||
#
|
||||
#
|
||||
# Contractor Name: Raytheon Company
|
||||
# Contractor Address: 6825 Pine Street, Suite 340
|
||||
# Mail Stop B8
|
||||
# Omaha, NE 68106
|
||||
# 402.291.0100
|
||||
#
|
||||
#
|
||||
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
# further licensing information.
|
||||
##
|
||||
|
@ -28,15 +28,15 @@
|
|||
# ----------------------------------------------------------------------------
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 01/09/13 DR15626 J. Zeng Add methods
|
||||
# 01/09/13 DR15626 J. Zeng Add methods
|
||||
# enableISCsend
|
||||
# clientISCSendStatus
|
||||
# manualSendISC_autoMode
|
||||
# manualSendISC_manualMode
|
||||
# 01/30/13 1559 dgilling Fix TypeError in
|
||||
# 01/30/13 1559 dgilling Fix TypeError in
|
||||
# getGridCellSwath().
|
||||
# Mar 13, 2013 1791 bsteffen Implement bulk getGrids to
|
||||
# improve performance.
|
||||
|
@ -44,7 +44,9 @@
|
|||
# TCMWindTool
|
||||
# Apr 24, 2013 1947 randerso Fix UVToMagDir to work with scalar arguments
|
||||
# Cleaned up some constants
|
||||
#
|
||||
# Jun 21, 2013 14983 ryu Fixed encodeEditArea() to evaluate query
|
||||
# when necessary
|
||||
#
|
||||
########################################################################
|
||||
import types, string, time, sys
|
||||
from math import *
|
||||
|
@ -76,8 +78,8 @@ from com.raytheon.uf.common.dataplugin.gfe.db.objects import GridParmInfo
|
|||
from com.raytheon.uf.common.dataplugin.gfe.server.request import SendISCRequest
|
||||
|
||||
class SmartScript(BaseTool.BaseTool):
|
||||
|
||||
def __init__(self, dataMgr):
|
||||
|
||||
def __init__(self, dataMgr):
|
||||
BaseTool.BaseTool.__init__(self)
|
||||
self.__dataMgr = dataMgr
|
||||
self.__parmMgr = self.__dataMgr.getParmManager()
|
||||
|
@ -89,20 +91,20 @@ class SmartScript(BaseTool.BaseTool):
|
|||
#self.__pythonGrids = []
|
||||
self.__accessTime = 0
|
||||
self.__gridLoc = None
|
||||
self.__topoGrid = None
|
||||
self.__topoGrid = None
|
||||
self.__toolType = "numeric"
|
||||
self._empty = zeros(self.getGridShape(), float32)
|
||||
self._minus = self._empty - 1
|
||||
self._handlers = dict()
|
||||
self._handlers = dict()
|
||||
|
||||
|
||||
|
||||
##
|
||||
## Call ProcessVariableList to obtain values from the user
|
||||
##
|
||||
## @param VariableList: list() of tuples describing the widgets to display
|
||||
##
|
||||
## @return dict() of values gathered from the widgets
|
||||
##
|
||||
##
|
||||
def getVariableListInputs(self, VariableList):
|
||||
import ProcessVariableList
|
||||
return ProcessVariableList.buildWidgetList(VariableList)
|
||||
|
@ -150,7 +152,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
|
||||
|
||||
def loadedParms(self):
|
||||
# Returns a list of tuples that are weather elements that are
|
||||
# Returns a list of tuples that are weather elements that are
|
||||
# loaded. The tuples are (element, level, model). element and
|
||||
# level are strings. model is a DatabaseID.
|
||||
allParms = self.__parmMgr.getAllParms()
|
||||
|
@ -162,7 +164,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
return retList
|
||||
|
||||
def availableParms(self):
|
||||
# Returns a list of tuples that are weather elements that are
|
||||
# Returns a list of tuples that are weather elements that are
|
||||
# available. The tuples are (element, level, model). element and
|
||||
# level are strings. model is a DatabaseID.
|
||||
retList = []
|
||||
|
@ -191,7 +193,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
dbid))
|
||||
|
||||
return retList
|
||||
|
||||
|
||||
def loadParm(self, model, element, level, mostRecent=0):
|
||||
# loads a parm and makes it visible.
|
||||
parm = self.getParm(model, element, level, timeRange=None,
|
||||
|
@ -209,7 +211,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
# @type weName: String
|
||||
# @param level: The level of the element to look for locks on
|
||||
# @type level: String
|
||||
# @return: The time ranges
|
||||
# @return: The time ranges
|
||||
# @rtype: Python list of Python TimeRanges
|
||||
def lockedByMe(self, weName, level):
|
||||
# returns list of time ranges locked by me in this weather element
|
||||
|
@ -227,7 +229,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
tr = TimeRange.TimeRange(jtr)
|
||||
lbm.append(tr)
|
||||
return lbm
|
||||
|
||||
|
||||
##
|
||||
# Get the list of timeranges locked by other users in this weather element.
|
||||
#
|
||||
|
@ -235,7 +237,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
# @type weName: String
|
||||
# @param level: The level of the element to look for locks on
|
||||
# @type level: String
|
||||
# @return: The time ranges
|
||||
# @return: The time ranges
|
||||
# @rtype: Python list of Python TimeRanges
|
||||
def lockedByOther(self, weName, level):
|
||||
# returns list of time ranges locked by others in this weather element
|
||||
|
@ -270,7 +272,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
return 0
|
||||
else:
|
||||
return parm.forceLockTR(tr.toJavaObj())
|
||||
|
||||
|
||||
|
||||
def vtecActiveTable(self):
|
||||
#returns the VTEC active table (or specified table)
|
||||
|
@ -283,7 +285,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
#returns the current operating mode of the GFE.
|
||||
#Standard, PRACTICE, TEST
|
||||
return self.__dataMgr.getOpMode().name()
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# ISC control functions
|
||||
#------------------------------------------------------------------------
|
||||
|
@ -409,7 +411,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
|
||||
if isinstance(model, DatabaseID.DatabaseID):
|
||||
model = model.modelIdentifier()
|
||||
|
||||
|
||||
timeRangeList = None
|
||||
if isinstance(timeRange, TimeRange.TimeRange):
|
||||
timeRange = timeRange.toJavaObj()
|
||||
|
@ -448,9 +450,9 @@ class SmartScript(BaseTool.BaseTool):
|
|||
return retVal
|
||||
else:
|
||||
return self._getGridsResult(timeRange, noDataError, mode, exprName, result)
|
||||
|
||||
def _getGridsResult(self, timeRange, noDataError, mode, exprName, result):
|
||||
retVal = None
|
||||
|
||||
def _getGridsResult(self, timeRange, noDataError, mode, exprName, result):
|
||||
retVal = None
|
||||
if result is not None:
|
||||
if len(result) == 0:
|
||||
retVal = None
|
||||
|
@ -475,7 +477,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
retVal = (result[0], eval(result[1]))
|
||||
else:
|
||||
retVal = (result[0], result[1])
|
||||
|
||||
|
||||
if retVal is None or retVal == []:
|
||||
if noDataError == 1:
|
||||
msg = "No corresponding grids for " + exprName + " " + str(timeRange)
|
||||
|
@ -506,11 +508,11 @@ class SmartScript(BaseTool.BaseTool):
|
|||
history = grid.getHistory()
|
||||
histList = []
|
||||
for h in history:
|
||||
histList.append((str(h.getOrigin()),
|
||||
ParmID.ParmID(jParmId=h.getOriginParm()),
|
||||
histList.append((str(h.getOrigin()),
|
||||
ParmID.ParmID(jParmId=h.getOriginParm()),
|
||||
TimeRange.TimeRange(h.getOriginTimeRange()),
|
||||
AbsTime.AbsTime(h.getTimeModified()),
|
||||
str(h.getWhoModified()),
|
||||
AbsTime.AbsTime(h.getTimeModified()),
|
||||
str(h.getWhoModified()),
|
||||
AbsTime.AbsTime(h.getUpdateTime()),
|
||||
AbsTime.AbsTime(h.getPublishTime())))
|
||||
|
||||
|
@ -611,7 +613,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
from com.raytheon.viz.gfe.edittool import GridID
|
||||
gid = GridID(parm, gridTime.javaDate())
|
||||
from com.raytheon.uf.common.dataplugin.gfe.db.objects import GFERecord_GridType as GridType
|
||||
|
||||
|
||||
wxType = self.__dataMgr.getClient().getGridParmInfo(parm.getParmID()).getGridType()
|
||||
if GridType.SCALAR.equals(wxType):
|
||||
from com.raytheon.uf.common.dataplugin.gfe.slice import ScalarGridSlice
|
||||
|
@ -659,7 +661,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
# @type timeRange: com.raytheon.uf.common.time.TimeRange or TimeRange
|
||||
# @param mostRecentModel: whether to use current time in request expr.
|
||||
# @type mostRecentModel: integer or boolean
|
||||
# @return: Java GridParmInfo object
|
||||
# @return: Java GridParmInfo object
|
||||
def getGridInfo(self, model, element, level, timeRange,
|
||||
mostRecentModel=0):
|
||||
if isinstance(model, DatabaseID.DatabaseID):
|
||||
|
@ -815,11 +817,11 @@ class SmartScript(BaseTool.BaseTool):
|
|||
uw = - sin(dir * DEG_TO_RAD) * mag
|
||||
vw = - cos(dir * DEG_TO_RAD) * mag
|
||||
return (uw, vw)
|
||||
|
||||
|
||||
def convertMsecToKts(self, value_Msec):
|
||||
# Convert from meters/sec to Kts
|
||||
return value_Msec * 3600.0 / 1852.0
|
||||
|
||||
|
||||
def convertKtoF(self, t_K):
|
||||
# Convert the temperature from Kelvin to Fahrenheit
|
||||
# Degrees Fahrenheit = (Degrees Kelvin - 273.15) / (5/9) + 32
|
||||
|
@ -841,7 +843,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
def convertFtToM(self, value_Ft):
|
||||
# Convert the value in Feet to Meters
|
||||
return value_Ft * 0.3048
|
||||
|
||||
|
||||
#########################################################################
|
||||
## Error Handling ##
|
||||
#########################################################################
|
||||
|
@ -854,11 +856,11 @@ class SmartScript(BaseTool.BaseTool):
|
|||
# self.abort("Error processing my tool")
|
||||
#
|
||||
raise TypeError, info
|
||||
|
||||
|
||||
def noData(self, info="Insufficient Data to run Tool"):
|
||||
# Raise the NoData exception error
|
||||
raise Exceptions.EditActionError("NoData", info)
|
||||
|
||||
|
||||
def cancel(self):
|
||||
# Cancels a smart tool without displaying an error message
|
||||
raise Exceptions.EditActionError("Cancel", "Cancel")
|
||||
|
@ -875,7 +877,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
# or "A" (alert)
|
||||
# Example:
|
||||
# self.statusBarMsg("Running Smart Tool", "R")
|
||||
#
|
||||
#
|
||||
# @param message: The message to send.
|
||||
# @type message: string
|
||||
# @param status: Importance of message. "A"=Alert, "R"=Regular, "U"=Urgent;
|
||||
|
@ -887,7 +889,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
def statusBarMsg(self, message, status, category="GFE"):
|
||||
from com.raytheon.uf.common.status import UFStatus
|
||||
from com.raytheon.uf.common.status import UFStatus_Priority as Priority
|
||||
|
||||
|
||||
if "A" == status:
|
||||
importance = Priority.PROBLEM
|
||||
elif "R" == status:
|
||||
|
@ -896,10 +898,10 @@ class SmartScript(BaseTool.BaseTool):
|
|||
importance = Priority.CRITICAL
|
||||
else:
|
||||
importance = Priority.SIGNIFICANT
|
||||
|
||||
|
||||
if category not in self._handlers:
|
||||
self._handlers[category] = UFStatus.getHandler("GFE", category, 'GFE')
|
||||
|
||||
|
||||
self._handlers[category].handle(importance, message);
|
||||
|
||||
#########################
|
||||
|
@ -942,8 +944,8 @@ class SmartScript(BaseTool.BaseTool):
|
|||
## can be accessed e.g. error.errorType() and error.errorInfo()
|
||||
## If "noData" has been called, the errorType will be "NoData" and
|
||||
## can be tested by the calling tool or script.
|
||||
|
||||
|
||||
|
||||
|
||||
def callSmartTool(self, toolName, elementName, editArea=None,
|
||||
timeRange=None, varDict=None,
|
||||
editValues=1, calcArea=0, calcGrid=0,
|
||||
|
@ -977,25 +979,25 @@ class SmartScript(BaseTool.BaseTool):
|
|||
emptyEditAreaFlag = False
|
||||
if varDict is not None:
|
||||
varDict = str(varDict)
|
||||
|
||||
|
||||
parm = self.getParm(self.__mutableID, elementName, "SFC")
|
||||
if timeRange is None:
|
||||
from com.raytheon.viz.gfe.core.parm import ParmState
|
||||
timeRange = parm.getParmState().getSelectedTimeRange()
|
||||
else:
|
||||
timeRange = timeRange.toJavaObj()
|
||||
|
||||
|
||||
from com.raytheon.viz.gfe.smarttool import SmartUtil
|
||||
|
||||
result = SmartUtil.callFromSmartScript(self.__dataMgr, toolName, elementName, editArea,
|
||||
timeRange, varDict, emptyEditAreaFlag,
|
||||
JUtil.pylistToJavaStringList(passErrors),
|
||||
|
||||
result = SmartUtil.callFromSmartScript(self.__dataMgr, toolName, elementName, editArea,
|
||||
timeRange, varDict, emptyEditAreaFlag,
|
||||
JUtil.pylistToJavaStringList(passErrors),
|
||||
missingDataMode, parm)
|
||||
|
||||
|
||||
if result:
|
||||
raise Exceptions.EditActionError(errorType="Error", errorInfo=str(result))
|
||||
raise Exceptions.EditActionError(errorType="Error", errorInfo=str(result))
|
||||
return None
|
||||
|
||||
|
||||
def callProcedure(self, name, editArea=None, timeRange=None, varDict=None,
|
||||
missingDataMode="Stop",
|
||||
modal=1):
|
||||
|
@ -1007,18 +1009,18 @@ class SmartScript(BaseTool.BaseTool):
|
|||
timeRange = JavaTimeRange()
|
||||
else:
|
||||
timeRange = timeRange.toJavaObj()
|
||||
|
||||
|
||||
from com.raytheon.viz.gfe.procedures import ProcedureUtil
|
||||
if varDict:
|
||||
varDict = str(varDict)
|
||||
|
||||
result = ProcedureUtil.callFromSmartScript(self.__dataMgr, name, editArea, timeRange, varDict)
|
||||
|
||||
|
||||
# callSmartTool raises the exception put here it is returned.
|
||||
if result:
|
||||
return Exceptions.EditActionError(errorType="Error", errorInfo=str(result))
|
||||
return None
|
||||
|
||||
return Exceptions.EditActionError(errorType="Error", errorInfo=str(result))
|
||||
return None
|
||||
|
||||
|
||||
###########################
|
||||
## Creating On-the-fly elements
|
||||
|
@ -1035,19 +1037,19 @@ class SmartScript(BaseTool.BaseTool):
|
|||
# If the model and element do not already exist, creates them on-the-fly
|
||||
#
|
||||
# The descriptiveName, timeConstraints, precision, minAllowedValue,
|
||||
# maxAllowedValue, units, rateParm, discreteKeys, discreteOverlap,
|
||||
# maxAllowedValue, units, rateParm, discreteKeys, discreteOverlap,
|
||||
# and discreteAuxDataLength only need to be
|
||||
# specified for the first grid being created. These
|
||||
# values are ignored for subsequent calls to createGrid() for
|
||||
# specified for the first grid being created. These
|
||||
# values are ignored for subsequent calls to createGrid() for
|
||||
# the same weather element.
|
||||
|
||||
# For new parms, the defaultColorTable is the one to be used for
|
||||
# For new parms, the defaultColorTable is the one to be used for
|
||||
# display. If not specified and not in the gfe configuration file,
|
||||
# a DEFAULT color table will be used.
|
||||
|
||||
# DISCRETE elements require a definition for discreteKeys,
|
||||
# discreteAuxDataLength, and discreteOverlap. For DISCRETE, the
|
||||
# precision, minAllowedValue, maxAllowedValue, and rateParm
|
||||
# discreteAuxDataLength, and discreteOverlap. For DISCRETE, the
|
||||
# precision, minAllowedValue, maxAllowedValue, and rateParm
|
||||
# are ignored.
|
||||
|
||||
# Note that this works for numeric grids only.
|
||||
|
@ -1126,9 +1128,9 @@ class SmartScript(BaseTool.BaseTool):
|
|||
timeConstraints.getStartTime())
|
||||
if precision is None:
|
||||
precision = exampleGPI.getPrecision()
|
||||
if maxAllowedValue is None:
|
||||
if maxAllowedValue is None:
|
||||
maxAllowedValue = exampleGPI.getMaxValue()
|
||||
if minAllowedValue is None:
|
||||
if minAllowedValue is None:
|
||||
minAllowedValue = exampleGPI.getMinValue()
|
||||
if units is None:
|
||||
units = exampleGPI.getUnitString()
|
||||
|
@ -1174,7 +1176,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
from com.raytheon.viz.gfe import Activator
|
||||
prefName = element + "_defaultColorTable"
|
||||
Activator.getDefault().getPreferenceStore().setValue(prefName, defaultColorTable)
|
||||
|
||||
|
||||
#create the parm
|
||||
parm = self.__parmMgr.createVirtualParm(pid, gpi, None, 1, 1)
|
||||
|
||||
|
@ -1212,7 +1214,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
ngZero = numericGrid[0].astype(float32)
|
||||
ngOne = numericGrid[1].astype(float32)
|
||||
javaGrid = Grid2DFloat.createGrid(ngZero.shape[1], ngZero.shape[0], ngZero)
|
||||
auxJavaGrid = Grid2DFloat.createGrid(ngOne.shape[1], ngOne.shape[0], ngOne)
|
||||
auxJavaGrid = Grid2DFloat.createGrid(ngOne.shape[1], ngOne.shape[0], ngOne)
|
||||
else:
|
||||
raise ValueError, "Unknown elementType: %s" % elementType
|
||||
|
||||
|
@ -1223,7 +1225,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
parm.replaceGriddedData(timeRange, gridData)
|
||||
|
||||
##
|
||||
#
|
||||
#
|
||||
# @param model: Model name
|
||||
# @type model: string
|
||||
# @param element: Element name
|
||||
|
@ -1253,7 +1255,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
# color. If "on" is 0, turn off the highlight.
|
||||
parm = self.getParm(model, element, level)
|
||||
from com.raytheon.viz.gfe.core.msgs import HighlightMsg
|
||||
|
||||
|
||||
trs = jep.jarray(1, javaTimeRange)
|
||||
trs[0] = timeRange.toJavaObj()
|
||||
HighlightMsg(parm, trs, on, color).send()
|
||||
|
@ -1337,7 +1339,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
# returns most recent NAM12 model
|
||||
result = self.__parmMgr.findDatabase(databaseName, version)
|
||||
if result is not None:
|
||||
result = DatabaseID.DatabaseID(result)
|
||||
result = DatabaseID.DatabaseID(result)
|
||||
return result
|
||||
|
||||
def getDatabase(self, databaseString):
|
||||
|
@ -1372,7 +1374,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
# timeRange = self.createTimeRange(0,121,"Zulu")
|
||||
# databaseID = self.findDatabase("NAM12")
|
||||
# timeRange = self.createTimeRange(120,241,"Database",databaseID)
|
||||
|
||||
|
||||
if mode == "Database" and dbID is None:
|
||||
raise TypeError("SmartScript createTimeRange: " + \
|
||||
"Must specify a database ID for mode=Database")
|
||||
|
@ -1382,12 +1384,12 @@ class SmartScript(BaseTool.BaseTool):
|
|||
gmTime = time.mktime(time.gmtime())
|
||||
localAbsTime = AbsTime.AbsTime(localTime)
|
||||
delta = localTime - gmTime
|
||||
|
||||
|
||||
todayMidnight = AbsTime.absTimeYMD(localAbsTime.year, localAbsTime.month,
|
||||
localAbsTime.day)
|
||||
start = todayMidnight + (startHour * 3600) - delta
|
||||
end = todayMidnight + (endHour * 3600) - delta
|
||||
return TimeRange.TimeRange(start, end)
|
||||
return TimeRange.TimeRange(start, end)
|
||||
elif mode == "Database" and dbID.toJavaObj().getModelTime() != "00000000_0000":
|
||||
start = dbID.modelTime() + (startHour * 3600)
|
||||
end = dbID.modelTime() + (endHour * 3600)
|
||||
|
@ -1454,7 +1456,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
zoneName = time.strftime("%Z", localTime)
|
||||
display = string.replace(display, "GMT", zoneName)
|
||||
return display
|
||||
|
||||
|
||||
def _shiftedTimeRange(self, timeRange):
|
||||
localTime, shift = self._determineTimeShift()
|
||||
return TimeRange.TimeRange(timeRange.startTime() + shift,
|
||||
|
@ -1474,11 +1476,11 @@ class SmartScript(BaseTool.BaseTool):
|
|||
''' Assumes date (default is current Simulate Time) is a UTC time to convert
|
||||
to the time zone tz (default is Site Time Zone).
|
||||
returns datetime
|
||||
|
||||
|
||||
This should be used instead of time.localtime()
|
||||
'''
|
||||
from pytz import timezone
|
||||
|
||||
|
||||
if tz is None:
|
||||
tzname = self.__dataMgr.getClient().getSiteTimeZone()
|
||||
tz = timezone(tzname)
|
||||
|
@ -1490,13 +1492,13 @@ class SmartScript(BaseTool.BaseTool):
|
|||
|
||||
def _gmtime(self, date=None):
|
||||
''' This takes date (default current Simulated Time) and converts it to AbsTime
|
||||
|
||||
|
||||
This should be used instead of time.gmtime()
|
||||
'''
|
||||
if date is None:
|
||||
date = SimulatedTime.getSystemTime().getTime()
|
||||
return AbsTime.AbsTime(date)
|
||||
|
||||
|
||||
def dayTime(self, timeRange, startHour=6, endHour=18):
|
||||
# Return 1 if start of timeRange is between the
|
||||
# startHour and endHour, Return 0 otherwise.
|
||||
|
@ -1508,7 +1510,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
return 1
|
||||
else:
|
||||
return 0
|
||||
|
||||
|
||||
def determineTimeShift(self):
|
||||
loctime, shift = self._determineTimeShift()
|
||||
return shift
|
||||
|
@ -1527,7 +1529,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
|
||||
def saveEditArea(self, editAreaName, refData):
|
||||
# Saves the AFPS.ReferenceData object with the given name
|
||||
|
||||
|
||||
from com.raytheon.uf.common.dataplugin.gfe.reference import ReferenceData, ReferenceID
|
||||
refID = ReferenceID(editAreaName)
|
||||
refData = ReferenceData(refData.getGloc(), refID, refData.getGrid())
|
||||
|
@ -1542,13 +1544,13 @@ class SmartScript(BaseTool.BaseTool):
|
|||
def getActiveEditArea(self):
|
||||
# Get the AFPS.ReferenceData area for the active one in the GFE
|
||||
return self.__dataMgr.getRefManager().getActiveRefSet()
|
||||
|
||||
|
||||
def clearActiveEditArea(self):
|
||||
# Clear the active edit area in the GFE
|
||||
#area = AFPS.ReferenceData_default()
|
||||
#self.__dataMgr.referenceSetMgr().setActiveRefSet(area)
|
||||
self.__dataMgr.getRefManager().clearRefSet()
|
||||
|
||||
|
||||
def setActiveElement(self, model, element, level, timeRange,
|
||||
colorTable=None, minMax=None, fitToData=0):
|
||||
# Set the given element to the active one in the GFE
|
||||
|
@ -1589,7 +1591,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
fitter.fitToData()
|
||||
spatialMgr.activateParm(parm)
|
||||
spatialMgr.setSpatialEditorTime(timeRange.startTime().javaDate())
|
||||
|
||||
|
||||
|
||||
def getActiveElement(self):
|
||||
return self.__dataMgr.getSpatialDisplayManager().getActivatedParm()
|
||||
|
@ -1616,11 +1618,11 @@ class SmartScript(BaseTool.BaseTool):
|
|||
|
||||
def getLatLon(self, x, y):
|
||||
# Get the latitude/longitude values for the given grid point
|
||||
from com.vividsolutions.jts.geom import Coordinate
|
||||
from com.vividsolutions.jts.geom import Coordinate
|
||||
coords = Coordinate(float(x), float(y))
|
||||
cc2D = self.getGridLoc().latLonCenter(coords)
|
||||
return cc2D.y, cc2D.x
|
||||
|
||||
|
||||
def getLatLonGrids(self):
|
||||
gridLoc = self.getGridLoc()
|
||||
latLonGrid = gridLoc.getLatLonGrid().__numpy__[0];
|
||||
|
@ -1675,10 +1677,10 @@ class SmartScript(BaseTool.BaseTool):
|
|||
# of the variations, see the "getValue" documentation above.
|
||||
|
||||
siteID = self.__mutableID.siteID()
|
||||
if type(model) is types.StringType:
|
||||
if type(model) is types.StringType:
|
||||
modelStr = model
|
||||
else:
|
||||
# Must be a databaseID, so get model string
|
||||
# Must be a databaseID, so get model string
|
||||
modelStr = model.modelName()
|
||||
if element == "Topo" or modelStr == self.__mutableID.modelName():
|
||||
exprName = element
|
||||
|
@ -1739,7 +1741,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
#print "Expression Name", exprName
|
||||
parm = self.__parmMgr.getParmInExpr(exprName, 1)
|
||||
return parm
|
||||
|
||||
|
||||
def getParmByExpr(self, exprName):
|
||||
#print "Expression Name", exprName
|
||||
parm = self.__parmMgr.getParmInExpr(exprName, 1)
|
||||
|
@ -1748,14 +1750,14 @@ class SmartScript(BaseTool.BaseTool):
|
|||
##
|
||||
# @param elementNames: ignored
|
||||
#
|
||||
# @deprecated: Cacheing is controlled by the system.
|
||||
# @deprecated: Cacheing is controlled by the system.
|
||||
def cacheElements(self, elementNames):
|
||||
pass
|
||||
|
||||
##
|
||||
# Cacheing is controlled by the system. Users may still call this method
|
||||
# Cacheing is controlled by the system. Users may still call this method
|
||||
# to delete temporary parms in the parm manager.
|
||||
#
|
||||
#
|
||||
# @param elementNames: ignored
|
||||
def unCacheElements(self, elementNames):
|
||||
self.__parmMgr.deleteTemporaryParms()
|
||||
|
@ -1808,12 +1810,12 @@ class SmartScript(BaseTool.BaseTool):
|
|||
recList = self.__dataMgr.getClient().getGridInventory(parm.getParmID())
|
||||
publishTimeRange = timeRange
|
||||
if recList is not None:
|
||||
recSize = recList.size()
|
||||
recSize = recList.size()
|
||||
for x in range(recSize):
|
||||
tr = TimeRange.TimeRange(recList.get(x))
|
||||
if tr.overlaps(timeRange):
|
||||
if tr.overlaps(timeRange):
|
||||
publishTimeRange = publishTimeRange.combineWith(tr)
|
||||
|
||||
|
||||
cgr = CommitGridRequest(parm.getParmID(), publishTimeRange.toJavaObj())
|
||||
requests.add(cgr)
|
||||
resp = self.__dataMgr.getClient().commitGrid(requests)
|
||||
|
@ -1825,7 +1827,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
p = self.__parmMgr.getParm(pid)
|
||||
if not p:
|
||||
p = self.__parmMgr.addParm(pid, False, False)
|
||||
p.inventoryArrived(notify.getReplacementTimeRange(), notify.getHistories())
|
||||
p.inventoryArrived(notify.getReplacementTimeRange(), notify.getHistories())
|
||||
|
||||
def combineMode(self):
|
||||
from com.raytheon.viz.gfe.core.parm import ParmState
|
||||
|
@ -1884,7 +1886,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
prefs = Activator.getDefault().getPreferenceStore()
|
||||
if prefs.contains(itemName):
|
||||
if prefs.isString(itemName):
|
||||
return str(prefs.getString(itemName))
|
||||
return str(prefs.getString(itemName))
|
||||
elif prefs.isInt(itemName):
|
||||
return prefs.getInt(itemName)
|
||||
elif prefs.isFloat(itemName):
|
||||
|
@ -1941,7 +1943,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
def getTopo(self):
|
||||
# Return the numeric topo grid
|
||||
if self.__topoGrid is None:
|
||||
topo = self.__parmMgr.getParmInExpr("Topo", True)
|
||||
topo = self.__parmMgr.getParmInExpr("Topo", True)
|
||||
self.__topoGrid = self.__cycler.getCorrespondingResult(
|
||||
topo, TimeRange.allTimes().toJavaObj(), "TimeWtAverage")[0]
|
||||
self.__topoGrid = self.__topoGrid.getGridSlice().__numpy__[0]
|
||||
|
@ -2019,7 +2021,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
##
|
||||
# Get the index of uglyStr within keys.
|
||||
# This routine compares normalized (sorted) versions of uglyStr and
|
||||
# keys to be sure that equivalent hazards are assigned the same grid
|
||||
# keys to be sure that equivalent hazards are assigned the same grid
|
||||
# index.
|
||||
# When a matching key is not in keys, uglyStr will be added to keys
|
||||
# and the index of the new entry will be returned.
|
||||
|
@ -2029,7 +2031,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
# @param keys: Existing hazard keys
|
||||
# @type keys: list
|
||||
# @return: The index of a key equivalent to uglyStr in keys
|
||||
# @rtype: int
|
||||
# @rtype: int
|
||||
def getIndex(self, uglyStr, keys):
|
||||
# Returns the byte value that corresponds to the
|
||||
# given ugly string. It will add a new key if a new ugly
|
||||
|
@ -2052,7 +2054,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
# The ugly strings are also used by DISCRETE. The keys are
|
||||
# separated by '^' for the subkeys.
|
||||
# 18 Nov 2005 - tl
|
||||
# Added sorting to ugly strings to prevent duplicate keys
|
||||
# Added sorting to ugly strings to prevent duplicate keys
|
||||
# Duplicate keys causes a bug when generating hazards grids.
|
||||
|
||||
sortedUglyStr = self.sortUglyStr(uglyStr)
|
||||
|
@ -2074,6 +2076,10 @@ class SmartScript(BaseTool.BaseTool):
|
|||
# "editArea" can be a named area or a referenceData object
|
||||
if type(editArea) is types.StringType:
|
||||
editArea = self.getEditArea(editArea)
|
||||
|
||||
if editArea.isQuery():
|
||||
editArea = self.__refSetMgr.evaluateQuery(editArea.getQuery())
|
||||
|
||||
return editArea.getGrid().__numpy__[0]
|
||||
|
||||
def decodeEditArea(self, mask):
|
||||
|
@ -2086,7 +2092,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
bytes = mask.astype('int8')
|
||||
grid = Grid2DBit.createBitGrid(nx, ny, bytes)
|
||||
return ReferenceData(gridLoc, ReferenceID("test"), grid)
|
||||
|
||||
|
||||
|
||||
def getindicies(self, o, l):
|
||||
if o > 0:
|
||||
|
@ -2147,7 +2153,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
gridLoc = self.__parmMgr.compositeGridLocation()
|
||||
gridShape = (gridLoc.getNy().intValue(), gridLoc.getNx().intValue())
|
||||
return gridShape
|
||||
|
||||
|
||||
#########################################################################
|
||||
## Procedure methods ##
|
||||
#########################################################################
|
||||
|
@ -2203,7 +2209,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
# Example:
|
||||
# databaseID = self.findDatabase("NAM12") # Most recent NAM12 model
|
||||
# timeRange = self.createTimeRange(0, 49, "Database", databaseID)
|
||||
# self.copyToCmd([('MaxT', 'T'), ('T', 'MinT')], databaseID,
|
||||
# self.copyToCmd([('MaxT', 'T'), ('T', 'MinT')], databaseID,
|
||||
# timeRange)
|
||||
# will copy the Max Temperature into T and T into MinT.
|
||||
# from the latest NAM12 and place them into the forecast.
|
||||
|
@ -2383,10 +2389,10 @@ class SmartScript(BaseTool.BaseTool):
|
|||
for element in elements:
|
||||
self.__parmOp.fragmentCmd(element, timeRange)
|
||||
|
||||
def assignValueCmd(self, elements, timeRange, value):
|
||||
def assignValueCmd(self, elements, timeRange, value):
|
||||
from com.raytheon.viz.gfe.core.wxvalue import ScalarWxValue, VectorWxValue, WeatherWxValue
|
||||
if isinstance(timeRange, TimeRange.TimeRange):
|
||||
timeRange = timeRange.toJavaObj()
|
||||
timeRange = timeRange.toJavaObj()
|
||||
for element in elements:
|
||||
parm = self.__parmMgr.getParmInExpr(element, 1)
|
||||
if type(value) == types.TupleType:
|
||||
|
@ -2394,8 +2400,8 @@ class SmartScript(BaseTool.BaseTool):
|
|||
elif type(value) == types.StringType:
|
||||
newvalue = WeatherKey(value)
|
||||
newvalue = WeatherWxValue(newvalue, parm)
|
||||
else:
|
||||
newvalue = ScalarWxValue(float(value), parm)
|
||||
else:
|
||||
newvalue = ScalarWxValue(float(value), parm)
|
||||
self.__parmOp.assignValueCmd(element, timeRange, newvalue)
|
||||
|
||||
def __getUserFile(self, name, category):
|
||||
|
@ -2407,10 +2413,10 @@ class SmartScript(BaseTool.BaseTool):
|
|||
lc = pathMgr.getContext(LocalizationType.valueOf('CAVE_STATIC'), LocalizationLevel.valueOf('USER'))
|
||||
lf = pathMgr.getLocalizationFile(lc, path)
|
||||
return lf
|
||||
|
||||
|
||||
|
||||
|
||||
def saveObject(self, name, object, category):
|
||||
import cPickle
|
||||
import cPickle
|
||||
# Save a Python object (e.g. a Numeric grid)
|
||||
# in the server under the given name
|
||||
# Example:
|
||||
|
@ -2421,25 +2427,25 @@ class SmartScript(BaseTool.BaseTool):
|
|||
idx = fullpath.rfind("/")
|
||||
if not os.path.exists(fullpath[:idx]):
|
||||
os.makedirs(fullpath[:idx])
|
||||
openfile = open(fullpath, 'w')
|
||||
openfile = open(fullpath, 'w')
|
||||
cPickle.dump(object, openfile)
|
||||
openfile.close()
|
||||
openfile.close()
|
||||
lf.save()
|
||||
|
||||
|
||||
def getObject(self, name, category):
|
||||
import cPickle
|
||||
import cPickle
|
||||
# Returns the given object stored in the server
|
||||
# Example:
|
||||
# discrepancyValueGrid = self.getObject("MyGrid","DiscrepancyValueGrids")
|
||||
#
|
||||
#
|
||||
lf = self.__getUserFile(name, category)
|
||||
fullpath = lf.getFile().getPath()
|
||||
openfile = open(fullpath, 'r')
|
||||
obj = cPickle.load(openfile)
|
||||
openfile.close()
|
||||
openfile = open(fullpath, 'r')
|
||||
obj = cPickle.load(openfile)
|
||||
openfile.close()
|
||||
return obj
|
||||
|
||||
def deleteObject(self, name, category):
|
||||
def deleteObject(self, name, category):
|
||||
# Delete the given object stored in the server
|
||||
# Example:
|
||||
# self.deleteObject("MyGrid", "DiscrepancyValueGrids")
|
||||
|
@ -2459,7 +2465,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
return a
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
def availableDatabases(self):
|
||||
dbs = []
|
||||
availDbs = self.__parmMgr.getAvailableDbs()
|
||||
|
@ -2467,7 +2473,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
dbId = availDbs.get(i)
|
||||
dbs.append(DatabaseID.DatabaseID(dbId))
|
||||
return dbs
|
||||
|
||||
|
||||
def knownOfficeTypes(self):
|
||||
import JUtil
|
||||
return JUtil.javaStringListToPylist(self.__dataMgr.knownOfficeTypes())
|
||||
|
@ -2475,7 +2481,7 @@ class SmartScript(BaseTool.BaseTool):
|
|||
# Retrieves a text product from the text database
|
||||
def getTextProductFromDB(self, productID):
|
||||
from com.raytheon.viz.gfe.product import TextDBUtil
|
||||
|
||||
|
||||
opMode = self.gfeOperatingMode()=="OPERATIONAL"
|
||||
fullText = TextDBUtil.retrieveProduct(productID, opMode)
|
||||
textList = fullText.splitlines(True)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<predefinedArea areaName="Atlantic-FullBasin" mapCenter="-43.5 40.4 0.0">
|
||||
<zoomLevel>0.4</zoomLevel>
|
||||
<gridGeometry envelopeMaxY="1.3E7" envelopeMinY="-1.3E7" envelopeMaxX="1.3E7" envelopeMinX="-1.3E7" rangeY="0 9999" rangeX="0 9999">
|
||||
<CRS>PROJCS["Lambert_Conformal_Conic_2SP",
|
||||
<CRS>PROJCS["Lambert_Conformal_Conic_1SP",
|
||||
GEOGCS["WGS84",
|
||||
DATUM["WGS84",
|
||||
SPHEROID["WGS84", 6378137.0, 298.257223563]],
|
||||
|
@ -10,12 +10,11 @@
|
|||
UNIT["degree", 0.017453292519943295],
|
||||
AXIS["Geodetic longitude", EAST],
|
||||
AXIS["Geodetic latitude", NORTH]],
|
||||
PROJECTION["Lambert_Conformal_Conic_2SP"],
|
||||
PROJECTION["Lambert_Conformal_Conic_1SP"],
|
||||
PARAMETER["semi_major", 6371200.0],
|
||||
PARAMETER["semi_minor", 6371200.0],
|
||||
PARAMETER["central_meridian", -43.5],
|
||||
PARAMETER["latitude_of_origin", 30.0],
|
||||
PARAMETER["standard_parallel_1", 30.0],
|
||||
PARAMETER["scale_factor", 1.0],
|
||||
PARAMETER["false_easting", 0.0],
|
||||
PARAMETER["false_northing", 0.0],
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<predefinedArea areaName="Pacific-FullBasin" mapCenter="-169.5 40.5 0.0" >
|
||||
<zoomLevel>0.4</zoomLevel>
|
||||
<gridGeometry envelopeMaxY="1.3E7" envelopeMinY="-1.3E7" envelopeMaxX="1.3E7" envelopeMinX="-1.3E7" rangeY="0 9999" rangeX="0 9999">
|
||||
<CRS>PROJCS["Lambert_Conformal_Conic_2SP",
|
||||
<CRS>PROJCS["Lambert_Conformal_Conic_1SP",
|
||||
GEOGCS["WGS84",
|
||||
DATUM["WGS84",
|
||||
SPHEROID["WGS84", 6378137.0, 298.257223563]],
|
||||
|
@ -10,12 +10,11 @@
|
|||
UNIT["degree", 0.017453292519943295],
|
||||
AXIS["Geodetic longitude", EAST],
|
||||
AXIS["Geodetic latitude", NORTH]],
|
||||
PROJECTION["Lambert_Conformal_Conic_2SP"],
|
||||
PROJECTION["Lambert_Conformal_Conic_1SP"],
|
||||
PARAMETER["semi_major", 6371200.0],
|
||||
PARAMETER["semi_minor", 6371200.0],
|
||||
PARAMETER["central_meridian", -169.5],
|
||||
PARAMETER["latitude_of_origin", 30.0],
|
||||
PARAMETER["standard_parallel_1", 30.0],
|
||||
PARAMETER["scale_factor", 1.0],
|
||||
PARAMETER["false_easting", 0.0],
|
||||
PARAMETER["false_northing", 0.0],
|
||||
|
|
|
@ -232,10 +232,10 @@
|
|||
<geog_area_name>WORLD </geog_area_name>
|
||||
<center_lat>14.00</center_lat>
|
||||
<center_lon>175.00</center_lon>
|
||||
<lower_left_lat>-90.00</lower_left_lat>
|
||||
<lower_left_lon>-24.00</lower_left_lon>
|
||||
<upper_right_lat>90.00</upper_right_lat>
|
||||
<upper_right_lon>-24.00</upper_right_lon>
|
||||
<lower_left_lat>-89.99</lower_left_lat>
|
||||
<lower_left_lon>-24.01</lower_left_lon>
|
||||
<upper_right_lat>89.99</upper_right_lat>
|
||||
<upper_right_lon>-23.99</upper_right_lon>
|
||||
<map_projection_string> CED</map_projection_string>
|
||||
</geographical_data>
|
||||
|
||||
|
@ -257,9 +257,9 @@
|
|||
<center_lat>0.00</center_lat>
|
||||
<center_lon>180.00</center_lon>
|
||||
<lower_left_lat>-90.00</lower_left_lat>
|
||||
<lower_left_lon>0.00</lower_left_lon>
|
||||
<lower_left_lon>.01</lower_left_lon>
|
||||
<upper_right_lat>90.00</upper_right_lat>
|
||||
<upper_right_lon>0.00</upper_right_lon>
|
||||
<upper_right_lon>-0.01</upper_right_lon>
|
||||
<map_projection_string> CED</map_projection_string>
|
||||
</geographical_data>
|
||||
|
||||
|
@ -653,9 +653,9 @@
|
|||
<center_lat>14.00</center_lat>
|
||||
<center_lon>175.00</center_lon>
|
||||
<lower_left_lat>-70.00</lower_left_lat>
|
||||
<lower_left_lon>58.00</lower_left_lon>
|
||||
<lower_left_lon>58.01</lower_left_lon>
|
||||
<upper_right_lat>70.00</upper_right_lat>
|
||||
<upper_right_lon>58.00</upper_right_lon>
|
||||
<upper_right_lon>57.99</upper_right_lon>
|
||||
<map_projection_string> MER//NM</map_projection_string>
|
||||
</geographical_data>
|
||||
|
||||
|
@ -665,9 +665,9 @@
|
|||
<center_lat>0.00</center_lat>
|
||||
<center_lon>0.00</center_lon>
|
||||
<lower_left_lat>-70.00</lower_left_lat>
|
||||
<lower_left_lon>-131.00</lower_left_lon>
|
||||
<lower_left_lon>-130.99</lower_left_lon>
|
||||
<upper_right_lat>70.00</upper_right_lat>
|
||||
<upper_right_lon>-131.00</upper_right_lon>
|
||||
<upper_right_lon>-131.01</upper_right_lon>
|
||||
<map_projection_string> MER//NM</map_projection_string>
|
||||
</geographical_data>
|
||||
|
||||
|
@ -677,9 +677,9 @@
|
|||
<center_lat>14.00</center_lat>
|
||||
<center_lon>175.00</center_lon>
|
||||
<lower_left_lat>-70.00</lower_left_lat>
|
||||
<lower_left_lon>70.00</lower_left_lon>
|
||||
<lower_left_lon>69.99</lower_left_lon>
|
||||
<upper_right_lat>70.00</upper_right_lat>
|
||||
<upper_right_lon>70.00</upper_right_lon>
|
||||
<upper_right_lon>70.01</upper_right_lon>
|
||||
<map_projection_string> MER//NM</map_projection_string>
|
||||
</geographical_data>
|
||||
|
||||
|
@ -689,9 +689,9 @@
|
|||
<center_lat>14.00</center_lat>
|
||||
<center_lon>175.00</center_lon>
|
||||
<lower_left_lat>-70.00</lower_left_lat>
|
||||
<lower_left_lon>58.00</lower_left_lon>
|
||||
<lower_left_lon>58.01</lower_left_lon>
|
||||
<upper_right_lat>70.00</upper_right_lat>
|
||||
<upper_right_lon>58.00</upper_right_lon>
|
||||
<upper_right_lon>57.99</upper_right_lon>
|
||||
<map_projection_string> MER</map_projection_string>
|
||||
</geographical_data>
|
||||
|
||||
|
@ -1292,7 +1292,7 @@
|
|||
<lower_left_lon>-127.00</lower_left_lon>
|
||||
<upper_right_lat>50.00</upper_right_lat>
|
||||
<upper_right_lon>-59.00</upper_right_lon>
|
||||
<map_projection_string> LCC/39;-100;0</map_projection_string>
|
||||
<map_projection_string> LCC/39;-100;39</map_projection_string>
|
||||
</geographical_data>
|
||||
|
||||
<geographical_data>
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
! This is an ordered list of names of Predefined Areas to be made available
|
||||
! from the Areas main menu. Note : these are the Area Names and not file names.
|
||||
! All Predefined Area must be stored under Localization in the
|
||||
! ncep/PredefinedAreas directory. Also note that a referenced area name can
|
||||
! be stored at any localization level but the highest priority level area will
|
||||
! be displayed when selected
|
||||
!
|
||||
!Local
|
||||
US
|
||||
BasicWX_US
|
||||
North_America
|
||||
N_Hemisphere
|
||||
Alaska
|
||||
Hawaii
|
||||
Caribbean
|
||||
Atlantic-Western
|
||||
Atlantic-North
|
||||
Atlantic-Tropical
|
||||
Atlantic-FullBasin
|
||||
Pacific-Eastern
|
||||
Pacific-North
|
||||
Pacific-Tropical
|
||||
Pacific-FullBasin
|
||||
Canada
|
||||
Europe
|
||||
South_America
|
||||
Africa
|
||||
World
|
||||
World0
|
|
@ -0,0 +1,167 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<areaMenus showImageBasedResourceAreas="true" showDisplayAreas="true">
|
||||
|
||||
<!-- this file will specify which areas will be presented in the Areas main menu.
|
||||
The Source and areaName are required to define what and how to generate the area information.
|
||||
The Sources are defined by the areaProvider extension point defined in the gov.noaa.nws.ncep.viz.common
|
||||
project. Current valid sources are :
|
||||
PREDEFINED_AREA : areaName will be the name of an xml file in the PredefinedAreas localization directory.
|
||||
GEMPAK_GEOG_AREA_CODE : areaName will be a geog_code entry in the geog.xml file.
|
||||
GEMPAK_GEOG_AREA_NAME : areaName will be a geog_area_name in the geog.xml file.
|
||||
GEMPAK_SFC_STN_ID : areaName will be the stnid from the sfstns.xml file.(to be superceded by common_obs_spatial sources)
|
||||
GEMPAK_SFC_STN_NUM (not implemented)
|
||||
GEMPAK_SFC_STN_NAME (not implemented)
|
||||
MCIDAS_AREA_NAME : areaName is the name of an entry in the mcidas areaNames db table.
|
||||
GINI_SECTOR_ID : areaName is the name of an entry in the satellite sector_ids table.
|
||||
METAR_STATION_ID : areaName is the name of a 'stationId' in the common_obs_spatial db (where catalogtype=1)
|
||||
SYNOP_STATION_ID : 'stationId' in common_obs_spatial where catalogtype=20
|
||||
UAIR_STATION_ID : 'stationId' in common_obs_spatial where catalogtype=22
|
||||
FIXED_BOUY_ID : 'stationId' in common_obs_spatial where catalogtype=32
|
||||
CMAN_STATION_ID : 'stationId' in common_obs_spatial where catalogtype=33
|
||||
The menuName is optional and can be set to change the menu name from the areaName. If subMenuName is
|
||||
set then the menu will appear as a cascading sub menu.
|
||||
-->
|
||||
<AreaMenuItem subMenuName="" menuName="BasicWX_US">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>BasicWX_US</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="" menuName="">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>US</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="" menuName="">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>North_America</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="" menuName="">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>Alaska</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="Pacific" menuName="">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>Hawaii</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="" menuName="">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>Caribbean</areaName>
|
||||
</AreaMenuItem>
|
||||
|
||||
<AreaMenuItem subMenuName="Atlantic" menuName="Western">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>Atlantic-Western</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="Atlantic" menuName="North">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>Atlantic-North</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="Atlantic" menuName="Tropical">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>Atlantic-Tropical</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="Atlantic" menuName="FullBasin">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>Atlantic-FullBasin</areaName>
|
||||
</AreaMenuItem>
|
||||
|
||||
<AreaMenuItem subMenuName="Pacific" menuName="Eastern">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>Pacific-Eastern</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="Pacific" menuName="North">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>Pacific-North</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="Pacific" menuName="Tropical">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>Pacific-Tropical</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="Pacific" menuName="FullBasin">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>Pacific-FullBasin</areaName>
|
||||
</AreaMenuItem>
|
||||
|
||||
<AreaMenuItem subMenuName="" menuName="">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>Canada</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="Other" menuName="">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>Europe</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="Other" menuName="">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>Africa</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="Other" menuName="">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>South_America</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="World" menuName="">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>World</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="World" menuName="">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>World0</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="World" menuName="">
|
||||
<source>PREDEFINED_AREA</source>
|
||||
<areaName>N_Hemisphere</areaName>
|
||||
</AreaMenuItem>
|
||||
|
||||
<AreaMenuItem subMenuName="GEMPAK" menuName="">
|
||||
<source>GEMPAK_GEOG_AREA_CODE</source>
|
||||
<areaName>TROPSFC</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="GEMPAK" menuName="ATLC HIGH SEAS">
|
||||
<source>GEMPAK_GEOG_AREA_CODE</source>
|
||||
<areaName>AHSF</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="GEMPAK" menuName="EPAC HIGH SEAS">
|
||||
<source>GEMPAK_GEOG_AREA_CODE</source>
|
||||
<areaName>EHSF</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="GEMPAK" menuName="SPAC HIGH SEAS">
|
||||
<source>GEMPAK_GEOG_AREA_NAME</source>
|
||||
<areaName>SPAC HIGH SEAS</areaName>
|
||||
</AreaMenuItem>
|
||||
|
||||
<AreaMenuItem subMenuName="Wash D.C (Dulles)" menuName="synop">
|
||||
<source>SYNOP_STATION_ID</source>
|
||||
<areaName>72403</areaName>
|
||||
<!-- TODO : add one or more elements that can override the projection and/or extents for a location-bases area. -->
|
||||
<!-- <recenterOnly>true</recenterOnly> not implemented-->
|
||||
<!-- <changeAreaMethod>RecenterAndReproject</changeAreaMethod> -->
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="Wash D.C (Dulles)" menuName="metar">
|
||||
<source>METAR_STATION_ID</source>
|
||||
<areaName>KIAD</areaName>
|
||||
</AreaMenuItem>
|
||||
<!-- UAIR doesn't have the geom set in the db???
|
||||
<AreaMenuItem subMenuName="Wash D.C (Dulles)" menuName="upper-air">
|
||||
<source>UAIR_STATION_ID</source>
|
||||
<areaName>72403</areaName>
|
||||
</AreaMenuItem> -->
|
||||
|
||||
<AreaMenuItem subMenuName="Stations" menuName="DYESS_AFB,ABILENE(DYS)">
|
||||
<source>GEMPAK_SFC_STN_ID</source>
|
||||
<areaName>DYS</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="Stations" menuName="METAR-KRZL">
|
||||
<source>METAR_STATION_ID</source>
|
||||
<areaName>KRZL</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="Stations" menuName="UAIR-21824">
|
||||
<source>UAIR_STATION_ID</source>
|
||||
<areaName>21824</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="Stations" menuName="BOUY-CapeHatt">
|
||||
<source>FIXED_BOUY_ID</source>
|
||||
<areaName>41001</areaName>
|
||||
</AreaMenuItem>
|
||||
<AreaMenuItem subMenuName="Stations" menuName="CMAN-AtlCity">
|
||||
<source>CMAN_STATION_ID</source>
|
||||
<areaName>ACMN4</areaName>
|
||||
</AreaMenuItem>
|
||||
|
||||
</areaMenus>
|
|
@ -3144,7 +3144,7 @@
|
|||
34.98 -81.05 60 UZA
|
||||
40.02 -82.46 60 VTA
|
||||
30.35 -89.82 60 ASD
|
||||
18.05 178.57 60 NFNA
|
||||
-18.05 178.57 60 NFNA
|
||||
45.70 -92.95 60 ROS
|
||||
36.28 -94.31 60 XNA
|
||||
36.37 -92.47 60 BPK
|
||||
|
|
File diff suppressed because it is too large
Load diff
33
cave/build/static/common/cave/etc/textws/gui/FontSizeCfg.xml
Normal file
33
cave/build/static/common/cave/etc/textws/gui/FontSizeCfg.xml
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!--
|
||||
It has to set "true" for your desired font in Selected attribute, set
|
||||
"false" for other two fonts that you don't select.
|
||||
Total three fonts listed as Small, Medium, Large.
|
||||
It can change the number of size on "FontSize" attribute.
|
||||
|
||||
Modify:
|
||||
|
||||
06/14/2013 Xiaochuan DR 15733 Initial creation
|
||||
|
||||
-->
|
||||
|
||||
<fontSizeCfg>
|
||||
<SizeButtonCfg>
|
||||
<LabelName>Small Font</LabelName>
|
||||
<SizeEnabled>true</SizeEnabled>
|
||||
<FontSize>9</FontSize>
|
||||
<Selected>false</Selected>
|
||||
</SizeButtonCfg>
|
||||
<SizeButtonCfg>
|
||||
<LabelName>Medium Font</LabelName>
|
||||
<SizeEnabled>true</SizeEnabled>
|
||||
<FontSize>11</FontSize>
|
||||
<Selected>false</Selected>
|
||||
</SizeButtonCfg>
|
||||
<SizeButtonCfg>
|
||||
<LabelName>Large Font</LabelName>
|
||||
<SizeEnabled>true</SizeEnabled>
|
||||
<FontSize>13</FontSize>
|
||||
<Selected>true</Selected>
|
||||
</SizeButtonCfg>
|
||||
</fontSizeCfg>
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!--
|
||||
The file is used to set text colors on TextWorkstation. These colors
|
||||
include text background and foreground, highlight text background
|
||||
and foreground.
|
||||
The colors setting can use string of color, or number of rgb color.
|
||||
The color enter format examples:
|
||||
color="255, 0, 0"
|
||||
color="RED"
|
||||
|
||||
Modify:
|
||||
|
||||
06/14/2013 Xiaochuan DR 15733 Initial creation
|
||||
|
||||
-->
|
||||
|
||||
<textColorsCfg>
|
||||
<TextColorElement paramName="textBG" color="255, 255, 255"/>
|
||||
<TextColorElement paramName="textFG" color="0, 0,0"/>
|
||||
<TextColorElement paramName="highlightBG" color="RED"/>
|
||||
<TextColorElement paramName="highlightFG" color="BLACK"/>
|
||||
</textColorsCfg>
|
|
@ -18,19 +18,8 @@
|
|||
</license>
|
||||
|
||||
<requires>
|
||||
<import plugin="org.eclipse.ui" version="3.8.2" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.core.runtime"/>
|
||||
<import plugin="com.raytheon.viz.ui" version="1.12.1174" match="greaterOrEqual"/>
|
||||
<import plugin="com.raytheon.uf.common.serialization" version="1.12.1174" match="greaterOrEqual"/>
|
||||
<import plugin="com.raytheon.uf.common.localization" version="1.12.1174" match="greaterOrEqual"/>
|
||||
<import plugin="com.raytheon.uf.common.archive" version="1.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="com.raytheon.uf.common.time" version="1.12.1174" match="greaterOrEqual"/>
|
||||
<import plugin="com.raytheon.uf.common.util" version="1.12.1174" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.commons.lang" version="2.3.0" match="greaterOrEqual"/>
|
||||
<import plugin="com.raytheon.uf.viz.core" version="1.12.1174" match="greaterOrEqual"/>
|
||||
<import plugin="com.raytheon.uf.common.units" version="1.0.0" match="greaterOrEqual"/>
|
||||
<import plugin="com.raytheon.uf.common.status" version="1.12.1174" match="greaterOrEqual"/>
|
||||
<import plugin="org.apache.commons.io" version="2.4.0" match="greaterOrEqual"/>
|
||||
<import feature="com.raytheon.uf.common.base.feature" version="1.0.0.qualifier"/>
|
||||
<import feature="com.raytheon.uf.viz.base.feature" version="1.0.0.qualifier"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
|
@ -53,4 +42,18 @@
|
|||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.core.runtime"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.ui"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.
|
||||
.,\
|
||||
plugin.xml
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
<path
|
||||
application="Archive"
|
||||
localizationType="COMMON_STATIC"
|
||||
name="Archive"
|
||||
value="archive"
|
||||
name="Configuration"
|
||||
value="archiver/purger"
|
||||
recursive="false"
|
||||
extensionFilter=".xml">
|
||||
</path>
|
||||
|
|
|
@ -279,7 +279,6 @@ public abstract class AbstractArchiveDlg extends CaveSWTDialog implements
|
|||
Job job = new Job("setup") {
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
ArchiveConfigManager.getInstance().reset();
|
||||
if (!shell.isDisposed()) {
|
||||
VizApp.runAsync(new Runnable() {
|
||||
|
||||
|
@ -555,4 +554,16 @@ public abstract class AbstractArchiveDlg extends CaveSWTDialog implements
|
|||
protected void removeModifiedListener(IModifyListener iModifyListener) {
|
||||
tableComp.removeModifiedListener(iModifyListener);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.ui.dialogs.CaveSWTDialogBase#initializeComponents(org
|
||||
* .eclipse.swt.widgets.Shell)
|
||||
*/
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
ArchiveConfigManager.getInstance().reset();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,6 +119,7 @@ public class ArchiveRetentionDlg extends AbstractArchiveDlg implements
|
|||
*/
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
super.initializeComponents(shell);
|
||||
setText("Archive Retention");
|
||||
Composite mainComp = new Composite(shell, SWT.NONE);
|
||||
GridLayout gl = new GridLayout(1, false);
|
||||
|
@ -126,8 +127,6 @@ public class ArchiveRetentionDlg extends AbstractArchiveDlg implements
|
|||
gl.marginWidth = 0;
|
||||
gl.horizontalSpacing = 0;
|
||||
mainComp.setLayout(gl);
|
||||
ArchiveConfigManager.getInstance().reset();
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@ import org.eclipse.swt.widgets.MessageBox;
|
|||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.swt.widgets.Spinner;
|
||||
|
||||
import com.raytheon.uf.common.archive.config.ArchiveConfigManager;
|
||||
import com.raytheon.uf.common.archive.config.DisplayData;
|
||||
import com.raytheon.uf.common.time.util.TimeUtil;
|
||||
import com.raytheon.uf.common.util.SizeUtil;
|
||||
|
@ -136,9 +135,6 @@ public class CaseCreationDlg extends AbstractArchiveDlg implements
|
|||
private SimpleDateFormat dateFmt = new SimpleDateFormat(
|
||||
"E MMM dd yyyy HH:00 z");
|
||||
|
||||
/** Archive configuration manager */
|
||||
private ArchiveConfigManager manager = ArchiveConfigManager.getInstance();
|
||||
|
||||
/** Number of selected items. */
|
||||
private int selectedItemsSize = 0;
|
||||
|
||||
|
@ -179,6 +175,7 @@ public class CaseCreationDlg extends AbstractArchiveDlg implements
|
|||
*/
|
||||
@Override
|
||||
protected void initializeComponents(Shell shell) {
|
||||
super.initializeComponents(shell);
|
||||
setText("Archive Case Creation");
|
||||
Composite mainComp = new Composite(shell, SWT.NONE);
|
||||
GridLayout gl = new GridLayout(1, false);
|
||||
|
@ -186,9 +183,6 @@ public class CaseCreationDlg extends AbstractArchiveDlg implements
|
|||
gl.marginWidth = 0;
|
||||
gl.horizontalSpacing = 0;
|
||||
mainComp.setLayout(gl);
|
||||
|
||||
manager.reset();
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ import java.util.Map;
|
|||
import org.apache.commons.lang.Validate;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.PluginException;
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURIUtil;
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||
import com.raytheon.uf.viz.core.catalog.LayerProperty;
|
||||
import com.raytheon.uf.viz.core.catalog.ScriptCreator;
|
||||
|
@ -50,6 +52,7 @@ import com.raytheon.uf.viz.core.rsc.ResourceType;
|
|||
* Aug 13, 2007 chammack Initial Creation.
|
||||
* Dec 03, 2007 461 bphillip Modified Time Matching to use VizTim
|
||||
* Aug 19, 2009 2586 rjpeter Updated error handling.
|
||||
* Jul 05, 2013 1869 bsteffen Fix goes sounding updates.
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
|
@ -155,8 +158,13 @@ public class Loader {
|
|||
"Map must contain a datauri and plugin name");
|
||||
}
|
||||
|
||||
vals.put(DATAURI_COLUMN, new RequestConstraint(obj.get(DATAURI_COLUMN)
|
||||
.toString()));
|
||||
try {
|
||||
vals.putAll(RequestConstraint.toConstraintMapping(DataURIUtil
|
||||
.createDataURIMap(obj.get(DATAURI_COLUMN).toString())));
|
||||
} catch (PluginException e) {
|
||||
throw new VizException(e);
|
||||
}
|
||||
|
||||
vals.put(PLUGINNAME_COLUMN, new RequestConstraint(obj.get(
|
||||
PLUGINNAME_COLUMN).toString()));
|
||||
lp.setDesiredProduct(ResourceType.PLAN_VIEW);
|
||||
|
|
|
@ -48,6 +48,7 @@ import com.raytheon.uf.common.time.DataTime.FLAG;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 19, 2007 chammack Initial Creation.
|
||||
* May 31, 2013 DR 15908 dhuffman Removed a null from a method call to cease a null pointer exception.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -938,7 +939,7 @@ public class TimeMatcher {
|
|||
// which can be displayed, and the latest available reference time in the
|
||||
// sequence, this routine fills up the sequence "loadTimes" with the
|
||||
// the proper list of times for a row load to an empty display. By
|
||||
// definition a row load contains analyses plus forecasts from only the
|
||||
// definition a row load contains analysis plus forecasts from only the
|
||||
// latest run. Caller creates and owns both depictTimes and loadTimes.
|
||||
// loadTimes is assumed to be an empty sequence when call is made.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
@ -955,7 +956,7 @@ public class TimeMatcher {
|
|||
// filterOldForecasts removes any DataTimes that do not belong in a row
|
||||
// load and returns index of first item with latest reference time,
|
||||
// which
|
||||
// is the most prefered time to load.
|
||||
// is the most preferred time to load.
|
||||
p = filterOldForecasts(depictTimes, latest, noBackfill);
|
||||
|
||||
// Add all unfiltered times to the sequence of potential load times.
|
||||
|
@ -1099,7 +1100,7 @@ public class TimeMatcher {
|
|||
// time in the sequence, this routine fills up the sequence "loadTimes" with
|
||||
// the proper list of times for loading a valid time sequence to an
|
||||
// empty display. A valid time sequence attempts to load the most recent
|
||||
// data for each available valid time. Returns valid time of prefered frame.
|
||||
// data for each available valid time. Returns valid time of preferred frame.
|
||||
// Caller creates and owns both depictTimes and loadTimes.
|
||||
// loadTimes is assumed to be an empty sequence when call is made.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
@ -1122,7 +1123,7 @@ public class TimeMatcher {
|
|||
validTimeSort(depictTimes, majorIndex, false);
|
||||
|
||||
// identify the first item in the sequence with the latest reference
|
||||
// time, which is the most prefered time to load. Store as m.
|
||||
// time, which is the most preferred time to load. Store as m.
|
||||
int m = depictTimes.size() - 1;
|
||||
for (p = 0; p < majorIndex.size(); p++) {
|
||||
if ((depictTimes).get(majorIndex.get(p)).getMatchRef() < latest
|
||||
|
@ -1164,7 +1165,7 @@ public class TimeMatcher {
|
|||
// decreases.
|
||||
validTimeSort(depictTimes, null, false);
|
||||
|
||||
// By searching backwards thru sorted list for first occurence of
|
||||
// By searching backwards thru sorted list for first occurrence of
|
||||
// specified forecast time, we find item with desired valid time that
|
||||
// has latest reference time.
|
||||
n = depictTimes.size();
|
||||
|
@ -1180,7 +1181,7 @@ public class TimeMatcher {
|
|||
// dProg/dt
|
||||
|
||||
// Step back again recording all matches to this valid time, return
|
||||
// last one in the list as the prefered ref time.
|
||||
// last one in the list as the preferred ref time.
|
||||
for (q = n - 1; q >= 0; q--) {
|
||||
if ((depictTimes).get(q).getMatchValid() == v) {
|
||||
loadTimes.add((depictTimes).get(q));
|
||||
|
@ -1190,7 +1191,7 @@ public class TimeMatcher {
|
|||
return (loadTimes).get(loadTimes.size() - 1).getRefTime();
|
||||
}
|
||||
|
||||
// Given a sequence of available DataTimes for a depictable, the clock time,
|
||||
// Given a sequence of available DataTimes for an able to depict, the clock time,
|
||||
// the desired number of frames, and a picture load mode, this routine
|
||||
// returns the sequence "loadTimes" with the proper list of times for
|
||||
// loading data to an empty display. Caller creates and owns depictTimes
|
||||
|
@ -1484,7 +1485,7 @@ public class TimeMatcher {
|
|||
// break;
|
||||
// }
|
||||
|
||||
// filter the depictable times by the clock setting.
|
||||
// filter the able to be depicted times by the clock setting.
|
||||
Date latest;
|
||||
List<DataTime> depictTimesList = new ArrayList<DataTime>(
|
||||
Arrays.asList(depictTimes));
|
||||
|
@ -1527,7 +1528,7 @@ public class TimeMatcher {
|
|||
}
|
||||
break;
|
||||
case ANALYSIS_LOOP:
|
||||
forecast = 0; // intentional fall thru
|
||||
forecast = 0; // intentional fall through
|
||||
case INVENTORY:
|
||||
case PROG_LOOP:
|
||||
filteredTimes = filterByForecast(depictTimes, forecast);
|
||||
|
@ -1541,7 +1542,7 @@ public class TimeMatcher {
|
|||
return new DataTime[0];
|
||||
}
|
||||
loadTimes = doValTimOverlay(filteredTimes.toArray(new DataTime[0]),
|
||||
frameTimes, deltaTime, mode, null, tolerance);
|
||||
frameTimes, deltaTime, mode, latest, tolerance);
|
||||
break;
|
||||
case FORCED:
|
||||
loadTimes = new DataTime[frameTimes.length];
|
||||
|
@ -1590,7 +1591,7 @@ public class TimeMatcher {
|
|||
// boolean haveForecasts = (fcstTime > 0); // original code
|
||||
boolean haveForecasts = haveForecasts(times);
|
||||
if (haveForecasts) {
|
||||
// With forcast time, filter
|
||||
// With forecast time, filter
|
||||
filterByForecast(times, fcstTime);
|
||||
} else {
|
||||
// sort data times
|
||||
|
@ -1598,7 +1599,7 @@ public class TimeMatcher {
|
|||
}
|
||||
|
||||
long minInterval = intrinsicPeriod(times, haveForecasts).intrinsicPeriod;
|
||||
// the intrinsic period interval is in miliseconds
|
||||
// the intrinsic period interval is in milliseconds
|
||||
minInterval /= 1000;
|
||||
|
||||
// Round the interval to an appropriate time step.
|
||||
|
|
|
@ -101,6 +101,7 @@ import com.raytheon.uf.viz.datadelivery.utils.DataDeliveryUtils;
|
|||
* Jun 04, 2013 223 mpduff Added grid specific items to this class.
|
||||
* Jun 11, 2013 2064 mpduff Fix editing of subscriptions.
|
||||
* Jun 14, 2013 2108 mpduff Refactored DataSizeUtils.
|
||||
* Jul 18, 2013 2205 djohnson If null time is selected from the dialog, return null for the adhoc.
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
|
@ -589,6 +590,9 @@ public class GriddedSubsetManagerDlg
|
|||
|
||||
if (sub instanceof AdhocSubscription) {
|
||||
newTime = setupDataSpecificTime(newTime, sub);
|
||||
if (newTime == null) {
|
||||
return null;
|
||||
}
|
||||
sub.setTime(newTime);
|
||||
} else if (!create) {
|
||||
Time time = sub.getTime();
|
||||
|
|
|
@ -97,6 +97,8 @@ import com.raytheon.uf.viz.monitor.listeners.IMonitorListener;
|
|||
* Apr 26, 2013 1954 bsteffen Minor code cleanup throughout FFMP.
|
||||
* Jun 06, 2013 2075 njensen No longer starts loading threads, resourceData does that
|
||||
* Jun 07, 2013 2075 njensen Extracted FFMPProcessUris to separate class
|
||||
* Jul 09, 2013 2152 njensen Synchronize uri requests to avoid duplicating effort
|
||||
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -116,6 +118,8 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
|
||||
private String wfo = null;
|
||||
|
||||
private Object uriRequestLock = new Object();
|
||||
|
||||
/** Pattern for dates in radar */
|
||||
private static ThreadLocal<SimpleDateFormat> datePattern = new ThreadLocal<SimpleDateFormat>() {
|
||||
|
||||
|
@ -291,11 +295,10 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
* @param phuc
|
||||
* @return
|
||||
*/
|
||||
protected List<String> getLoadedUris(String siteKey, String source,
|
||||
String phuc) {
|
||||
protected List<String> getLoadedUris(String siteKey, String source) {
|
||||
FFMPSiteData siteData = siteDataMap.get(siteKey);
|
||||
FFMPSourceData sourceData = siteData.getSourceData(source);
|
||||
return sourceData.getLoadedUris(phuc);
|
||||
return sourceData.getLoadedUris();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -308,7 +311,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
* @throws VizException
|
||||
*/
|
||||
public void populateFFMPRecord(String siteKey, String dataKey,
|
||||
String source, Date ptime, String phuc, boolean retrieveNew) {
|
||||
String source, Date ptime, boolean retrieveNew) {
|
||||
if (source != null) {
|
||||
|
||||
boolean dupOverride = false;
|
||||
|
@ -325,11 +328,11 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
for (String uri : uris) {
|
||||
if (uri != null) {
|
||||
if (dupOverride
|
||||
|| !getLoadedUris(siteKey, source, phuc)
|
||||
|| !getLoadedUris(siteKey, source)
|
||||
.contains(uri)) {
|
||||
try {
|
||||
populateFFMPRecord(siteKey, new FFMPRecord(
|
||||
uri), source, phuc);
|
||||
uri), source);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"FFMP Can't retrieve FFMP URI, "
|
||||
|
@ -353,10 +356,10 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
* @throws VizException
|
||||
*/
|
||||
public FFMPRecord populateFFMPRecord(String uri, String siteKey,
|
||||
String source, String phuc) throws Exception {
|
||||
String source) throws Exception {
|
||||
|
||||
try {
|
||||
populateFFMPRecord(siteKey, new FFMPRecord(uri), source, phuc);
|
||||
populateFFMPRecord(siteKey, new FFMPRecord(uri), source);
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.INFO,
|
||||
"FFMP Can't retrieve FFMP URI, " + uri, e);
|
||||
|
@ -387,31 +390,26 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
FFMPRecord curRecord = sourceData.getRecord();
|
||||
|
||||
if (curRecord == null) {
|
||||
// add each huc requested
|
||||
for (String huc : data.getBasinsMap().keySet()) {
|
||||
// add all of the uris
|
||||
for (Entry<Date, List<String>> duris : uris.entrySet()) {
|
||||
if (data.getTimes().contains(duris.getKey().getTime())) {
|
||||
for (String uri : duris.getValue()) {
|
||||
if (curRecord == null) {
|
||||
curRecord = new FFMPRecord(uri);
|
||||
sourceData.setRecord(curRecord);
|
||||
}
|
||||
sourceData.addLoadedUri(huc, uri);
|
||||
// add all of the uris
|
||||
for (Entry<Date, List<String>> duris : uris.entrySet()) {
|
||||
if (data.getTimes().contains(duris.getKey().getTime())) {
|
||||
for (String uri : duris.getValue()) {
|
||||
if (curRecord == null) {
|
||||
curRecord = new FFMPRecord(uri);
|
||||
sourceData.setRecord(curRecord);
|
||||
}
|
||||
sourceData.addLoadedUri(uri);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (curRecord != null) {
|
||||
for (Entry<String, FFMPBasinData> entry : data.getBasinsMap()
|
||||
.entrySet()) {
|
||||
|
||||
FFMPBasinData basinData = entry.getValue();
|
||||
basinData.populate(data.getTimes());
|
||||
curRecord.populate(basinData, entry.getKey());
|
||||
}
|
||||
FFMPBasinData basinData = data.getBasins();
|
||||
basinData.populate(data.getTimes());
|
||||
curRecord.populate(basinData);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -422,13 +420,13 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
* @param siteKey
|
||||
* @param ffmpRec
|
||||
* @param source
|
||||
* @param phuc
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public void populateFFMPRecord(String siteKey, FFMPRecord ffmpRec,
|
||||
String source, String phuc) throws Exception {
|
||||
String source) throws Exception {
|
||||
|
||||
FFMPLoadRecord flr = new FFMPLoadRecord(siteKey, ffmpRec, source, phuc);
|
||||
FFMPLoadRecord flr = new FFMPLoadRecord(siteKey, ffmpRec, source);
|
||||
flr.run();
|
||||
}
|
||||
|
||||
|
@ -446,12 +444,12 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
String source, String phuc, FFMPBasin basin) throws VizException {
|
||||
|
||||
if (dataUri != null) {
|
||||
List<String> uris = getLoadedUris(siteKey, source, phuc);
|
||||
List<String> uris = getLoadedUris(siteKey, source);
|
||||
if (!uris.contains(dataUri)) {
|
||||
try {
|
||||
SourceXML sourceXML = fscm.getSource(source);
|
||||
FFMPRecord ffmpRec = populateFFMPRecord(dataUri, siteKey,
|
||||
source, phuc);
|
||||
source);
|
||||
File loc = HDF5Util.findHDF5Location(ffmpRec);
|
||||
IDataStore dataStore = DataStoreFactory.getDataStore(loc);
|
||||
|
||||
|
@ -507,36 +505,41 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
*/
|
||||
public void preloadAvailableUris(String siteKey, String dataKey,
|
||||
Set<String> sourceNames, Date time) {
|
||||
DbQueryRequest request = new DbQueryRequest();
|
||||
request.setEntityClass(FFMPRecord.class);
|
||||
request.addRequestField("dataURI");
|
||||
request.setOrderByField("dataTime.refTime", OrderMode.DESC);
|
||||
synchronized (uriRequestLock) {
|
||||
DbQueryRequest request = new DbQueryRequest();
|
||||
request.setEntityClass(FFMPRecord.class);
|
||||
request.addRequestField("dataURI");
|
||||
request.setOrderByField("dataTime.refTime", OrderMode.DESC);
|
||||
|
||||
request.addConstraint("wfo", new RequestConstraint(getWfo()));
|
||||
request.addConstraint("siteKey", new RequestConstraint(siteKey));
|
||||
request.addConstraint("dataTime.refTime", new RequestConstraint(
|
||||
datePattern.get().format(time),
|
||||
ConstraintType.GREATER_THAN_EQUALS));
|
||||
request.addConstraint("wfo", new RequestConstraint(getWfo()));
|
||||
request.addConstraint("siteKey", new RequestConstraint(siteKey));
|
||||
request.addConstraint("dataTime.refTime", new RequestConstraint(
|
||||
datePattern.get().format(time),
|
||||
ConstraintType.GREATER_THAN_EQUALS));
|
||||
|
||||
RequestConstraint sourceRC = new RequestConstraint(null,
|
||||
ConstraintType.IN);
|
||||
sourceRC.setConstraintValueList(sourceNames);
|
||||
request.addConstraint("sourceName", sourceRC);
|
||||
try {
|
||||
handleURIRequest(request, siteKey, dataKey, time);
|
||||
FFMPSiteData siteData = siteDataMap.get(siteKey);
|
||||
for (String sourceName : sourceNames) {
|
||||
// This is done to ensure that the previous query time is
|
||||
// updated, even for sources with no data.
|
||||
FFMPSourceData sourceData = siteData.getSourceData(sourceName);
|
||||
Date oldPrevTime = sourceData.getPreviousUriQueryDate();
|
||||
if (oldPrevTime == null || time.before(oldPrevTime)) {
|
||||
sourceData.setPreviousUriQueryDate(time);
|
||||
RequestConstraint sourceRC = new RequestConstraint(null,
|
||||
ConstraintType.IN);
|
||||
sourceRC.setConstraintValueList(sourceNames);
|
||||
request.addConstraint("sourceName", sourceRC);
|
||||
try {
|
||||
handleURIRequest(request, siteKey, dataKey, time);
|
||||
FFMPSiteData siteData = siteDataMap.get(siteKey);
|
||||
for (String sourceName : sourceNames) {
|
||||
// This is done to ensure that the previous query time is
|
||||
// updated, even for sources with no data.
|
||||
FFMPSourceData sourceData = siteData
|
||||
.getSourceData(sourceName);
|
||||
Date oldPrevTime = sourceData.getPreviousUriQueryDate();
|
||||
if (oldPrevTime == null || time.before(oldPrevTime)) {
|
||||
sourceData.setPreviousUriQueryDate(time);
|
||||
}
|
||||
}
|
||||
} catch (VizException e) {
|
||||
statusHandler
|
||||
.handle(Priority.PROBLEM,
|
||||
"FFMP Can't find availble URI list for, "
|
||||
+ sourceNames, e);
|
||||
}
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"FFMP Can't find availble URI list for, " + sourceNames, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -614,72 +617,78 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
public ConcurrentNavigableMap<Date, List<String>> getAvailableUris(
|
||||
String siteKey, String dataKey, String sourceName, Date time,
|
||||
boolean retrieveNew) {
|
||||
ConcurrentNavigableMap<Date, List<String>> sortedUris = siteDataMap
|
||||
.get(siteKey).getSourceData(sourceName).getAvailableUris();
|
||||
Date previousQueryTime = siteDataMap.get(siteKey)
|
||||
.getSourceData(sourceName).getPreviousUriQueryDate();
|
||||
Date earliestTime = time;
|
||||
synchronized (uriRequestLock) {
|
||||
ConcurrentNavigableMap<Date, List<String>> sortedUris = siteDataMap
|
||||
.get(siteKey).getSourceData(sourceName).getAvailableUris();
|
||||
Date previousQueryTime = siteDataMap.get(siteKey)
|
||||
.getSourceData(sourceName).getPreviousUriQueryDate();
|
||||
Date earliestTime = time;
|
||||
|
||||
SourceXML source = getSourceConfig().getSource(sourceName);
|
||||
SourceXML source = getSourceConfig().getSource(sourceName);
|
||||
|
||||
if (source.getSourceType().equals(SOURCE_TYPE.GUIDANCE.getSourceType())) {
|
||||
// Always look back for guidance types because of long expiration
|
||||
// times, prevents mosaic brittleness from occurring.
|
||||
retrieveNew = true;
|
||||
|
||||
long timeOffset = source.getExpirationMinutes(siteKey)
|
||||
* TimeUtil.MILLIS_PER_MINUTE;
|
||||
earliestTime = new Date(time.getTime() - timeOffset);
|
||||
}
|
||||
|
||||
if (retrieveNew
|
||||
|| (time != null && (previousQueryTime == null || time
|
||||
.before(previousQueryTime)))) {
|
||||
DbQueryRequest request = new DbQueryRequest();
|
||||
request.setEntityClass(FFMPRecord.class);
|
||||
request.addRequestField("dataURI");
|
||||
request.setOrderByField("dataTime.refTime", OrderMode.DESC);
|
||||
|
||||
request.addConstraint("wfo", new RequestConstraint(getWfo()));
|
||||
request.addConstraint("sourceName", new RequestConstraint(
|
||||
sourceName));
|
||||
request.addConstraint("siteKey", new RequestConstraint(siteKey));
|
||||
if (!source.isMosaic()) {
|
||||
request.addConstraint("dataKey", new RequestConstraint(dataKey));
|
||||
|
||||
}
|
||||
|
||||
String earliestTimeString = datePattern.get().format(earliestTime);
|
||||
|
||||
if (!retrieveNew && (previousQueryTime != null)) {
|
||||
String latestTimeString = datePattern.get().format(
|
||||
previousQueryTime);
|
||||
RequestConstraint timeRC = new RequestConstraint(null,
|
||||
ConstraintType.BETWEEN);
|
||||
timeRC.setBetweenValueList(new String[] { earliestTimeString,
|
||||
latestTimeString });
|
||||
request.addConstraint("dataTime.refTime", timeRC);
|
||||
} else {
|
||||
request.addConstraint("dataTime.refTime",
|
||||
new RequestConstraint(earliestTimeString,
|
||||
ConstraintType.GREATER_THAN_EQUALS));
|
||||
}
|
||||
|
||||
try {
|
||||
handleURIRequest(request, siteKey, dataKey, time);
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"FFMP Can't find availble URI list for, " + sourceName,
|
||||
e);
|
||||
}
|
||||
}
|
||||
|
||||
if (time != null) {
|
||||
if (source.getSourceType().equals(
|
||||
SOURCE_TYPE.GUIDANCE.getSourceType())) {
|
||||
return sortedUris;
|
||||
} else {
|
||||
return sortedUris.tailMap(time, true);
|
||||
// Always look back for guidance types because of long
|
||||
// expiration
|
||||
// times, prevents mosaic brittleness from occurring.
|
||||
retrieveNew = true;
|
||||
|
||||
long timeOffset = source.getExpirationMinutes(siteKey)
|
||||
* TimeUtil.MILLIS_PER_MINUTE;
|
||||
earliestTime = new Date(time.getTime() - timeOffset);
|
||||
}
|
||||
|
||||
if (retrieveNew
|
||||
|| (time != null && (previousQueryTime == null || time
|
||||
.before(previousQueryTime)))) {
|
||||
DbQueryRequest request = new DbQueryRequest();
|
||||
request.setEntityClass(FFMPRecord.class);
|
||||
request.addRequestField("dataURI");
|
||||
request.setOrderByField("dataTime.refTime", OrderMode.DESC);
|
||||
|
||||
request.addConstraint("wfo", new RequestConstraint(getWfo()));
|
||||
request.addConstraint("sourceName", new RequestConstraint(
|
||||
sourceName));
|
||||
request.addConstraint("siteKey", new RequestConstraint(siteKey));
|
||||
if (!source.isMosaic()) {
|
||||
request.addConstraint("dataKey", new RequestConstraint(
|
||||
dataKey));
|
||||
|
||||
}
|
||||
|
||||
String earliestTimeString = datePattern.get().format(
|
||||
earliestTime);
|
||||
|
||||
if (!retrieveNew && (previousQueryTime != null)) {
|
||||
String latestTimeString = datePattern.get().format(
|
||||
previousQueryTime);
|
||||
RequestConstraint timeRC = new RequestConstraint(null,
|
||||
ConstraintType.BETWEEN);
|
||||
timeRC.setBetweenValueList(new String[] {
|
||||
earliestTimeString, latestTimeString });
|
||||
request.addConstraint("dataTime.refTime", timeRC);
|
||||
} else {
|
||||
request.addConstraint("dataTime.refTime",
|
||||
new RequestConstraint(earliestTimeString,
|
||||
ConstraintType.GREATER_THAN_EQUALS));
|
||||
}
|
||||
|
||||
try {
|
||||
handleURIRequest(request, siteKey, dataKey, time);
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"FFMP Can't find availble URI list for, "
|
||||
+ sourceName, e);
|
||||
}
|
||||
}
|
||||
|
||||
if (time != null) {
|
||||
if (source.getSourceType().equals(
|
||||
SOURCE_TYPE.GUIDANCE.getSourceType())) {
|
||||
return sortedUris;
|
||||
} else {
|
||||
return sortedUris.tailMap(time, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -698,14 +707,12 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
*
|
||||
*/
|
||||
public FFMPRecord getFFMPData(ProductXML product, String siteKey,
|
||||
String dataKey, String sourceName, Date ptime, String phuc,
|
||||
boolean retrieveNew) {
|
||||
String dataKey, String sourceName, Date ptime, boolean retrieveNew) {
|
||||
|
||||
FFMPRecord record = siteDataMap.get(siteKey).getSourceData(sourceName)
|
||||
.getRecord();
|
||||
|
||||
if ((record != null)
|
||||
&& (record.getBasinData(phuc).getBasins().size() > 0)) {
|
||||
if ((record != null) && (record.getBasinData().getBasins().size() > 0)) {
|
||||
|
||||
SourceXML sourceXML = getSourceConfig().getSource(sourceName);
|
||||
|
||||
|
@ -731,8 +738,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
continue;
|
||||
} else {
|
||||
populateFFMPRecord(siteKey, dataKey,
|
||||
source.getSourceName(), ptime, phuc,
|
||||
retrieveNew);
|
||||
source.getSourceName(), ptime, retrieveNew);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -740,7 +746,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
if (!siteDataMap.get(siteKey).getSourceData(sourceName)
|
||||
.hasLoadedAnyUris()) {
|
||||
populateFFMPRecord(siteKey, dataKey, sourceName, ptime,
|
||||
phuc, retrieveNew);
|
||||
retrieveNew);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -748,7 +754,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
.getRecord();
|
||||
|
||||
} else {
|
||||
populateFFMPRecord(siteKey, dataKey, sourceName, ptime, phuc,
|
||||
populateFFMPRecord(siteKey, dataKey, sourceName, ptime,
|
||||
retrieveNew);
|
||||
}
|
||||
|
||||
|
@ -775,17 +781,17 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
.getGuidanceSources(product, guidSrc)) {
|
||||
|
||||
populateFFMPRecord(siteKey, dataKey,
|
||||
ffgSource.getSourceName(), ptime, phuc,
|
||||
ffgSource.getSourceName(), ptime,
|
||||
retrieveNew);
|
||||
}
|
||||
} else {
|
||||
populateFFMPRecord(siteKey, dataKey, sourceName,
|
||||
ptime, phuc, retrieveNew);
|
||||
ptime, retrieveNew);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
populateFFMPRecord(siteKey, dataKey, sourceName, ptime,
|
||||
phuc, retrieveNew);
|
||||
retrieveNew);
|
||||
}
|
||||
} else {
|
||||
// special case where FFG is the primary source
|
||||
|
@ -799,7 +805,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
sourceName = sourcexml.getDisplayName();
|
||||
} else {
|
||||
populateFFMPRecord(siteKey, dataKey, sourceName, ptime,
|
||||
phuc, retrieveNew);
|
||||
retrieveNew);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1054,20 +1060,18 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
* Get the pertinent QPE source Record.
|
||||
*
|
||||
* @param date
|
||||
* @param phuc
|
||||
* @param retrieveNew
|
||||
* @return
|
||||
*/
|
||||
public FFMPRecord getQPERecord(ProductXML product, String siteKey,
|
||||
String dataKey, String sourceName, Date date, String phuc,
|
||||
boolean retrieveNew) {
|
||||
String dataKey, String sourceName, Date date, boolean retrieveNew) {
|
||||
|
||||
// comparisons done with table display
|
||||
if (product != null) {
|
||||
sourceName = product.getQpe();
|
||||
}
|
||||
|
||||
return getFFMPData(product, siteKey, dataKey, sourceName, date, phuc,
|
||||
return getFFMPData(product, siteKey, dataKey, sourceName, date,
|
||||
retrieveNew);
|
||||
}
|
||||
|
||||
|
@ -1095,12 +1099,11 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
* Get the rate record.
|
||||
*
|
||||
* @param date
|
||||
* @param phuc
|
||||
* @param retrieveNew
|
||||
* @return
|
||||
*/
|
||||
public FFMPRecord getRateRecord(ProductXML product, String siteKey,
|
||||
String dataKey, String sourceName, Date date, String phuc,
|
||||
String dataKey, String sourceName, Date date,
|
||||
boolean retrieveNew) {
|
||||
|
||||
// comparisons done with table display
|
||||
|
@ -1108,7 +1111,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
sourceName = product.getRate();
|
||||
}
|
||||
|
||||
return getFFMPData(product, siteKey, dataKey, sourceName, date, phuc,
|
||||
return getFFMPData(product, siteKey, dataKey, sourceName, date,
|
||||
retrieveNew);
|
||||
}
|
||||
|
||||
|
@ -1142,8 +1145,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
* @return
|
||||
*/
|
||||
public FFMPRecord getQPFRecord(ProductXML product, String siteKey,
|
||||
String dataKey, String sourceName, Date date, String phuc,
|
||||
boolean retrieveNew) {
|
||||
String dataKey, String sourceName, Date date, boolean retrieveNew) {
|
||||
|
||||
FfmpTableConfigData ffmpTableCfgData = FfmpTableConfig.getInstance()
|
||||
.getTableConfigData(siteKey);
|
||||
|
@ -1157,7 +1159,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
.getSourceName();
|
||||
}
|
||||
|
||||
return getFFMPData(product, siteKey, dataKey, sourceName, date, phuc,
|
||||
return getFFMPData(product, siteKey, dataKey, sourceName, date,
|
||||
retrieveNew);
|
||||
}
|
||||
|
||||
|
@ -1210,8 +1212,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
sourceName = source.getDisplayName();
|
||||
}
|
||||
|
||||
return getFFMPData(product, siteKey, null, sourceName, date, phuc,
|
||||
false);
|
||||
return getFFMPData(product, siteKey, null, sourceName, date, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1226,7 +1227,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
* @return
|
||||
*/
|
||||
public Map<String, FFMPRecord> getGuidanceRecords(ProductXML product,
|
||||
String siteKey, Date date, String phuc, boolean retrieveNew) {
|
||||
String siteKey, Date date, boolean retrieveNew) {
|
||||
|
||||
Map<String, FFMPRecord> guidRecs = new HashMap<String, FFMPRecord>();
|
||||
ProductRunXML productRun = FFMPRunConfigurationManager.getInstance()
|
||||
|
@ -1236,7 +1237,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
for (String type : guidTypes) {
|
||||
|
||||
FFMPRecord guidRec = getFFMPData(product, siteKey, null, type,
|
||||
date, phuc, retrieveNew);
|
||||
date, retrieveNew);
|
||||
guidRecs.put(type, guidRec);
|
||||
}
|
||||
|
||||
|
@ -1275,7 +1276,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
* @return
|
||||
*/
|
||||
public FFMPRecord getVirtualRecord(ProductXML product, String siteKey,
|
||||
String dataKey, String sourceName, Date date, String phuc,
|
||||
String dataKey, String sourceName, Date date,
|
||||
boolean retrieveNew) {
|
||||
// comparisons done with table display
|
||||
// field doesn't matter here
|
||||
|
@ -1284,7 +1285,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
sourceName = product.getVirtual();
|
||||
}
|
||||
|
||||
return getFFMPData(product, siteKey, dataKey, sourceName, date, phuc,
|
||||
return getFFMPData(product, siteKey, dataKey, sourceName, date,
|
||||
retrieveNew);
|
||||
}
|
||||
|
||||
|
@ -1305,7 +1306,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
FFMPRecord record = siteDataMap.get(siteKey).getSourceData(sourceName)
|
||||
.getRecord();
|
||||
if (record != null) {
|
||||
FFMPBasinData basinData = record.getBasinData(phuc);
|
||||
FFMPBasinData basinData = record.getBasinData();
|
||||
if (basinData != null) {
|
||||
basin = basinData.get(pfaf);
|
||||
}
|
||||
|
@ -1350,7 +1351,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
.get(siteKey)
|
||||
.getSourceData(
|
||||
source.getSourceName())
|
||||
.getLoadedUris(phuc).contains(uri)) {
|
||||
.getLoadedUris().contains(uri)) {
|
||||
// populate point only
|
||||
populateFFMPBasin(uri, siteKey,
|
||||
source.getSourceName(), phuc,
|
||||
|
@ -1376,7 +1377,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
for (String uri : uris) {
|
||||
if (!siteDataMap.get(siteKey)
|
||||
.getSourceData(sourceName)
|
||||
.getLoadedUris(phuc).contains(uri)) {
|
||||
.getLoadedUris().contains(uri)) {
|
||||
// populate point only
|
||||
populateFFMPBasin(uri, siteKey, sourceName,
|
||||
phuc, fgb);
|
||||
|
@ -1397,7 +1398,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
POINT_RETRIVAL: for (List<String> uris : availableUris.values()) {
|
||||
for (String uri : uris) {
|
||||
if (!siteDataMap.get(siteKey).getSourceData(sourceName)
|
||||
.getLoadedUris(phuc).contains(uri)) {
|
||||
.getLoadedUris().contains(uri)) {
|
||||
// populate point only
|
||||
populateFFMPBasin(uri, siteKey, sourceName, phuc,
|
||||
basin);
|
||||
|
@ -1593,21 +1594,15 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
.hasLoadedAnyUris()) {
|
||||
FFMPSourceData sourceData = siteData
|
||||
.getSourceData(sourceName);
|
||||
Set<String> hucs = sourceData
|
||||
.getLoadedHucs();
|
||||
for (String huc : hucs) {
|
||||
sourceData.getLoadedUris(huc).remove(
|
||||
uri);
|
||||
}
|
||||
|
||||
sourceData.removeLoadedUri(uri);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
FFMPSourceData sourceData = siteData
|
||||
.getSourceData(fsource);
|
||||
Set<String> hucs = sourceData.getLoadedHucs();
|
||||
for (String huc : hucs) {
|
||||
sourceData.getLoadedUris(huc).remove(uri);
|
||||
}
|
||||
|
||||
sourceData.removeLoadedUri(uri);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1625,16 +1620,14 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
* @param siteKey
|
||||
* @param sourceName
|
||||
* @param barrierTime
|
||||
* @param phuc
|
||||
*/
|
||||
public void processUri(String uri, String siteKey, String sourceName,
|
||||
Date barrierTime, String phuc) {
|
||||
Date barrierTime) {
|
||||
if (uri != null) {
|
||||
try {
|
||||
FFMPRecord record = populateFFMPRecord(uri, siteKey,
|
||||
sourceName, phuc);
|
||||
FFMPRecord record = populateFFMPRecord(uri, siteKey, sourceName);
|
||||
if (record != null) {
|
||||
record.getBasinData(phuc).loadNow();
|
||||
record.getBasinData().loadNow();
|
||||
SourceXML source = getSourceConfig().getSource(sourceName);
|
||||
if (source != null) {
|
||||
record.setExpiration(source
|
||||
|
@ -1656,10 +1649,10 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
* @param sourceName
|
||||
*/
|
||||
public void processUris(NavigableMap<Date, List<String>> uriMap,
|
||||
String siteKey, String sourceName, Date barrierTime, String phuc,
|
||||
String siteKey, String sourceName, Date barrierTime,
|
||||
SubMonitor smonitor) {
|
||||
FFMPProcessUris processor = new FFMPProcessUris(this, uriMap, siteKey,
|
||||
sourceName, barrierTime, phuc);
|
||||
sourceName, barrierTime);
|
||||
processor.run(smonitor);
|
||||
}
|
||||
|
||||
|
@ -2126,16 +2119,13 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
|
||||
final String fsource;
|
||||
|
||||
final String fhuc;
|
||||
|
||||
final String fsiteKey;
|
||||
|
||||
public FFMPLoadRecord(String siteKey, FFMPRecord ffmpRec,
|
||||
String source, String huc) throws Exception {
|
||||
public FFMPLoadRecord(String siteKey, FFMPRecord ffmpRec, String source)
|
||||
throws Exception {
|
||||
this.fffmpRec = ffmpRec;
|
||||
this.fsource = source;
|
||||
this.fsiteKey = siteKey;
|
||||
this.fhuc = huc;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
|
@ -2143,7 +2133,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
load();
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.PROBLEM, "FFMP load FFMPData, "
|
||||
+ fsource + " " + fhuc, e);
|
||||
+ fsource, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2151,7 +2141,7 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
|
||||
if (fffmpRec != null) {
|
||||
|
||||
List<String> uris = getLoadedUris(fsiteKey, fsource, fhuc);
|
||||
List<String> uris = getLoadedUris(fsiteKey, fsource);
|
||||
String dataUri = fffmpRec.getDataURI();
|
||||
if (!uris.contains(dataUri)) {
|
||||
Date refTime = fffmpRec.getDataTime().getRefTime();
|
||||
|
@ -2188,20 +2178,20 @@ public class FFMPMonitor extends ResourceMonitor {
|
|||
|
||||
try {
|
||||
|
||||
if (isGageSource && fhuc.equals(FFMPRecord.ALL)) {
|
||||
if (isGageSource) {
|
||||
curRecord.retrieveVirtualMapFromDataStore(loc,
|
||||
dataUri, getTemplates(fsiteKey), refTime,
|
||||
fffmpRec.getSourceName());
|
||||
} else {
|
||||
curRecord.retrieveMapFromDataStore(loc, dataUri,
|
||||
getTemplates(fffmpRec.getSiteKey()), fhuc,
|
||||
getTemplates(fffmpRec.getSiteKey()),
|
||||
refTime, fffmpRec.getSourceName());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"FFMP Can't retrieve FFMP URI, " + dataUri, e);
|
||||
}
|
||||
sourceData.addLoadedUri(fhuc, dataUri);
|
||||
sourceData.addLoadedUri(dataUri);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 7, 2013 njensen Initial creation
|
||||
* Jul 15, 2013 2184 dhladky Removed all HUC's but ALL
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -64,18 +65,15 @@ public class FFMPProcessUris {
|
|||
|
||||
private final Date fbarrierTime;
|
||||
|
||||
private final String fhuc;
|
||||
|
||||
private final FFMPMonitor ffmpMonitor;
|
||||
|
||||
public FFMPProcessUris(FFMPMonitor ffmpMonitor,
|
||||
NavigableMap<Date, List<String>> uriMap, String siteKey,
|
||||
String sourceName, Date barrierTime, String phuc) {
|
||||
String sourceName, Date barrierTime) {
|
||||
this.furiMap = uriMap;
|
||||
this.fsiteKey = siteKey;
|
||||
this.fbarrierTime = barrierTime;
|
||||
this.fsourceName = sourceName;
|
||||
this.fhuc = phuc;
|
||||
this.ffmpMonitor = ffmpMonitor;
|
||||
}
|
||||
|
||||
|
@ -90,7 +88,7 @@ public class FFMPProcessUris {
|
|||
isGuidance = true;
|
||||
}
|
||||
List<String> loadedUris = ffmpMonitor.getLoadedUris(fsiteKey,
|
||||
fsourceName, fhuc);
|
||||
fsourceName);
|
||||
Set<FFMPRecord> populatedRecords = new HashSet<FFMPRecord>();
|
||||
for (List<String> uris : furiMap.descendingMap().values()) {
|
||||
for (String uri : uris) {
|
||||
|
@ -102,7 +100,7 @@ public class FFMPProcessUris {
|
|||
|| isGuidance) {
|
||||
try {
|
||||
record = ffmpMonitor.populateFFMPRecord(uri,
|
||||
fsiteKey, fsourceName, fhuc);
|
||||
fsiteKey, fsourceName);
|
||||
if (record != null) {
|
||||
populatedRecords.add(record);
|
||||
if (source != null) {
|
||||
|
@ -121,7 +119,7 @@ public class FFMPProcessUris {
|
|||
|
||||
monitor.beginTask(null, populatedRecords.size());
|
||||
for (FFMPRecord record : populatedRecords) {
|
||||
record.getBasinData(fhuc).loadNow();
|
||||
record.getBasinData().loadNow();
|
||||
monitor.worked(1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,11 +20,9 @@
|
|||
package com.raytheon.uf.viz.monitor.ffmp;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.concurrent.ConcurrentNavigableMap;
|
||||
import java.util.concurrent.ConcurrentSkipListMap;
|
||||
|
||||
|
@ -42,6 +40,7 @@ import com.raytheon.uf.common.dataplugin.ffmp.FFMPRecord;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 18, 2013 njensen Initial creation
|
||||
* Feb 28, 2013 1729 dhladky Sped up, synch blocks were hanging it.
|
||||
* Jul 15, 2013 2184 dhladky Removed all HUC's but ALL
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -59,7 +58,7 @@ public class FFMPSourceData {
|
|||
private ConcurrentNavigableMap<Date, List<String>> availableUris = new ConcurrentSkipListMap<Date, List<String>>();
|
||||
|
||||
/** map of huc to list of loaded URIs **/
|
||||
private ConcurrentMap<String, List<String>> loadedUris = new ConcurrentHashMap<String, List<String>>();
|
||||
private List<String> loadedUris = new ArrayList<String>();
|
||||
|
||||
/**
|
||||
* Clears the data
|
||||
|
@ -68,7 +67,9 @@ public class FFMPSourceData {
|
|||
ffmpData = null;
|
||||
previousUriQueryDate = null;
|
||||
availableUris.clear();
|
||||
loadedUris.clear();
|
||||
synchronized (loadedUris) {
|
||||
loadedUris.clear();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -110,45 +111,23 @@ public class FFMPSourceData {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets the URIs associated with a HUC that have been loaded.
|
||||
* Gets the URIs that have been loaded.
|
||||
*
|
||||
* @param huc
|
||||
* @return
|
||||
*/
|
||||
public List<String> getLoadedUris(String huc) {
|
||||
|
||||
List<String> loaded = loadedUris.get(huc);
|
||||
|
||||
if (loaded == null) {
|
||||
loaded = new ArrayList<String>();
|
||||
List<String> previous = loadedUris.putIfAbsent(huc, loaded);
|
||||
if (previous != null) {
|
||||
return previous;
|
||||
}
|
||||
}
|
||||
|
||||
return loaded;
|
||||
public List<String> getLoadedUris() {
|
||||
return Collections.unmodifiableList(loadedUris);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tracks a URI associated with a HUC as loaded.
|
||||
* Tracks a URI as loaded.
|
||||
*
|
||||
* @param huc
|
||||
* @param uri
|
||||
*/
|
||||
public void addLoadedUri(String huc, String uri) {
|
||||
|
||||
List<String> uriList = loadedUris.get(huc);
|
||||
|
||||
if (uriList == null) {
|
||||
uriList = new ArrayList<String>();
|
||||
List<String> previous = loadedUris.putIfAbsent(huc, uriList);
|
||||
if (previous != null) {
|
||||
uriList = previous;
|
||||
}
|
||||
public void addLoadedUri(String uri) {
|
||||
synchronized (loadedUris) {
|
||||
loadedUris.add(uri);
|
||||
}
|
||||
|
||||
uriList.add(uri);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -160,15 +139,6 @@ public class FFMPSourceData {
|
|||
return !loadedUris.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the set of HUCs that have loaded some URIs.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Set<String> getLoadedHucs() {
|
||||
return loadedUris.keySet();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Available URIs based on time.
|
||||
*
|
||||
|
@ -178,4 +148,15 @@ public class FFMPSourceData {
|
|||
return availableUris;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a URI
|
||||
*
|
||||
* @param uri
|
||||
*/
|
||||
public void removeLoadedUri(String uri) {
|
||||
synchronized (loadedUris) {
|
||||
loadedUris.remove(uri);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -120,6 +120,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
|
|||
* Apr 25, 2013 1902 mpduff Fixed Thresholds dialog on multiple opens, needed an isDisposed check.
|
||||
* Jun 04, 2013 1984 lvenable removed unnecessary code.
|
||||
* Jun 06, 2013 2075 njensen Removed loading labels
|
||||
* Jul 09, 2013 2152 njensen Fix potential widget disposed error
|
||||
* Jun 20, 2013 14907 gzhang Thresholds menu ColorCell check fix.
|
||||
* </pre>
|
||||
*
|
||||
|
@ -2163,7 +2164,12 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
VizApp.runAsync(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
processUpdate(fupdateData);
|
||||
// need to check again because if the UI thread had
|
||||
// a sizable queue, it could be disposed before this
|
||||
// executes
|
||||
if (!FfmpBasinTableDlg.this.isDisposed()) {
|
||||
processUpdate(fupdateData);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -77,6 +77,8 @@ import com.raytheon.uf.viz.monitor.ffmp.ui.dialogs.FfmpTableConfigData;
|
|||
* May 22, 2013 1902 mpduff Code cleanup.
|
||||
* Jun 11, 2013 2085 njensen Extracted row creation to FFMPRowGenerator and
|
||||
* multi-threaded row creation.
|
||||
* July 1, 2013 2155 dhladky Fixed bug that created more rows than were actually needed.
|
||||
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -164,134 +166,144 @@ public class FFMPDataGenerator {
|
|||
public FFMPTableData generateFFMPData() throws Exception {
|
||||
// You should always have at least a QPE data source
|
||||
FFMPTableData tData = null;
|
||||
|
||||
// update the FFFGDataManager
|
||||
FFFGDataMgr.getUpdatedInstance();
|
||||
|
||||
try {
|
||||
|
||||
FIELDS field = getBaseField();
|
||||
|
||||
if (field == null || baseRec == null) {
|
||||
return tData;
|
||||
}
|
||||
FFMPBasinData fbd = null;
|
||||
if (centeredAggregationKey != null) {
|
||||
fbd = baseRec.getBasinData(FFMPRecord.ALL);
|
||||
} else {
|
||||
fbd = baseRec.getBasinData(huc);
|
||||
}
|
||||
|
||||
tData = new FFMPTableData(fbd.getBasins().size());
|
||||
List<DomainXML> domains = resource.getDomains();
|
||||
if (!fbd.getBasins().isEmpty()) {
|
||||
if ((centeredAggregationKey == null)
|
||||
|| huc.equals(FFMPRecord.ALL)) {
|
||||
// System.out.println(fbd.getBasins().keySet().size()
|
||||
// + " rows in the table");
|
||||
|
||||
if ((centeredAggregationKey == null) || huc.equals(FFMPRecord.ALL)) {
|
||||
// System.out.println(fbd.getBasins().keySet().size()
|
||||
// + " rows in the table");
|
||||
if (huc.equals(FFMPRecord.ALL)) {
|
||||
|
||||
FFMPBasinData fbd = baseRec.getBasinData();
|
||||
tData = new FFMPTableData(fbd.getBasins().size());
|
||||
|
||||
for (Long key : fbd.getBasins().keySet()) {
|
||||
if (huc.equals(FFMPRecord.ALL)) {
|
||||
FFMPBasinMetaData fmdb = ft.getBasin(siteKey, key);
|
||||
if (fmdb == null) {
|
||||
continue;
|
||||
}
|
||||
FFMPBasinMetaData fmdb = ft.getBasin(siteKey, key);
|
||||
if (fmdb == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (DomainXML domain : domains) {
|
||||
String cwa = domain.getCwa();
|
||||
for (DomainXML domain : domains) {
|
||||
|
||||
if ((cwa.equals(fmdb.getCwa()))
|
||||
|| (domain.isPrimary() && fmdb
|
||||
.isPrimaryCwa())) {
|
||||
try {
|
||||
setFFMPRow(fbd.get(key), tData, false,
|
||||
cwa);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Couldn't create table row", e);
|
||||
}
|
||||
if (virtualBasin != null) {
|
||||
for (Long id : ft
|
||||
.getVirtualGageBasinLookupIds(
|
||||
siteKey, key, huc,
|
||||
resource.basinTableDlg
|
||||
.getRowName())) {
|
||||
try {
|
||||
setFFMPRow(
|
||||
virtualBasin.get(id),
|
||||
tData, true, cwa);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(
|
||||
Priority.PROBLEM,
|
||||
"Couldn't create table row"
|
||||
+ e);
|
||||
}
|
||||
}
|
||||
}
|
||||
String cwa = domain.getCwa();
|
||||
|
||||
if ((cwa.equals(fmdb.getCwa()))
|
||||
|| (domain.isPrimary() && fmdb
|
||||
.isPrimaryCwa())) {
|
||||
try {
|
||||
setFFMPRow(fbd.get(key), tData, false, cwa);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Couldn't create table row", e);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
/*
|
||||
* make sure at least one basin in the agg is in the
|
||||
* CWA
|
||||
*/
|
||||
|
||||
List<Long> pfafs = ft.getAggregatePfafs(key,
|
||||
siteKey, huc);
|
||||
|
||||
boolean isVGB = false;
|
||||
if (ft.checkVGBsInAggregate(key, siteKey, huc)) {
|
||||
isVGB = true;
|
||||
}
|
||||
|
||||
if (!pfafs.isEmpty()) {
|
||||
|
||||
FFMPBasinMetaData fmdb = ft.getBasinInDomains(
|
||||
siteKey, domains, pfafs);
|
||||
|
||||
if (fmdb != null) {
|
||||
try {
|
||||
setFFMPRow(fbd.get(key), tData, isVGB,
|
||||
null);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Couldn't create table row", e);
|
||||
if (virtualBasin != null) {
|
||||
for (Long id : ft
|
||||
.getVirtualGageBasinLookupIds(
|
||||
siteKey, key, huc,
|
||||
resource.basinTableDlg
|
||||
.getRowName())) {
|
||||
try {
|
||||
setFFMPRow(virtualBasin.get(id),
|
||||
tData, true, cwa);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(
|
||||
Priority.PROBLEM,
|
||||
"Couldn't create table row"
|
||||
+ e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
// Find all of the basins for this HUC level
|
||||
List<Long> keyList = ft
|
||||
.getHucKeyList(siteKey, huc, domains);
|
||||
tData = new FFMPTableData(keyList.size());
|
||||
|
||||
for (Long key : keyList) {
|
||||
|
||||
List<Long> pfafs = ft.getAggregatePfafs(key, siteKey,
|
||||
huc);
|
||||
|
||||
boolean isVGB = false;
|
||||
if (ft.checkVGBsInAggregate(key, siteKey, huc)) {
|
||||
isVGB = true;
|
||||
}
|
||||
|
||||
if (!pfafs.isEmpty()) {
|
||||
|
||||
FFMPBasinMetaData fmdb = ft.getBasinInDomains(
|
||||
siteKey, domains, pfafs);
|
||||
|
||||
if (fmdb != null) {
|
||||
try {
|
||||
FFMPBasin basin = new FFMPBasin(key, true);
|
||||
setFFMPRow(basin, tData, isVGB, null);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Couldn't create table row", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
// show pfafs in aggregation
|
||||
else {
|
||||
for (Long key : resource.getCenteredAggregatePfafs()) {
|
||||
|
||||
FFMPBasinMetaData fmdb = ft.getBasin(siteKey, key);
|
||||
}
|
||||
|
||||
if (fmdb != null) {
|
||||
for (DomainXML domain : domains) {
|
||||
// show pfafs in aggregation
|
||||
else {
|
||||
FFMPBasinData fbd = baseRec.getBasinData();
|
||||
List<Long> centerAggPfafs = resource
|
||||
.getCenteredAggregatePfafs();
|
||||
tData = new FFMPTableData(centerAggPfafs.size());
|
||||
|
||||
if ((domain.getCwa().equals(fmdb.getCwa()))
|
||||
|| (domain.isPrimary() && fmdb
|
||||
.isPrimaryCwa())) {
|
||||
for (Long key : centerAggPfafs) {
|
||||
|
||||
setFFMPRow(fbd.get(key), tData, false, null);
|
||||
FFMPBasinMetaData fmdb = ft.getBasin(siteKey, key);
|
||||
|
||||
if (virtualBasin != null) {
|
||||
for (Long id : ft
|
||||
.getVirtualGageBasinLookupIds(
|
||||
siteKey, key, huc,
|
||||
resource.basinTableDlg
|
||||
.getRowName())) {
|
||||
try {
|
||||
setFFMPRow(
|
||||
virtualBasin.get(id),
|
||||
tData, true, null);
|
||||
} catch (Exception e) {
|
||||
statusHandler
|
||||
.handle(Priority.PROBLEM,
|
||||
"Couldn't create table row",
|
||||
e);
|
||||
}
|
||||
if (fmdb != null) {
|
||||
for (DomainXML domain : domains) {
|
||||
if ((domain.getCwa().equals(fmdb.getCwa()))
|
||||
|| (domain.isPrimary() && fmdb
|
||||
.isPrimaryCwa())) {
|
||||
|
||||
setFFMPRow(fbd.get(key), tData, false, null);
|
||||
|
||||
if (virtualBasin != null) {
|
||||
|
||||
// We *DO NOT* want all of the aggregate
|
||||
// VGB's,
|
||||
// just the one's for this individual basin.
|
||||
List<Long> virtuals = ft
|
||||
.getVirtualGageBasinLookupIds(
|
||||
siteKey, key,
|
||||
FFMPRecord.ALL,
|
||||
resource.basinTableDlg
|
||||
.getRowName());
|
||||
|
||||
for (Long id : virtuals) {
|
||||
try {
|
||||
setFFMPRow(virtualBasin.get(id),
|
||||
tData, true, null);
|
||||
} catch (Exception e) {
|
||||
statusHandler
|
||||
.handle(Priority.PROBLEM,
|
||||
"Couldn't create table row",
|
||||
e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -333,7 +345,6 @@ public class FFMPDataGenerator {
|
|||
Date tableTime = resource.getTableTime();
|
||||
|
||||
FIELDS field = null;
|
||||
String localHuc = null;
|
||||
|
||||
FfmpTableConfigData ffmpTableCfgData = FfmpTableConfig.getInstance()
|
||||
.getTableConfigData(siteKey);
|
||||
|
@ -358,37 +369,27 @@ public class FFMPDataGenerator {
|
|||
|
||||
monitor.setQpeWindow(new FFMPTimeWindow(tableTime, qpeTime));
|
||||
|
||||
if (isWorstCase || (centeredAggregationKey != null)) {
|
||||
// make sure that "ALL" is loaded
|
||||
localHuc = FFMPRecord.ALL;
|
||||
} else {
|
||||
localHuc = huc;
|
||||
}
|
||||
|
||||
FFMPRecord rateRecord = monitor.getRateRecord(product, siteKey,
|
||||
dataKey, product.getRate(), paintRefTime, localHuc, true);
|
||||
dataKey, product.getRate(), paintRefTime, true);
|
||||
FFMPRecord qpeRecord = monitor.getQPERecord(product, siteKey, dataKey,
|
||||
product.getQpe(), tableTime, localHuc, true);
|
||||
product.getQpe(), tableTime, true);
|
||||
FFMPRecord qpfRecord = monitor.getQPFRecord(product, siteKey, dataKey,
|
||||
null, paintRefTime, localHuc, true);
|
||||
null, paintRefTime, true);
|
||||
guidRecords = monitor.getGuidanceRecords(product, siteKey, tableTime,
|
||||
localHuc, true);
|
||||
FFMPRecord virtualRecord = null;
|
||||
if (localHuc.equals(FFMPRecord.ALL)) {
|
||||
virtualRecord = monitor.getVirtualRecord(product, siteKey, dataKey,
|
||||
product.getVirtual(), tableTime, localHuc, true);
|
||||
}
|
||||
true);
|
||||
FFMPRecord virtualRecord = monitor.getVirtualRecord(product, siteKey,
|
||||
dataKey, product.getVirtual(), tableTime, true);
|
||||
|
||||
try {
|
||||
if (rateRecord != null) {
|
||||
rateBasin = rateRecord.getBasinData(localHuc);
|
||||
rateBasin = rateRecord.getBasinData();
|
||||
if (!rateBasin.getBasins().isEmpty()) {
|
||||
field = FIELDS.RATE;
|
||||
baseRec = rateRecord;
|
||||
}
|
||||
}
|
||||
if (qpeRecord != null) {
|
||||
qpeBasin = qpeRecord.getBasinData(localHuc);
|
||||
qpeBasin = qpeRecord.getBasinData();
|
||||
if (!qpeBasin.getBasins().isEmpty()) {
|
||||
field = FIELDS.QPE;
|
||||
if (baseRec == null) {
|
||||
|
@ -397,21 +398,21 @@ public class FFMPDataGenerator {
|
|||
}
|
||||
}
|
||||
if (qpfRecord != null) {
|
||||
qpfBasin = qpfRecord.getBasinData(localHuc);
|
||||
qpfBasin = qpfRecord.getBasinData();
|
||||
}
|
||||
if (guidRecords != null) {
|
||||
guidBasins = new HashMap<String, FFMPBasinData>();
|
||||
for (String type : guidRecords.keySet()) {
|
||||
if (guidRecords.get(type) != null) {
|
||||
guidBasins.put(type, guidRecords.get(type)
|
||||
.getBasinData(localHuc));
|
||||
.getBasinData());
|
||||
} else {
|
||||
guidBasins.put(type, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (virtualRecord != null) {
|
||||
virtualBasin = virtualRecord.getBasinData(localHuc);
|
||||
virtualBasin = virtualRecord.getBasinData();
|
||||
}
|
||||
|
||||
// Get interpolators
|
||||
|
|
|
@ -169,6 +169,9 @@ import com.vividsolutions.jts.geom.Point;
|
|||
* Apr 26, 2013 1954 bsteffen Minor code cleanup throughout FFMP.
|
||||
* Jun 06, 2013 2075 njensen No longer schedules load threads,
|
||||
* refactored updates
|
||||
* Jun 27, 2013 2152 njensen More thorough disposeInternal()
|
||||
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -538,8 +541,6 @@ public class FFMPResource extends
|
|||
*/
|
||||
@Override
|
||||
public void hucChanged() {
|
||||
|
||||
center = null;
|
||||
lowestCenter = FFMPRecord.ZOOM.WFO;
|
||||
|
||||
if (isAutoRefresh()) {
|
||||
|
@ -598,15 +599,12 @@ public class FFMPResource extends
|
|||
private FFMPBasin getBasin(Long key, FFMPRecord.FIELDS bfield,
|
||||
Date recentTime, boolean aggregate) throws VizException {
|
||||
FFMPBasin basin = null;
|
||||
|
||||
String huc = null;
|
||||
if (aggregate) {
|
||||
huc = getHuc();
|
||||
basin = new FFMPBasin(key, aggregate);
|
||||
} else {
|
||||
huc = FFMPRecord.ALL;
|
||||
basin = getRecord(bfield, recentTime).getBasinData().getBasins()
|
||||
.get(key);
|
||||
}
|
||||
basin = getRecord(bfield, recentTime).getBasinData(huc).getBasins()
|
||||
.get(key);
|
||||
|
||||
return basin;
|
||||
}
|
||||
|
@ -680,14 +678,14 @@ public class FFMPResource extends
|
|||
break;
|
||||
}
|
||||
case RATE: {
|
||||
value = getRateRecord(recentTime).getBasinData(
|
||||
FFMPRecord.ALL).getMaxValue(pfafs, recentTime);
|
||||
value = getRateRecord(recentTime).getBasinData()
|
||||
.getMaxValue(pfafs, recentTime);
|
||||
break;
|
||||
}
|
||||
case QPF: {
|
||||
value = getQpfRecord(recentTime).getBasinData(
|
||||
FFMPRecord.ALL).getAverageMaxValue(pfafs,
|
||||
recentTime, getQpfSourceExpiration());
|
||||
value = getQpfRecord(recentTime).getBasinData()
|
||||
.getAverageMaxValue(pfafs, recentTime,
|
||||
getQpfSourceExpiration());
|
||||
break;
|
||||
}
|
||||
case GUIDANCE: {
|
||||
|
@ -695,21 +693,17 @@ public class FFMPResource extends
|
|||
.getCountyFipsByPfaf(pfafs.get(0));
|
||||
|
||||
value = getGuidanceRecord()
|
||||
.getBasinData(FFMPRecord.ALL)
|
||||
.getBasinData()
|
||||
.getMaxGuidanceValue(pfafs,
|
||||
getGuidanceInterpolation(getFFGName()),
|
||||
getGuidSourceExpiration(getFFGName()), fips);
|
||||
break;
|
||||
}
|
||||
case QPE: {
|
||||
value = getQpeRecord().getBasinData(FFMPRecord.ALL)
|
||||
.getAccumMaxValue(
|
||||
pfafs,
|
||||
recentTime,
|
||||
getTableTime(),
|
||||
getQpeSourceExpiration(),
|
||||
getResourceData().getPrimarySourceXML()
|
||||
.isRate());
|
||||
value = getQpeRecord().getBasinData().getAccumMaxValue(
|
||||
pfafs, recentTime, getTableTime(),
|
||||
getQpeSourceExpiration(),
|
||||
getResourceData().getPrimarySourceXML().isRate());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -737,32 +731,64 @@ public class FFMPResource extends
|
|||
break;
|
||||
}
|
||||
case RATE:
|
||||
value = getBasin(key, field, recentTime, aggregate)
|
||||
.getValue(recentTime);
|
||||
if (aggregate) {
|
||||
value = getRateRecord(recentTime).getBasinData()
|
||||
.getAverageValue(pfafs, recentTime);
|
||||
} else {
|
||||
value = getBasin(key, field, recentTime, aggregate)
|
||||
.getValue(recentTime);
|
||||
}
|
||||
|
||||
break;
|
||||
case QPF: {
|
||||
value = getBasin(key, field, recentTime, aggregate)
|
||||
.getAverageValue(recentTime,
|
||||
getQpfSourceExpiration());
|
||||
if (aggregate) {
|
||||
value = getQpfRecord(recentTime).getBasinData()
|
||||
.getAverageValue(pfafs, recentTime,
|
||||
getQpfSourceExpiration());
|
||||
} else {
|
||||
value = getBasin(key, field, recentTime, aggregate)
|
||||
.getAverageValue(recentTime,
|
||||
getQpfSourceExpiration());
|
||||
}
|
||||
break;
|
||||
}
|
||||
case GUIDANCE: {
|
||||
|
||||
value = getGuidanceValue(
|
||||
(FFMPGuidanceBasin) getBasin(key, field,
|
||||
recentTime, aggregate), recentTime,
|
||||
getFFGName());
|
||||
|
||||
if (aggregate) {
|
||||
getGuidanceRecord()
|
||||
.getBasinData()
|
||||
.getAverageGuidanceValue(
|
||||
pfafs,
|
||||
getGuidanceInterpolation(getFFGName()),
|
||||
getGuidSourceExpiration(getFFGName()));
|
||||
} else {
|
||||
value = getGuidanceValue(
|
||||
(FFMPGuidanceBasin) getBasin(key, field,
|
||||
recentTime, aggregate), recentTime,
|
||||
getFFGName());
|
||||
}
|
||||
break;
|
||||
}
|
||||
case QPE: {
|
||||
value = getBasin(key, field, recentTime, aggregate)
|
||||
.getAccumValue(
|
||||
getTableTime(),
|
||||
recentTime,
|
||||
getQpeSourceExpiration(),
|
||||
getResourceData().getPrimarySourceXML()
|
||||
.isRate());
|
||||
if (aggregate) {
|
||||
value = getQpeRecord().getBasinData()
|
||||
.getAccumAverageValue(
|
||||
pfafs,
|
||||
getTableTime(),
|
||||
recentTime,
|
||||
getQpeSourceExpiration(),
|
||||
getResourceData()
|
||||
.getPrimarySourceXML()
|
||||
.isRate());
|
||||
} else {
|
||||
value = getBasin(key, field, recentTime, aggregate)
|
||||
.getAccumValue(
|
||||
getTableTime(),
|
||||
recentTime,
|
||||
getQpeSourceExpiration(),
|
||||
getResourceData()
|
||||
.getPrimarySourceXML()
|
||||
.isRate());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -810,17 +836,15 @@ public class FFMPResource extends
|
|||
boolean forced = forceResult.isForced();
|
||||
if ((forcedPfafs.size() > 0) && forced) {
|
||||
// Recalculate the guidance using the forced value(s)
|
||||
value = guidRecord.getBasinData(FFMPRecord.ALL)
|
||||
.getAverageGuidanceValue(pfafList,
|
||||
this.getGuidanceInterpolation(ffgType),
|
||||
new Float(value), forcedPfafs,
|
||||
getGuidSourceExpiration(ffgType));
|
||||
value = guidRecord.getBasinData().getAverageGuidanceValue(
|
||||
pfafList, this.getGuidanceInterpolation(ffgType),
|
||||
new Float(value), forcedPfafs,
|
||||
getGuidSourceExpiration(ffgType));
|
||||
} else if (forcedPfafs.size() > 0) {
|
||||
value = guidRecord.getBasinData(FFMPRecord.ALL)
|
||||
.getAverageGuidanceValue(pfafList,
|
||||
this.getGuidanceInterpolation(ffgType),
|
||||
Float.NaN, forcedPfafs,
|
||||
getGuidSourceExpiration(ffgType));
|
||||
value = guidRecord.getBasinData().getAverageGuidanceValue(
|
||||
pfafList, this.getGuidanceInterpolation(ffgType),
|
||||
Float.NaN, forcedPfafs,
|
||||
getGuidSourceExpiration(ffgType));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -906,10 +930,8 @@ public class FFMPResource extends
|
|||
|
||||
if ((rateRecord == null) && isNewRate) {
|
||||
try {
|
||||
String huc = getHucIfWorstCase();
|
||||
rateRecord = monitor.getRateRecord(getProduct(), getSiteKey(),
|
||||
getDataKey(), getPrimarySource(), recentTime, huc,
|
||||
false);
|
||||
getDataKey(), getPrimarySource(), recentTime, false);
|
||||
isNewRate = false;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
@ -926,10 +948,9 @@ public class FFMPResource extends
|
|||
public FFMPRecord getQpeRecord() {
|
||||
try {
|
||||
if ((qpeRecord == null) && (getTableTime() != null) && isNewQpe) {
|
||||
String huc = getHucIfWorstCase();
|
||||
qpeRecord = monitor.getQPERecord(getProduct(), getSiteKey(),
|
||||
getDataKey(), getPrimarySource(), getTableTime(), huc,
|
||||
false);
|
||||
qpeRecord = monitor
|
||||
.getQPERecord(getProduct(), getSiteKey(), getDataKey(),
|
||||
getPrimarySource(), getTableTime(), false);
|
||||
isNewQpe = false;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -992,9 +1013,8 @@ public class FFMPResource extends
|
|||
}
|
||||
}
|
||||
|
||||
String huc = getHucIfWorstCase();
|
||||
qpfRecord = monitor.getQPFRecord(getProduct(), getSiteKey(),
|
||||
getDataKey(), getPrimarySource(), date, huc, false);
|
||||
getDataKey(), getPrimarySource(), date, false);
|
||||
isNewQpf = false;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -1014,7 +1034,7 @@ public class FFMPResource extends
|
|||
if ((virtualRecord == null) && isNewVirtual) {
|
||||
virtualRecord = monitor.getVirtualRecord(getProduct(),
|
||||
getSiteKey(), getDataKey(), getPrimarySource(),
|
||||
getTableTime(), FFMPRecord.ALL, false);
|
||||
getTableTime(), false);
|
||||
isNewVirtual = false;
|
||||
}
|
||||
|
||||
|
@ -1067,9 +1087,6 @@ public class FFMPResource extends
|
|||
if (this.getName().indexOf("Table Display") > -1) {
|
||||
if (basinTableDlg != null) {
|
||||
closeDialog();
|
||||
if (smallBasinOverlayShape != null) {
|
||||
smallBasinOverlayShape.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
HucLevelGeometriesFactory.getInstance().clear();
|
||||
|
@ -1079,10 +1096,31 @@ public class FFMPResource extends
|
|||
}
|
||||
}
|
||||
|
||||
// dispose of shapes
|
||||
if (smallBasinOverlayShape != null) {
|
||||
smallBasinOverlayShape.dispose();
|
||||
}
|
||||
if (streamShadedShape != null) {
|
||||
streamShadedShape.dispose();
|
||||
}
|
||||
if (streamOutlineShape != null) {
|
||||
streamOutlineShape.dispose();
|
||||
}
|
||||
shadedShapes.dispose();
|
||||
|
||||
// clear takes care of the drawables
|
||||
clear();
|
||||
resetRecords();
|
||||
for (PixelCoverage px : vgbDrawables.values()) {
|
||||
px.dispose();
|
||||
}
|
||||
vgbDrawables.clear();
|
||||
|
||||
if (monitor.getResourceListenerList().size() == 1) {
|
||||
monitor.nullifyMonitor();
|
||||
// free up the monitor which holds most of the memory
|
||||
FFMPMonitor tempMonitor = monitor;
|
||||
monitor = null;
|
||||
tempMonitor.nullifyMonitor();
|
||||
} else {
|
||||
monitor.removeResourceListener(this);
|
||||
}
|
||||
|
@ -1801,13 +1839,13 @@ public class FFMPResource extends
|
|||
List<Float> guids = null;
|
||||
if ((getQpeRecord() != null)
|
||||
&& (getGuidanceRecord() != null)) {
|
||||
qpes = getQpeRecord().getBasinData(FFMPRecord.ALL)
|
||||
qpes = getQpeRecord().getBasinData()
|
||||
.getAccumValues(pfafs, getTableTime(),
|
||||
recentTime, getQpeSourceExpiration(),
|
||||
isRate());
|
||||
|
||||
guids = getGuidanceRecord()
|
||||
.getBasinData(FFMPRecord.ALL)
|
||||
.getBasinData()
|
||||
.getGuidanceValues(pfafs,
|
||||
getGuidanceInterpolation(ffgType),
|
||||
getGuidSourceExpiration(ffgType));
|
||||
|
@ -1818,20 +1856,19 @@ public class FFMPResource extends
|
|||
} else {
|
||||
if ((getQpeRecord() != null)
|
||||
&& (getGuidanceRecord() != null)) {
|
||||
qpe = getQpeRecord()
|
||||
.getBasinData(getHuc())
|
||||
.get(key)
|
||||
.getAccumValue(
|
||||
qpe = getQpeRecord().getBasinData()
|
||||
.getAccumAverageValue(
|
||||
pfafs,
|
||||
getTableTime(),
|
||||
recentTime,
|
||||
getQpeSourceExpiration(),
|
||||
getResourceData().getPrimarySourceXML()
|
||||
.isRate());
|
||||
|
||||
guid = getGuidanceValue(
|
||||
(FFMPGuidanceBasin) getGuidanceRecord()
|
||||
.getBasinData(getHuc()).get(key),
|
||||
recentTime, ffgType);
|
||||
guid = getGuidanceRecord().getBasinData()
|
||||
.getAverageGuidanceValue(pfafs,
|
||||
getGuidanceInterpolation(ffgType),
|
||||
getGuidSourceExpiration(ffgType));
|
||||
|
||||
diff = FFMPUtils.getDiffValue(qpe, guid);
|
||||
}
|
||||
|
@ -1839,14 +1876,14 @@ public class FFMPResource extends
|
|||
} else {
|
||||
if ((getQpeRecord() != null) && (getGuidanceRecord() != null)) {
|
||||
qpe = getQpeRecord()
|
||||
.getBasinData(FFMPRecord.ALL)
|
||||
.getBasinData()
|
||||
.get(key)
|
||||
.getAccumValue(getTableTime(), recentTime,
|
||||
getQpeSourceExpiration(), isRate());
|
||||
|
||||
guid = getGuidanceValue(
|
||||
(FFMPGuidanceBasin) getGuidanceRecord()
|
||||
.getBasinData(FFMPRecord.ALL).get(key),
|
||||
.getBasinData().get(key),
|
||||
recentTime, ffgType);
|
||||
guid = forceValue(pfafs,
|
||||
getBasin(key, getField(), recentTime, aggregate),
|
||||
|
@ -1881,14 +1918,14 @@ public class FFMPResource extends
|
|||
List<Float> qpes = null;
|
||||
List<Float> guids = null;
|
||||
if (getQpeRecord() != null) {
|
||||
qpes = getQpeRecord().getBasinData(FFMPRecord.ALL)
|
||||
qpes = getQpeRecord().getBasinData()
|
||||
.getAccumValues(pfafs, getTableTime(),
|
||||
recentTime, getQpeSourceExpiration(),
|
||||
isRate());
|
||||
}
|
||||
if (getGuidanceRecord() != null) {
|
||||
guids = getGuidanceRecord()
|
||||
.getBasinData(FFMPRecord.ALL)
|
||||
.getBasinData()
|
||||
.getGuidanceValues(pfafs,
|
||||
getGuidanceInterpolation(ffgType),
|
||||
getGuidSourceExpiration(ffgType));
|
||||
|
@ -1899,32 +1936,31 @@ public class FFMPResource extends
|
|||
} else {
|
||||
if ((getQpeRecord() != null)
|
||||
&& (getGuidanceRecord() != null)) {
|
||||
qpe = getQpeRecord()
|
||||
.getBasinData(getHuc())
|
||||
.get(key)
|
||||
.getAccumValue(
|
||||
qpe = getQpeRecord().getBasinData()
|
||||
.getAccumAverageValue(
|
||||
pfafs,
|
||||
getTableTime(),
|
||||
recentTime,
|
||||
getQpeSourceExpiration(),
|
||||
getResourceData().getPrimarySourceXML()
|
||||
.isRate());
|
||||
guid = getGuidanceValue(
|
||||
(FFMPGuidanceBasin) getGuidanceRecord()
|
||||
.getBasinData(getHuc()).get(key),
|
||||
recentTime, ffgType);
|
||||
ratio = FFMPUtils.getRatioValue(qpe, guid);
|
||||
|
||||
guid = getGuidanceRecord().getBasinData()
|
||||
.getAverageGuidanceValue(pfafs,
|
||||
getGuidanceInterpolation(ffgType),
|
||||
getGuidSourceExpiration(ffgType));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((getQpeRecord() != null) && (getGuidanceRecord() != null)) {
|
||||
qpe = getQpeRecord()
|
||||
.getBasinData(FFMPRecord.ALL)
|
||||
.getBasinData()
|
||||
.get(key)
|
||||
.getAccumValue(getTableTime(), recentTime,
|
||||
getQpeSourceExpiration(), isRate());
|
||||
guid = getGuidanceValue(
|
||||
(FFMPGuidanceBasin) getGuidanceRecord()
|
||||
.getBasinData(FFMPRecord.ALL).get(key),
|
||||
.getBasinData().get(key),
|
||||
recentTime, ffgType);
|
||||
ratio = FFMPUtils.getRatioValue(qpe, guid);
|
||||
}
|
||||
|
@ -2624,11 +2660,13 @@ public class FFMPResource extends
|
|||
fshell.setCursor(null);
|
||||
|
||||
// check whether or not the dialog needs to be dumped
|
||||
monitor.splashDispose(getResource());
|
||||
if (monitor != null) {
|
||||
monitor.splashDispose(getResource());
|
||||
|
||||
if (getResourceData().tableLoad && isFirst) {
|
||||
isFirst = false;
|
||||
updateDialog();
|
||||
if (getResourceData().tableLoad && isFirst) {
|
||||
isFirst = false;
|
||||
updateDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3806,21 +3844,23 @@ public class FFMPResource extends
|
|||
getTimeOrderedKeys().remove(date);
|
||||
}
|
||||
|
||||
monitor.purgeFFMPData(getResourceData().getProduct(), getResourceData()
|
||||
.getPrimarySource(), getSiteKey(), ndate);
|
||||
if (monitor != null) {
|
||||
monitor.purgeFFMPData(getResourceData().getProduct(),
|
||||
getResourceData().getPrimarySource(), getSiteKey(), ndate);
|
||||
}
|
||||
|
||||
try {
|
||||
DataTime lastDate = getResourceData().getAvailableTimes()[getResourceData()
|
||||
.getAvailableTimes().length - 1];
|
||||
|
||||
for (DataTime dt : drawables.keySet()) {
|
||||
if (!dt.greaterThan(lastDate)) {
|
||||
drawables.remove(dt);
|
||||
DataTime[] availableTimes = getResourceData().getAvailableTimes();
|
||||
if (availableTimes.length > 0) {
|
||||
DataTime lastDate = availableTimes[availableTimes.length - 1];
|
||||
for (DataTime dt : drawables.keySet()) {
|
||||
if (!dt.greaterThan(lastDate)) {
|
||||
drawables.remove(dt);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (VizException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
statusHandler.error("Error purging old data", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4043,5 +4083,5 @@ public class FFMPResource extends
|
|||
}
|
||||
return dataTimes;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -32,7 +32,6 @@ import javax.xml.bind.annotation.XmlType;
|
|||
|
||||
import org.eclipse.core.runtime.SubMonitor;
|
||||
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
|
@ -81,6 +80,7 @@ import com.raytheon.uf.viz.monitor.ffmp.xml.FFMPConfigBasinXML;
|
|||
* Mar 06, 2013 1769 dhladky Changed threading to use count down latch.
|
||||
* Apr 26, 2013 1954 bsteffen Minor code cleanup throughout FFMP.
|
||||
* Jun 06, 2013 2075 njensen Use new load jobs
|
||||
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -208,7 +208,6 @@ public class FFMPResourceData extends AbstractRequestableResourceData {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.domains = defaults;
|
||||
|
||||
final Date mostRecentTime = availableTimes[availableTimes.length - 1]
|
||||
|
@ -216,56 +215,23 @@ public class FFMPResourceData extends AbstractRequestableResourceData {
|
|||
final double configTimeFrame = cfgBasinXML.getTimeFrame();
|
||||
final Date timeBack = new Date(
|
||||
(long) (mostRecentTime.getTime() - (configTimeFrame * TimeUtil.MILLIS_PER_HOUR)));
|
||||
final List<String> initialHucs = new ArrayList<String>();
|
||||
initialHucs.add(FFMPRecord.ALL);
|
||||
final String defaultLayer = monitor.getConfig()
|
||||
.getFFMPConfigData().getLayer();
|
||||
if (!defaultLayer.equals(FFMPRecord.ALL)) {
|
||||
initialHucs.add(defaultLayer);
|
||||
}
|
||||
final List<String> onlyAllHuc = new ArrayList<String>();
|
||||
onlyAllHuc.add(FFMPRecord.ALL);
|
||||
InitialLoadJob initialJob = new InitialLoadJob(this, timeBack,
|
||||
mostRecentTime, initialHucs);
|
||||
mostRecentTime, onlyAllHuc);
|
||||
|
||||
// schedule the secondary load to start as soon as the initial
|
||||
// completes
|
||||
// secondary load will be the same time period as initial with
|
||||
// the hucs that the initial job did not do
|
||||
// schedule the background load to start as soon as the initial
|
||||
// completes, it will load the other hours back to 24
|
||||
initialJob.addJobChangeListener(new JobChangeAdapter() {
|
||||
@Override
|
||||
public void done(IJobChangeEvent event) {
|
||||
Date secondStartTime = timeBack;
|
||||
List<String> secondaryHucs = FFMPTemplateConfigurationManager
|
||||
.getInstance().getHucLevels();
|
||||
secondaryHucs.removeAll(initialHucs);
|
||||
|
||||
BackgroundLoadJob secondaryJob = new BackgroundLoadJob(
|
||||
"Secondary FFMP Load", FFMPResourceData.this,
|
||||
secondStartTime, mostRecentTime, secondaryHucs);
|
||||
secondaryJob.setPriority(Job.SHORT);
|
||||
// schedule the tertiary load as soon as the
|
||||
// secondary completes
|
||||
// tertiary load will do 24 hours back of the
|
||||
// same hucs as the initial load
|
||||
secondaryJob
|
||||
.addJobChangeListener(new JobChangeAdapter() {
|
||||
@Override
|
||||
public void done(IJobChangeEvent event) {
|
||||
List<String> tertiaryHucs = new ArrayList<String>();
|
||||
tertiaryHucs.add(FFMPRecord.ALL);
|
||||
Date tertiaryStartTime = new Date(
|
||||
mostRecentTime.getTime()
|
||||
- (24 * TimeUtil.MILLIS_PER_HOUR));
|
||||
BackgroundLoadJob tertiaryJob = new BackgroundLoadJob(
|
||||
"Tertiary FFMP Load",
|
||||
FFMPResourceData.this,
|
||||
tertiaryStartTime, timeBack,
|
||||
tertiaryHucs);
|
||||
tertiaryJob
|
||||
.setPreloadAvailableUris(true);
|
||||
tertiaryJob.schedule();
|
||||
}
|
||||
});
|
||||
secondaryJob.schedule();
|
||||
Date backgroundStartTime = new Date(mostRecentTime
|
||||
.getTime() - (24 * TimeUtil.MILLIS_PER_HOUR));
|
||||
BackgroundLoadJob backgroundJob = new BackgroundLoadJob(
|
||||
"Background FFMP Load", FFMPResourceData.this,
|
||||
backgroundStartTime, timeBack, onlyAllHuc);
|
||||
backgroundJob.setPreloadAvailableUris(true);
|
||||
backgroundJob.schedule();
|
||||
}
|
||||
});
|
||||
initialJob.schedule();
|
||||
|
@ -274,7 +240,7 @@ public class FFMPResourceData extends AbstractRequestableResourceData {
|
|||
// background so the first paints of the resource
|
||||
// will be faster
|
||||
List<String> earlyLoadHucs = new ArrayList<String>();
|
||||
earlyLoadHucs.addAll(initialHucs);
|
||||
earlyLoadHucs.addAll(onlyAllHuc);
|
||||
for (String otherHuc : FFMPTemplateConfigurationManager
|
||||
.getInstance().getHucLevels()) {
|
||||
if (!earlyLoadHucs.contains(otherHuc)) {
|
||||
|
@ -324,8 +290,7 @@ public class FFMPResourceData extends AbstractRequestableResourceData {
|
|||
.getAvailableUris(siteKey, dataKey, sourceName,
|
||||
standAloneTime);
|
||||
monitor.processUris(sourceURIs, siteKey, sourceName,
|
||||
standAloneTime, FFMPRecord.ALL,
|
||||
SubMonitor.convert(null));
|
||||
standAloneTime, SubMonitor.convert(null));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -427,10 +392,10 @@ public class FFMPResourceData extends AbstractRequestableResourceData {
|
|||
public void populateRecord(FFMPRecord precord) throws VizException {
|
||||
try {
|
||||
getMonitor().populateFFMPRecord(siteKey, precord,
|
||||
precord.getSourceName(), huc);
|
||||
precord.getSourceName());
|
||||
} catch (Exception e) {
|
||||
throw new VizException("Failed to populate ffmp record "
|
||||
+ precord.getDataURI() + " for huc " + huc);
|
||||
+ precord.getDataURI());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@ import com.raytheon.uf.viz.monitor.ffmp.ui.dialogs.FfmpTableConfigData;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 11, 2013 2085 njensen Initial creation
|
||||
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -199,7 +200,7 @@ public class FFMPRowGenerator implements Runnable {
|
|||
|
||||
mouseOverText = metabasin.getBasinId() + "\n" + lid + "-"
|
||||
+ fvgmbd.getName();
|
||||
|
||||
|
||||
if (!huc.equals(FFMPRecord.ALL)) {
|
||||
sb.append("-").append(fvgmbd.getName());
|
||||
}
|
||||
|
@ -208,7 +209,7 @@ public class FFMPRowGenerator implements Runnable {
|
|||
new FFMPTableCellData(rowField, sb.toString(),
|
||||
mouseOverText));
|
||||
|
||||
if (!isWorstCase || huc.equals(FFMPRecord.ALL)
|
||||
if (huc.equals(FFMPRecord.ALL)
|
||||
|| (centeredAggregationKey != null)) {
|
||||
|
||||
if (!cBasin.getValues().isEmpty()) {
|
||||
|
@ -272,8 +273,73 @@ public class FFMPRowGenerator implements Runnable {
|
|||
FIELDS.DIFF, diffValue));
|
||||
i += 3;
|
||||
}
|
||||
} else {
|
||||
} else if (isWorstCase) {
|
||||
trd = getMaxValue(trd, cBasin);
|
||||
} else {
|
||||
// general Aggregate HUC processing
|
||||
ArrayList<Long> pfafs = ft.getAggregatePfafs(
|
||||
cBasin.getPfaf(), siteKey, domain);
|
||||
|
||||
if (!cBasin.getValues().isEmpty()) {
|
||||
rate = vgBasin.getAverageValue(paintRefTime,
|
||||
expirationTime);
|
||||
if (sliderTime > 0.00) {
|
||||
FFMPTimeWindow window = monitor.getQpeWindow();
|
||||
qpeBasin.getAccumAverageValue(pfafs,
|
||||
window.getAfterTime(),
|
||||
window.getBeforeTime(), expirationTime,
|
||||
isRate);
|
||||
} else {
|
||||
qpe = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
trd.setTableCellData(1, new FFMPTableCellData(FIELDS.RATE,
|
||||
rate));
|
||||
trd.setTableCellData(2, new FFMPTableCellData(FIELDS.QPE,
|
||||
qpe));
|
||||
|
||||
if (qpfBasin != null) {
|
||||
FFMPTimeWindow window = monitor.getQpfWindow();
|
||||
qpf = qpfBasin.getAverageValue(pfafs,
|
||||
window.getAfterTime(), window.getBeforeTime());
|
||||
}
|
||||
trd.setTableCellData(3, new FFMPTableCellData(FIELDS.QPF,
|
||||
qpf));
|
||||
|
||||
// run over each guidance type
|
||||
int i = 0;
|
||||
for (String guidType : guidBasins.keySet()) {
|
||||
guidance = Float.NaN;
|
||||
|
||||
FFMPTableCellData guidCellData = getGuidanceCellData(
|
||||
cBasin, domain, guidType, parentBasinPfaf);
|
||||
if (guidCellData == null) {
|
||||
// check for forcing even if no data are available
|
||||
guidance = getForcedAvg(domain, cBasin, guidType);
|
||||
boolean forced = !guidance.isNaN();
|
||||
guidCellData = new FFMPTableCellData(
|
||||
FIELDS.GUIDANCE, guidance, forced);
|
||||
} else {
|
||||
guidance = guidCellData.getValueAsFloat();
|
||||
}
|
||||
|
||||
trd.setTableCellData(i + 4, guidCellData);
|
||||
|
||||
float ratioValue = Float.NaN;
|
||||
float diffValue = Float.NaN;
|
||||
|
||||
// If guidance is NaN then it cannot be > 0
|
||||
if (!qpe.isNaN() && (guidance > 0.0f)) {
|
||||
ratioValue = FFMPUtils.getRatioValue(qpe, guidance);
|
||||
diffValue = FFMPUtils.getDiffValue(qpe, guidance);
|
||||
}
|
||||
trd.setTableCellData(i + 5, new FFMPTableCellData(
|
||||
FIELDS.RATIO, ratioValue));
|
||||
trd.setTableCellData(i + 6, new FFMPTableCellData(
|
||||
FIELDS.DIFF, diffValue));
|
||||
i += 3;
|
||||
}
|
||||
}
|
||||
|
||||
trd.setSortCallback(tData);
|
||||
|
@ -292,22 +358,46 @@ public class FFMPRowGenerator implements Runnable {
|
|||
|
||||
if (!isWorstCase || huc.equals(FFMPRecord.ALL)
|
||||
|| (centeredAggregationKey != null)) {
|
||||
|
||||
ArrayList<Long> pfafs = null;
|
||||
|
||||
if (cBasin.getAggregated()) {
|
||||
pfafs = ft.getAggregatePfafs(cBasin.getPfaf(), siteKey,
|
||||
huc);
|
||||
}
|
||||
|
||||
if (rateBasin != null) {
|
||||
FFMPBasin basin = rateBasin.get(cBasinPfaf);
|
||||
if (basin != null) {
|
||||
rate = basin.getValue(paintRefTime);
|
||||
if (cBasin.getAggregated()) {
|
||||
rate = rateBasin.getAverageValue(pfafs,
|
||||
paintRefTime);
|
||||
} else {
|
||||
FFMPBasin basin = rateBasin.get(cBasinPfaf);
|
||||
if (basin != null) {
|
||||
rate = basin.getValue(paintRefTime);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
trd.setTableCellData(1, new FFMPTableCellData(FIELDS.RATE,
|
||||
rate));
|
||||
|
||||
if (qpeBasin != null) {
|
||||
FFMPBasin basin = qpeBasin.get(cBasinPfaf);
|
||||
if (basin != null) {
|
||||
FFMPTimeWindow window = monitor.getQpeWindow();
|
||||
qpe = basin.getAccumValue(window.getAfterTime(),
|
||||
|
||||
FFMPTimeWindow window = monitor.getQpeWindow();
|
||||
|
||||
if (cBasin.getAggregated()) {
|
||||
qpe = qpeBasin.getAccumAverageValue(pfafs,
|
||||
window.getAfterTime(),
|
||||
window.getBeforeTime(), expirationTime,
|
||||
isRate);
|
||||
} else {
|
||||
FFMPBasin basin = qpeBasin.get(cBasinPfaf);
|
||||
if (basin != null) {
|
||||
qpe = basin.getAccumValue(
|
||||
window.getAfterTime(),
|
||||
window.getBeforeTime(), expirationTime,
|
||||
isRate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -315,11 +405,19 @@ public class FFMPRowGenerator implements Runnable {
|
|||
qpe));
|
||||
|
||||
if (qpfBasin != null) {
|
||||
FFMPBasin basin = qpfBasin.get(cBasinPfaf);
|
||||
if (basin != null) {
|
||||
FFMPTimeWindow window = monitor.getQpfWindow();
|
||||
qpf = basin.getAverageValue(window.getAfterTime(),
|
||||
FFMPTimeWindow window = monitor.getQpfWindow();
|
||||
if (cBasin.getAggregated()) {
|
||||
qpf = qpfBasin.getAverageValue(pfafs,
|
||||
window.getAfterTime(),
|
||||
window.getBeforeTime());
|
||||
} else {
|
||||
FFMPBasin basin = qpfBasin.get(cBasinPfaf);
|
||||
if (basin != null) {
|
||||
|
||||
qpf = basin.getAverageValue(
|
||||
window.getAfterTime(),
|
||||
window.getBeforeTime());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -436,13 +534,13 @@ public class FFMPRowGenerator implements Runnable {
|
|||
if (cBasin instanceof FFMPVirtualGageBasin) {
|
||||
if (!pfafs.isEmpty()) {
|
||||
if (virtualBasin != null) {
|
||||
rate = virtualBasin.get(cBasin.getPfaf()).getValue(
|
||||
paintRefTime);
|
||||
|
||||
rate = virtualBasin.getMaxValue(pfafs, paintRefTime);
|
||||
|
||||
if (sliderTime > 0.00) {
|
||||
qpe = virtualBasin.get(cBasin.getPfaf()).getAccumValue(
|
||||
monitor.getQpeWindow().getAfterTime(),
|
||||
monitor.getQpeWindow().getBeforeTime(),
|
||||
qpe = virtualBasin.getAccumMaxValue(pfafs, monitor
|
||||
.getQpeWindow().getAfterTime(), monitor
|
||||
.getQpeWindow().getBeforeTime(),
|
||||
expirationTime, isRate);
|
||||
} else {
|
||||
qpe = 0.0f;
|
||||
|
@ -454,10 +552,9 @@ public class FFMPRowGenerator implements Runnable {
|
|||
trd.setTableCellData(2, new FFMPTableCellData(FIELDS.QPE, qpe));
|
||||
|
||||
if (qpfBasin != null) {
|
||||
qpf = new Float(qpfBasin.get(cBasin.getPfaf()).getMaxValue(
|
||||
monitor.getQpfWindow().getAfterTime(),
|
||||
monitor.getQpfWindow().getBeforeTime()))
|
||||
.floatValue();
|
||||
qpf = qpfBasin.getMaxValue(pfafs, monitor.getQpfWindow()
|
||||
.getAfterTime(), monitor.getQpfWindow()
|
||||
.getBeforeTime());
|
||||
}
|
||||
|
||||
trd.setTableCellData(3, new FFMPTableCellData(FIELDS.QPF, qpf));
|
||||
|
@ -534,7 +631,7 @@ public class FFMPRowGenerator implements Runnable {
|
|||
if (isWorstCase) {
|
||||
guidance = guidRecords
|
||||
.get(guidType)
|
||||
.getBasinData(FFMPRecord.ALL)
|
||||
.getBasinData()
|
||||
.getMaxGuidanceValue(
|
||||
pfafs,
|
||||
resource.getGuidanceInterpolators()
|
||||
|
@ -542,11 +639,16 @@ public class FFMPRowGenerator implements Runnable {
|
|||
resource.getGuidSourceExpiration(guidType),
|
||||
cBasin.getPfaf());
|
||||
} else {
|
||||
FFMPGuidanceBasin basin = (FFMPGuidanceBasin) guidRecords
|
||||
.get(guidType).getBasinData(huc)
|
||||
.get(cBasin.getPfaf());
|
||||
guidance = resource.getGuidanceValue(basin, monitor
|
||||
.getQpeWindow().getBeforeTime(), guidType);
|
||||
|
||||
guidance = guidRecords
|
||||
.get(guidType)
|
||||
.getBasinData()
|
||||
.getAverageGuidanceValue(
|
||||
pfafs,
|
||||
resource.getGuidanceInterpolators()
|
||||
.get(guidType),
|
||||
resource.getGuidSourceExpiration(guidType));
|
||||
|
||||
}
|
||||
|
||||
trd.setTableCellData(i + 4, new FFMPTableCellData(
|
||||
|
@ -766,17 +868,6 @@ public class FFMPRowGenerator implements Runnable {
|
|||
private FFMPTableCellData getGuidanceCellData(FFMPBasin cBasin,
|
||||
String domain, String guidType, Long parentBasinPfaf) {
|
||||
long cBasinPfaf = cBasin.getPfaf();
|
||||
|
||||
FFMPBasinData guidBasin = guidBasins.get(guidType);
|
||||
|
||||
FFMPGuidanceBasin ffmpGuidBasin = null;
|
||||
if (guidBasin != null) {
|
||||
ffmpGuidBasin = (FFMPGuidanceBasin) guidBasin.get(cBasinPfaf);
|
||||
}
|
||||
|
||||
if (ffmpGuidBasin == null) {
|
||||
return null;
|
||||
}
|
||||
List<Long> pfafList = Collections.emptyList();
|
||||
List<Long> forcedPfafs = Collections.emptyList();
|
||||
boolean forced = false;
|
||||
|
@ -806,8 +897,7 @@ public class FFMPRowGenerator implements Runnable {
|
|||
if (FFFGDataMgr.getInstance().isForcingConfigured()) {
|
||||
FFMPBasin parentBasin = cBasin;
|
||||
if (cBasinPfaf != parentBasinPfaf.longValue()) {
|
||||
parentBasin = baseRec.getBasinData(FFMPRecord.ALL).get(
|
||||
parentBasinPfaf);
|
||||
parentBasin = baseRec.getBasinData().get(parentBasinPfaf);
|
||||
}
|
||||
ForceUtilResult forceResult = forceUtil.calculateForcings(domain,
|
||||
ft, parentBasin);
|
||||
|
@ -819,20 +909,22 @@ public class FFMPRowGenerator implements Runnable {
|
|||
// Recalculate guidance using the forced value(s)
|
||||
guidance = guidRecords
|
||||
.get(guidType)
|
||||
.getBasinData(FFMPRecord.ALL)
|
||||
.getBasinData()
|
||||
.getAverageGuidanceValue(pfafList,
|
||||
resource.getGuidanceInterpolators().get(guidType),
|
||||
guidance, forcedPfafs,
|
||||
resource.getGuidSourceExpiration(guidType));
|
||||
} else {
|
||||
if (ffmpGuidBasin != null) {
|
||||
guidance = resource.getGuidanceValue(ffmpGuidBasin,
|
||||
paintRefTime, guidType);
|
||||
|
||||
if (guidance < 0.0f) {
|
||||
guidance = Float.NaN;
|
||||
}
|
||||
FFMPGuidanceBasin ffmpGuidBasin = (FFMPGuidanceBasin) guidRecords
|
||||
.get(guidType).getBasinData().get(cBasinPfaf);
|
||||
guidance = resource.getGuidanceValue(ffmpGuidBasin, paintRefTime,
|
||||
guidType);
|
||||
|
||||
if (guidance < 0.0f) {
|
||||
guidance = Float.NaN;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return new FFMPTableCellData(FIELDS.GUIDANCE, guidance, forced);
|
||||
|
|
|
@ -20,6 +20,7 @@ package com.raytheon.uf.viz.monitor.ffmp.ui.rsc;
|
|||
* further licensing information.
|
||||
**/
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
|
@ -35,7 +36,8 @@ import com.raytheon.uf.viz.core.map.MapDescriptor;
|
|||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 15 Sept, 2011 10899 dhladky Initial creation
|
||||
* 15 Sept, 2011 10899 dhladky Initial creation
|
||||
* 27 June, 2013 2152 njensen Added dispose()
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
|
@ -107,13 +109,27 @@ public class FFMPShapeContainer {
|
|||
|
||||
return shape;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* clears the shapes
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public void clear() {
|
||||
shadedShapes.clear();
|
||||
shadedShapes.clear();
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
for (String key : shadedShapes.keySet()) {
|
||||
ConcurrentHashMap<String, IColormapShadedShape> innerMap = shadedShapes
|
||||
.get(key);
|
||||
Iterator<IColormapShadedShape> itr = innerMap.values().iterator();
|
||||
while (itr.hasNext()) {
|
||||
itr.next().dispose();
|
||||
}
|
||||
innerMap.clear();
|
||||
}
|
||||
shadedShapes.clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ package com.raytheon.uf.viz.monitor.ffmp.ui.thread;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.NavigableMap;
|
||||
|
@ -31,7 +30,6 @@ import java.util.Set;
|
|||
import org.eclipse.core.runtime.SubMonitor;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.ffmp.FFMPRecord;
|
||||
import com.raytheon.uf.common.monitor.config.FFMPRunConfigurationManager;
|
||||
import com.raytheon.uf.common.monitor.xml.FFMPRunXML;
|
||||
import com.raytheon.uf.common.monitor.xml.ProductRunXML;
|
||||
|
@ -54,6 +52,8 @@ import com.raytheon.uf.viz.monitor.ffmp.ui.rsc.FFMPResourceData;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 04, 2013 2075 njensen Initial creation
|
||||
* Jun 07, 2013 2075 njensen Added progress monitoring
|
||||
* Jul 03, 2013 2152 njensen Override shouldRun()
|
||||
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -81,8 +81,6 @@ public abstract class AbstractLoadJob extends Job {
|
|||
|
||||
protected FFMPMonitor ffmpMonitor;
|
||||
|
||||
protected List<String> hucsToLoad = null;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
@ -105,28 +103,13 @@ public abstract class AbstractLoadJob extends Job {
|
|||
this.resourceData = resourceData;
|
||||
this.startTime = timeBack;
|
||||
this.endTime = mostRecentTime;
|
||||
this.hucsToLoad = hucsToLoad;
|
||||
|
||||
// configure FFMP
|
||||
this.hucsToLoad.remove(FFMPRecord.VIRTUAL);
|
||||
FFMPRunXML runXML = FFMPRunConfigurationManager.getInstance()
|
||||
.getRunner(resourceData.wfo);
|
||||
this.productRun = runXML.getProduct(resourceData.siteKey);
|
||||
this.product = resourceData.getProduct();
|
||||
this.ffmpMonitor = FFMPMonitor.getInstance();
|
||||
|
||||
// just for debugging/logging
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(name);
|
||||
sb.append(" hucs to load: ");
|
||||
Iterator<String> itr = this.hucsToLoad.iterator();
|
||||
while (itr.hasNext()) {
|
||||
sb.append(itr.next());
|
||||
if (itr.hasNext()) {
|
||||
sb.append(", ");
|
||||
}
|
||||
}
|
||||
System.out.println(sb.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -165,10 +148,8 @@ public abstract class AbstractLoadJob extends Job {
|
|||
}
|
||||
}
|
||||
if (rateURI != null) {
|
||||
for (String phuc : hucsToLoad) {
|
||||
ffmpMonitor.processUri(rateURI, resourceData.siteKey,
|
||||
product.getRate(), startTime, phuc);
|
||||
}
|
||||
ffmpMonitor.processUri(rateURI, resourceData.siteKey,
|
||||
product.getRate(), startTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -190,12 +171,10 @@ public abstract class AbstractLoadJob extends Job {
|
|||
protected void doQpe(NavigableMap<Date, List<String>> qpeURIs,
|
||||
SubMonitor smonitor) {
|
||||
if (!qpeURIs.isEmpty()) {
|
||||
smonitor.beginTask(null, hucsToLoad.size() * PROGRESS_FACTOR);
|
||||
for (String phuc : hucsToLoad) {
|
||||
ffmpMonitor.processUris(qpeURIs, resourceData.siteKey,
|
||||
product.getQpe(), startTime, phuc,
|
||||
smonitor.newChild(PROGRESS_FACTOR));
|
||||
}
|
||||
smonitor.beginTask(null, PROGRESS_FACTOR);
|
||||
ffmpMonitor.processUris(qpeURIs, resourceData.siteKey,
|
||||
product.getQpe(), startTime,
|
||||
smonitor.newChild(PROGRESS_FACTOR));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -246,12 +225,11 @@ public abstract class AbstractLoadJob extends Job {
|
|||
// Use this method of QPF data retrieval if you don't have cache
|
||||
// files
|
||||
if (!qpfURIs.isEmpty()) {
|
||||
smonitor.beginTask(null, hucsToLoad.size() * PROGRESS_FACTOR);
|
||||
for (String phuc : hucsToLoad) {
|
||||
ffmpMonitor.processUris(qpfURIs, resourceData.siteKey,
|
||||
productQpf, startTime, phuc,
|
||||
smonitor.newChild(PROGRESS_FACTOR));
|
||||
}
|
||||
smonitor.beginTask(null, PROGRESS_FACTOR);
|
||||
|
||||
ffmpMonitor.processUris(qpfURIs, resourceData.siteKey, productQpf,
|
||||
startTime, smonitor.newChild(PROGRESS_FACTOR));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -264,7 +242,7 @@ public abstract class AbstractLoadJob extends Job {
|
|||
product.getVirtual(), startTime);
|
||||
if (!virtualURIs.isEmpty()) {
|
||||
ffmpMonitor.processUris(virtualURIs, resourceData.siteKey,
|
||||
product.getVirtual(), startTime, FFMPRecord.ALL, smonitor);
|
||||
product.getVirtual(), startTime, smonitor);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -303,11 +281,16 @@ public abstract class AbstractLoadJob extends Job {
|
|||
if (iguidURIs != null && !iguidURIs.isEmpty()) {
|
||||
ffmpMonitor.processUris(iguidURIs, resourceData.siteKey,
|
||||
guidSource.getSourceName(), startTime,
|
||||
FFMPRecord.ALL,
|
||||
|
||||
smonitor.newChild(PROGRESS_FACTOR / subWork));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRun() {
|
||||
return (super.shouldRun() && FFMPMonitor.isRunning());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -66,63 +66,70 @@ public class BackgroundLoadJob extends AbstractLoadJob {
|
|||
*/
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
SubMonitor smonitor = SubMonitor.convert(monitor, "Loading Data", 2500);
|
||||
long t0 = System.currentTimeMillis();
|
||||
try {
|
||||
SubMonitor smonitor = SubMonitor.convert(monitor, "Loading Data",
|
||||
2500);
|
||||
long t0 = System.currentTimeMillis();
|
||||
|
||||
// preload available URIs
|
||||
smonitor.subTask("Preloading URIs...");
|
||||
if (preloadAvailableUris) {
|
||||
preloadAvailableUris();
|
||||
}
|
||||
smonitor.worked(100);
|
||||
if (!this.shouldRun()) {
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
// preload available URIs
|
||||
smonitor.subTask("Preloading URIs...");
|
||||
if (preloadAvailableUris) {
|
||||
preloadAvailableUris();
|
||||
}
|
||||
smonitor.worked(100);
|
||||
if (!this.shouldRun()) {
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
|
||||
// QPE
|
||||
smonitor.subTask("Processing QPE...");
|
||||
NavigableMap<Date, List<String>> qpeURIs = getQpeUris();
|
||||
smonitor.worked(100);
|
||||
doQpe(qpeURIs, smonitor.newChild(1000));
|
||||
if (!this.shouldRun()) {
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
// QPE
|
||||
smonitor.subTask("Processing QPE...");
|
||||
NavigableMap<Date, List<String>> qpeURIs = getQpeUris();
|
||||
smonitor.worked(100);
|
||||
doQpe(qpeURIs, smonitor.newChild(1000));
|
||||
if (!this.shouldRun()) {
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
|
||||
// QPF
|
||||
smonitor.subTask("Processing QPF...");
|
||||
List<NavigableMap<Date, List<String>>> qpfs = getQpfUris(startTime);
|
||||
smonitor.worked(100);
|
||||
SubMonitor qpfmonitor = smonitor.newChild(1000);
|
||||
qpfmonitor.beginTask(null, qpfs.size() * PROGRESS_FACTOR);
|
||||
int i = 0;
|
||||
for (NavigableMap<Date, List<String>> qpfURIs : qpfs) {
|
||||
doQpf(qpfURIs, product.getQpf(i),
|
||||
qpfmonitor.newChild(PROGRESS_FACTOR));
|
||||
i++;
|
||||
}
|
||||
if (!this.shouldRun()) {
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
// QPF
|
||||
smonitor.subTask("Processing QPF...");
|
||||
List<NavigableMap<Date, List<String>>> qpfs = getQpfUris(startTime);
|
||||
smonitor.worked(100);
|
||||
SubMonitor qpfmonitor = smonitor.newChild(1000);
|
||||
qpfmonitor.beginTask(null, qpfs.size() * PROGRESS_FACTOR);
|
||||
int i = 0;
|
||||
for (NavigableMap<Date, List<String>> qpfURIs : qpfs) {
|
||||
doQpf(qpfURIs, product.getQpf(i),
|
||||
qpfmonitor.newChild(PROGRESS_FACTOR));
|
||||
i++;
|
||||
}
|
||||
if (!this.shouldRun()) {
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
|
||||
// Virtual
|
||||
smonitor.subTask("Processing Virtual...");
|
||||
doVirtual(smonitor.newChild(200));
|
||||
if (!this.shouldRun()) {
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
// Virtual
|
||||
smonitor.subTask("Processing Virtual...");
|
||||
doVirtual(smonitor.newChild(200));
|
||||
if (!this.shouldRun()) {
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
|
||||
// Guidance
|
||||
smonitor.subTask("Processing Guidance...");
|
||||
doGuidance(startTime, smonitor.newChild(200));
|
||||
if (!this.shouldRun()) {
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
// Guidance
|
||||
smonitor.subTask("Processing Guidance...");
|
||||
doGuidance(startTime, smonitor.newChild(200));
|
||||
if (!this.shouldRun()) {
|
||||
return Status.CANCEL_STATUS;
|
||||
}
|
||||
|
||||
smonitor.done();
|
||||
System.out.println(this.getName() + " took: "
|
||||
+ (System.currentTimeMillis() - t0));
|
||||
smonitor.done();
|
||||
System.out.println(this.getName() + " took: "
|
||||
+ (System.currentTimeMillis() - t0));
|
||||
|
||||
} catch (Exception e) {
|
||||
statusHandler.error("Couldn't complete " + this.getName(), e);
|
||||
}
|
||||
|
||||
return Status.OK_STATUS;
|
||||
|
||||
}
|
||||
|
||||
public void setPreloadAvailableUris(boolean preload) {
|
||||
|
|
|
@ -318,13 +318,6 @@
|
|||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="gov.noaa.nws.ncep.viz.customprojection"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="gov.noaa.nws.ncep.viz.gempak.nativelib"
|
||||
download-size="0"
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
visible="true">
|
||||
</separator>
|
||||
<command
|
||||
commandId="org.eclipse.ui.file.exit"
|
||||
commandId="com.raytheon.viz.ui.file.exit"
|
||||
label="Exit..."
|
||||
style="push">
|
||||
</command>
|
||||
|
@ -182,6 +182,11 @@
|
|||
optional="false">
|
||||
</commandParameter>
|
||||
</command>
|
||||
<command
|
||||
defaultHandler="com.raytheon.uf.viz.personalities.cave.menu.ExitHandler"
|
||||
id="com.raytheon.viz.ui.file.exit"
|
||||
name="Exit">
|
||||
</command>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.handlers">
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
package com.raytheon.uf.viz.personalities.cave.menu;
|
||||
|
||||
import org.eclipse.core.commands.AbstractHandler;
|
||||
import org.eclipse.core.commands.ExecutionEvent;
|
||||
import org.eclipse.core.commands.ExecutionException;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
|
||||
/**
|
||||
* An exit command handler that does not rely on a Workbench window having
|
||||
* the focus. This allows it to be used from a tear-off menu.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2013-07-11 DR 15727 D. Friedman Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
|
||||
public class ExitHandler extends AbstractHandler {
|
||||
|
||||
public Object execute(ExecutionEvent event) throws ExecutionException {
|
||||
PlatformUI.getWorkbench().close();
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -98,6 +98,7 @@ import com.raytheon.viz.ui.widgets.MinimumSizeComposite;
|
|||
* needed methods abstract.
|
||||
* Jul 31, 2012 #875 rferrel Points now group in menu items.
|
||||
* Oct 04, 2012 #1248 rferrel Added Point change listener.
|
||||
* Jun 24, 2013 DR16023 zwang Support all cuts for nexrad
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -1725,7 +1726,8 @@ public abstract class BaseRadarProductUI {
|
|||
|
||||
private static final ElevationSelection[] wsrElevationSelections = {
|
||||
ElevationSelection.ALL, ElevationSelection.UP_TO,
|
||||
ElevationSelection.LOWEST_N, ElevationSelection.SINGLE };
|
||||
ElevationSelection.LOWEST_N, ElevationSelection.SINGLE,
|
||||
ElevationSelection.ALL_MATCHING};
|
||||
|
||||
private static final ElevationSelection[] tdwrElevationSelections = {
|
||||
ElevationSelection.SINGLE, ElevationSelection.ALL_MATCHING };
|
||||
|
|
|
@ -30,8 +30,6 @@ import org.eclipse.swt.events.MouseTrackAdapter;
|
|||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
import org.eclipse.swt.events.SelectionListener;
|
||||
import org.eclipse.swt.events.ShellAdapter;
|
||||
import org.eclipse.swt.events.ShellEvent;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.GC;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
|
@ -45,7 +43,6 @@ import org.eclipse.swt.widgets.Label;
|
|||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Menu;
|
||||
import org.eclipse.swt.widgets.MenuItem;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import com.raytheon.uf.viz.ui.menus.widgets.tearoff.TearOffMenuDialog.MenuPathElement;
|
||||
|
||||
|
@ -60,8 +57,6 @@ import com.raytheon.uf.viz.ui.menus.widgets.tearoff.TearOffMenuDialog.MenuPathEl
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 15, 2011 mnash Initial creation
|
||||
* Apr 10, 2013 DR 15185 D. Friedman Preserve tear-offs over perspective switches.
|
||||
* Apr 30, 2013 DR 15727 D. Friedman Try to make items that depend on an active
|
||||
* workbench window work correctly.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -383,7 +378,7 @@ public class MenuItemComposite extends Composite {
|
|||
private MouseAdapter getMouseAdapter() {
|
||||
MouseAdapter mouseAdapter = new MouseAdapter() {
|
||||
@Override
|
||||
public void mouseDown(final MouseEvent e) {
|
||||
public void mouseDown(MouseEvent e) {
|
||||
MenuItem item = getItem();
|
||||
|
||||
if (item.getMenu() != null) {
|
||||
|
@ -399,123 +394,73 @@ public class MenuItemComposite extends Composite {
|
|||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Many menu items do not work unless there in an active
|
||||
* workbench window.
|
||||
*
|
||||
* If not already active (and it probably will not be), make the
|
||||
* shell of the original menu item active and finish selecting
|
||||
* the item after receiving an activation event. Otherwise,
|
||||
* finish selecting the item immediately.
|
||||
*
|
||||
* Also select immediately if the shell if not visible or is
|
||||
* minimized because we cannot exepect to get an activation
|
||||
* event.
|
||||
*
|
||||
* TODO: This is all still a kludge and could cause unexpected
|
||||
* behavior.
|
||||
*/
|
||||
final Shell shell = item.getParent().getShell();
|
||||
Display display = shell.getDisplay();
|
||||
if (shell.isVisible() && !shell.getMinimized()
|
||||
&& display.getActiveShell() != shell) {
|
||||
shell.addShellListener(new ShellAdapter() {
|
||||
@Override
|
||||
public void shellActivated(ShellEvent e2) {
|
||||
shell.removeShellListener(this);
|
||||
selectItem(e);
|
||||
}
|
||||
// handle the selection event, so if it is able to load
|
||||
// something, do it (by looping over ALL the selection
|
||||
// listeners assigned to the item)
|
||||
for (Listener list : item.getListeners(SWT.Selection)) {
|
||||
Event event = new Event();
|
||||
event.type = SWT.Selection;
|
||||
event.widget = item;
|
||||
list.handleEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shellDeiconified(ShellEvent e) {
|
||||
shell.removeShellListener(this);
|
||||
}
|
||||
if (isDisposed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shellIconified(ShellEvent e) {
|
||||
shell.removeShellListener(this);
|
||||
}
|
||||
// handles the check boxes, if clicking the check box
|
||||
// need to not do this (because SWT does it already)
|
||||
// otherwise do it
|
||||
if (firstItem instanceof Button
|
||||
&& firstItem.getStyle() == SWT.CHECK) {
|
||||
if (e.widget != firstItem) {
|
||||
((Button) firstItem).setSelection(!((Button) firstItem)
|
||||
.getSelection());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shellClosed(ShellEvent e) {
|
||||
shell.removeShellListener(this);
|
||||
// Handle radio selection changing...
|
||||
Control[] siblings = getParent().getChildren();
|
||||
for (int i = 0; i < siblings.length; i++) {
|
||||
final MenuItemComposite mic = (MenuItemComposite) siblings[i];
|
||||
if (mic.separator == false
|
||||
&& mic.getItem().getStyle() == SWT.RADIO) {
|
||||
try {
|
||||
MenuItemComposite parent = null;
|
||||
// check whether a Label is clicked or a
|
||||
// MenuItemComposite
|
||||
if (e.widget instanceof MenuItemComposite) {
|
||||
parent = (MenuItemComposite) e.widget;
|
||||
} else {
|
||||
parent = (MenuItemComposite) ((Control) e.widget)
|
||||
.getParent();
|
||||
}
|
||||
// check that the radio groups match
|
||||
if (mic.getData("radioGroup").equals(
|
||||
parent.getData("radioGroup"))) {
|
||||
if (!parent.getItem()
|
||||
.getText()
|
||||
.replaceAll("&", "")
|
||||
.equals(mic.getItem().getText().replaceAll(
|
||||
"&", ""))) {
|
||||
mic.getItem().setSelection(false);
|
||||
((Button) mic.firstItem)
|
||||
.setSelection(false);
|
||||
} else {
|
||||
mic.getItem().setSelection(true);
|
||||
((Button) mic.firstItem).setSelection(true);
|
||||
}
|
||||
}
|
||||
} catch (NullPointerException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
});
|
||||
shell.setActive();
|
||||
} else {
|
||||
selectItem(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
return mouseAdapter;
|
||||
}
|
||||
|
||||
private void selectItem(MouseEvent e) {
|
||||
MenuItem item = getItem();
|
||||
// handle the selection event, so if it is able to load
|
||||
// something, do it (by looping over ALL the selection
|
||||
// listeners assigned to the item)
|
||||
for (Listener list : item.getListeners(SWT.Selection)) {
|
||||
Event event = new Event();
|
||||
event.type = SWT.Selection;
|
||||
event.widget = item;
|
||||
list.handleEvent(event);
|
||||
}
|
||||
|
||||
if (isDisposed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// handles the check boxes, if clicking the check box
|
||||
// need to not do this (because SWT does it already)
|
||||
// otherwise do it
|
||||
if (firstItem instanceof Button
|
||||
&& firstItem.getStyle() == SWT.CHECK) {
|
||||
if (e.widget != firstItem) {
|
||||
((Button) firstItem).setSelection(!((Button) firstItem)
|
||||
.getSelection());
|
||||
}
|
||||
}
|
||||
|
||||
// Handle radio selection changing...
|
||||
Control[] siblings = getParent().getChildren();
|
||||
for (int i = 0; i < siblings.length; i++) {
|
||||
final MenuItemComposite mic = (MenuItemComposite) siblings[i];
|
||||
if (mic.separator == false
|
||||
&& mic.getItem().getStyle() == SWT.RADIO) {
|
||||
try {
|
||||
MenuItemComposite parent = null;
|
||||
// check whether a Label is clicked or a
|
||||
// MenuItemComposite
|
||||
if (e.widget instanceof MenuItemComposite) {
|
||||
parent = (MenuItemComposite) e.widget;
|
||||
} else {
|
||||
parent = (MenuItemComposite) ((Control) e.widget)
|
||||
.getParent();
|
||||
}
|
||||
// check that the radio groups match
|
||||
if (mic.getData("radioGroup").equals(
|
||||
parent.getData("radioGroup"))) {
|
||||
if (!parent.getItem()
|
||||
.getText()
|
||||
.replaceAll("&", "")
|
||||
.equals(mic.getItem().getText().replaceAll(
|
||||
"&", ""))) {
|
||||
mic.getItem().setSelection(false);
|
||||
((Button) mic.firstItem)
|
||||
.setSelection(false);
|
||||
} else {
|
||||
mic.getItem().setSelection(true);
|
||||
((Button) mic.firstItem).setSelection(true);
|
||||
}
|
||||
}
|
||||
} catch (NullPointerException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
if (arrow != null) {
|
||||
|
|
|
@ -97,6 +97,7 @@ import com.vividsolutions.jts.geom.LineString;
|
|||
* the IGraphicsTarget drawWireframeShape method.
|
||||
* 15Mar2013 15693 mgamazaychikov Made sure that magnification capability works.
|
||||
* 06-11-2013 DR 16234 D. Friedman Fix pivot index when frames count is reduced.
|
||||
* 06-24-2013 DR 16317 D. Friedman Handle "motionless" track.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -297,6 +298,13 @@ public class StormTrackDisplay implements IRenderable {
|
|||
// if (trackUtil.getDataTimes().length == 1) {
|
||||
// paintDragMeText(target, paintProps, currentState.dragMePoint);
|
||||
// }
|
||||
if (currentState.isInitiallyMotionless() && ! currentState.isNonstationary()) {
|
||||
int currentFrame = trackUtil
|
||||
.getCurrentFrame(paintProps.getFramesInfo());
|
||||
if (currentFrame != currentState.intialFrame) {
|
||||
paintDragMeText(target, paintProps, currentState.dragMePoint);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -683,7 +691,8 @@ public class StormTrackDisplay implements IRenderable {
|
|||
}
|
||||
state.geomChanged = false;
|
||||
}
|
||||
if (state.mode == Mode.TRACK) {
|
||||
if (state.mode == Mode.TRACK
|
||||
&& (!state.isInitiallyMotionless() || state.isNonstationary())) {
|
||||
target.drawWireframeShape(cachedTrack, state.color,
|
||||
state.lineWidth, state.lineStyle);
|
||||
paintLabels(target, paintProps);
|
||||
|
@ -791,12 +800,24 @@ public class StormTrackDisplay implements IRenderable {
|
|||
.getFramesInfo());
|
||||
int pivotIndex = state.displayedPivotIndex;
|
||||
|
||||
double angle;
|
||||
double oppositeAngle;
|
||||
double speed;
|
||||
int startCoordIndex;
|
||||
int endCoordIndex;
|
||||
|
||||
DataTime[] dataTimes = trackUtil.getDataTimes(paintProps
|
||||
.getFramesInfo());
|
||||
state.timePoints[moveIndex].coord = state.dragMePoint.getCoordinate();
|
||||
|
||||
int startCoordIndex = pivotIndex < moveIndex ? pivotIndex : moveIndex;
|
||||
int endCoordIndex = pivotIndex < moveIndex ? moveIndex : pivotIndex;
|
||||
boolean hasMotion = ! state.isInitiallyMotionless() || state.isNonstationary()
|
||||
|| moveIndex != state.intialFrame;
|
||||
if (hasMotion) {
|
||||
startCoordIndex = pivotIndex < moveIndex ? pivotIndex : moveIndex;
|
||||
endCoordIndex = pivotIndex < moveIndex ? moveIndex : pivotIndex;
|
||||
} else {
|
||||
startCoordIndex = endCoordIndex = moveIndex;
|
||||
}
|
||||
|
||||
StormCoord startCoord = state.timePoints[startCoordIndex];
|
||||
StormCoord endCoord = state.timePoints[endCoordIndex];
|
||||
|
@ -805,18 +826,24 @@ public class StormTrackDisplay implements IRenderable {
|
|||
gc.setStartingGeographicPoint(startCoord.coord.x, startCoord.coord.y);
|
||||
gc.setDestinationGeographicPoint(endCoord.coord.x, endCoord.coord.y);
|
||||
|
||||
// get speed and angle
|
||||
double angle = gc.getAzimuth();
|
||||
double oppositeAngle = adjustAngle(angle + 180);
|
||||
if (hasMotion) {
|
||||
// get speed and angle
|
||||
angle = gc.getAzimuth();
|
||||
oppositeAngle = adjustAngle(angle + 180);
|
||||
|
||||
double speed = gc.getOrthodromicDistance()
|
||||
/ trackUtil
|
||||
.timeBetweenDataTimes(startCoord.time, endCoord.time);
|
||||
speed = gc.getOrthodromicDistance()
|
||||
/ trackUtil
|
||||
.timeBetweenDataTimes(startCoord.time, endCoord.time);
|
||||
|
||||
// Tempory fix to prevent a resource error because
|
||||
// the time between data times is 0.
|
||||
if (Double.isNaN(speed)) {
|
||||
return;
|
||||
// Tempory fix to prevent a resource error because
|
||||
// the time between data times is 0.
|
||||
if (Double.isNaN(speed)) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
angle = 0;
|
||||
oppositeAngle = 0;
|
||||
speed = 0;
|
||||
}
|
||||
StormCoord[] timePoints = new StormCoord[state.timePoints.length];
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ import com.vividsolutions.jts.geom.Point;
|
|||
* 10-27-2010 #6964 bkowal Added a public class member for the LineStyle.
|
||||
* 11/29/2012 15571 Qinglu Lin Added compuateCurrentStormCenter();
|
||||
* 15Mar2013 15693 mgamazaychikov Added magnification.
|
||||
* 06-24-2013 DR 16317 D. Friedman Handle "motionless" track.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -195,6 +196,8 @@ public class StormTrackState {
|
|||
/** set magnification to default value */
|
||||
public float magnification = 1.0f;
|
||||
|
||||
private boolean initiallyMotionless;
|
||||
|
||||
/** Compute the coordinate of the storm center at the time defined by dataTime via interpolation. */
|
||||
public boolean compuateCurrentStormCenter(Coordinate coord, DataTime dateTime) {
|
||||
if (futurePoints == null) return false;
|
||||
|
@ -222,4 +225,17 @@ public class StormTrackState {
|
|||
coord.x = 360. + coord.x;
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isInitiallyMotionless() {
|
||||
return initiallyMotionless;
|
||||
}
|
||||
|
||||
public void setInitiallyMotionless(boolean initiallyMotionless) {
|
||||
this.initiallyMotionless = initiallyMotionless;
|
||||
}
|
||||
|
||||
// Return true if motion is defined and is not stationary
|
||||
public boolean isNonstationary() {
|
||||
return mode != Mode.DRAG_ME && speed > 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,37 +69,50 @@ import com.raytheon.viz.core.contours.cache.SubGridCacheKey;
|
|||
import com.raytheon.viz.core.contours.util.ContourContainer;
|
||||
import com.raytheon.viz.core.contours.util.FortConBuf;
|
||||
import com.raytheon.viz.core.contours.util.FortConConfig;
|
||||
import com.raytheon.viz.core.contours.util.StreamLineContainer;
|
||||
import com.raytheon.viz.core.contours.util.StreamLineContainer.StreamLinePoint;
|
||||
import com.raytheon.viz.core.contours.util.StrmPak;
|
||||
import com.raytheon.viz.core.contours.util.StrmPakConfig;
|
||||
import com.raytheon.viz.core.interval.XFormFunctions;
|
||||
import com.raytheon.viz.core.style.contour.ContourPreferences;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
|
||||
/**
|
||||
* ContourSupport
|
||||
*
|
||||
* Provides contouring wrapper
|
||||
* Provides contouring wrapper.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 22, 2007 chammack Initial Creation.
|
||||
* May 26, 2009 #2172 chammack Use zoomLevel to calculate label spacing
|
||||
* Apr 26, 2010 #4583 rjpeter Replaced fortran fortconbuf with java port.
|
||||
* Mar 4, 2011 #7747 njensen Cached subgrid envelopes
|
||||
* Jul 9, 2012 DR 14940 M. Porricelli Adjust arrow size for streamlines
|
||||
* Feb 15, 2013 1638 mschenke Moved edex.common Util functions into common Util
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Oct 22, 2007 chammack Initial Creation.
|
||||
* May 26, 2009 #2172 chammack Use zoomLevel to calculate label spacing
|
||||
* Apr 26, 2010 #4583 rjpeter Replaced fortran fortconbuf with java port.
|
||||
* Mar 04, 2011 #7747 njensen Cached subgrid envelopes
|
||||
* Jul 09, 2012 DR14940 M.Porricelli Adjust arrow size for streamlines
|
||||
* Feb 15, 2013 1638 mschenke Moved edex.common Util functions into common Util
|
||||
* Jun 26, 2013 #1999 dgilling Replace native fortran strmpak call
|
||||
* with java port.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
* @version 1
|
||||
* @version 1.0
|
||||
*/
|
||||
public class ContourSupport {
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(ContourSupport.class);
|
||||
|
||||
private static float smallestContourValue = GridUtil.GRID_FILL_VALUE - 1;
|
||||
|
||||
private static final String STREAM_LINES_PROPERTY_NAME = "viz.use.legacy.streamlines";
|
||||
|
||||
private static final String LEGACY_STEAMLINES_ON = "true";
|
||||
|
||||
private static final String LEGACY_STEAMLINES_OFF = "false";
|
||||
|
||||
|
||||
private static float largestContourValue = GridUtil.GRID_FILL_VALUE + 1;
|
||||
|
||||
|
@ -421,16 +434,20 @@ public class ContourSupport {
|
|||
if (contourLabeling.getNumberOfContours() > 0) {
|
||||
float minData = 1e37f;
|
||||
float maxData = -1e37f;
|
||||
for (float[] dataRow : subgriddedData)
|
||||
for (float data : dataRow)
|
||||
if (data < minData && data != -999999)
|
||||
for (float[] dataRow : subgriddedData) {
|
||||
for (float data : dataRow) {
|
||||
if (data < minData && data != -999999) {
|
||||
minData = data;
|
||||
else if (data < 999998 && data > maxData)
|
||||
} else if (data < 999998 && data > maxData) {
|
||||
maxData = data;
|
||||
}
|
||||
}
|
||||
}
|
||||
interval = (maxData - minData)
|
||||
/ contourLabeling.getNumberOfContours();
|
||||
if (interval < 0)
|
||||
if (interval < 0) {
|
||||
interval = -interval;
|
||||
}
|
||||
if (interval > initialInterval) {
|
||||
initialInterval = interval;
|
||||
prefs.getContourLabeling().setIncrement(
|
||||
|
@ -526,9 +543,9 @@ public class ContourSupport {
|
|||
int totalNegCoords = 0;
|
||||
for (int i = 0; i < size; i++) {
|
||||
if (contours.contourVals.get(i) > 0) {
|
||||
totalPosCoords += (int) contours.xyContourPoints.get(i).length / 2;
|
||||
totalPosCoords += contours.xyContourPoints.get(i).length / 2;
|
||||
} else {
|
||||
totalNegCoords += (int) contours.xyContourPoints.get(i).length / 2;
|
||||
totalNegCoords += contours.xyContourPoints.get(i).length / 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -624,9 +641,17 @@ public class ContourSupport {
|
|||
int maxX = (int) Math.ceil(Math.min(env.getMaximum(0), sz[0] - 1));
|
||||
int maxY = (int) Math.ceil(Math.min(env.getMaximum(1), sz[1] - 1));
|
||||
|
||||
makeStreamLines(uW, vW, minX, minY, maxX, maxY, sz, contourGroup,
|
||||
currentMagnification, zoom, contourGroup.lastDensity,
|
||||
rastPosToWorldGrid);
|
||||
if (LEGACY_STEAMLINES_ON.equals(System.getProperty(
|
||||
STREAM_LINES_PROPERTY_NAME, LEGACY_STEAMLINES_OFF)
|
||||
.toLowerCase())) {
|
||||
makeStreamLinesLegacy(uW, vW, minX, minY, maxX, maxY, sz,
|
||||
contourGroup, currentMagnification, zoom,
|
||||
contourGroup.lastDensity, rastPosToWorldGrid);
|
||||
} else {
|
||||
makeStreamLinesNew(uW, vW, minX, minY, maxX, maxY, sz,
|
||||
contourGroup, currentMagnification, zoom,
|
||||
contourGroup.lastDensity, rastPosToWorldGrid);
|
||||
}
|
||||
}
|
||||
|
||||
return contourGroup;
|
||||
|
@ -883,17 +908,21 @@ public class ContourSupport {
|
|||
// use numberOfContours
|
||||
float minData = 1e37f;
|
||||
float maxData = -1e37f;
|
||||
for (float[] dataRow : subgriddedData)
|
||||
for (float dataCell : dataRow)
|
||||
if (dataCell < minData && dataCell != -999999)
|
||||
for (float[] dataRow : subgriddedData) {
|
||||
for (float dataCell : dataRow) {
|
||||
if (dataCell < minData && dataCell != -999999) {
|
||||
minData = dataCell;
|
||||
else if (dataCell < 999998
|
||||
&& dataCell > maxData)
|
||||
} else if (dataCell < 999998
|
||||
&& dataCell > maxData) {
|
||||
maxData = dataCell;
|
||||
}
|
||||
}
|
||||
}
|
||||
interval = (maxData - minData)
|
||||
/ contourLabeling.getNumberOfContours();
|
||||
if (interval < 0)
|
||||
if (interval < 0) {
|
||||
interval = -interval;
|
||||
}
|
||||
|
||||
if (interval > initialInterval) {
|
||||
initialInterval = interval;
|
||||
|
@ -1055,10 +1084,20 @@ public class ContourSupport {
|
|||
int minY = 0;
|
||||
int maxX = (int) (sz[0] - 1);
|
||||
int maxY = (int) (sz[1] - 1);
|
||||
makeStreamLines(uW, vW, minX, minY, maxX, maxY, sz, contourGroup,
|
||||
1, 1, contourGroup.lastDensity * 2, gridToPixel);
|
||||
return contourGroup;
|
||||
|
||||
if (LEGACY_STEAMLINES_ON.equals(System.getProperty(
|
||||
STREAM_LINES_PROPERTY_NAME, LEGACY_STEAMLINES_OFF)
|
||||
.toLowerCase())) {
|
||||
makeStreamLinesLegacy(uW, vW, minX, minY, maxX, maxY, sz,
|
||||
contourGroup, 1, 1, contourGroup.lastDensity * 2,
|
||||
gridToPixel);
|
||||
} else {
|
||||
makeStreamLinesNew(uW, vW, minX, minY, maxX, maxY, sz,
|
||||
contourGroup, 1, 1, contourGroup.lastDensity * 2,
|
||||
gridToPixel);
|
||||
}
|
||||
|
||||
return contourGroup;
|
||||
} else {
|
||||
throw new UnsupportedOperationException(
|
||||
"Contouring is not supported for data type: "
|
||||
|
@ -1067,7 +1106,9 @@ public class ContourSupport {
|
|||
|
||||
}
|
||||
|
||||
private static void makeStreamLines(float[] uW, float[] vW, int minX,
|
||||
// TODO Remove this function once use of Java ported version of this
|
||||
// algorithm is accepted by end-users
|
||||
private static void makeStreamLinesLegacy(float[] uW, float[] vW, int minX,
|
||||
int minY, int maxX, int maxY, long[] sz, ContourGroup contourGroup,
|
||||
double currentMagnification, float zoom, double density,
|
||||
MathTransform rastPosToWorldGrid) throws VizException {
|
||||
|
@ -1201,6 +1242,124 @@ public class ContourSupport {
|
|||
}
|
||||
}
|
||||
|
||||
private static void makeStreamLinesNew(float[] uW, float[] vW, int minX,
|
||||
int minY, int maxX, int maxY, long[] sz, ContourGroup contourGroup,
|
||||
double currentMagnification, float zoom, double density,
|
||||
MathTransform rastPosToWorldGrid) throws VizException {
|
||||
|
||||
int szX = (maxX - minX) + 1;
|
||||
int szY = (maxY - minY) + 1;
|
||||
int totalSz = szX * szY;
|
||||
if (totalSz <= 0) {
|
||||
return;
|
||||
}
|
||||
int x = (int) sz[0];
|
||||
int y = (int) sz[1];
|
||||
|
||||
float[][] adjustedUw = new float[szX][szY];
|
||||
float[][] adjustedVw = new float[szX][szY];
|
||||
for (int j = 0; j < szY; j++) {
|
||||
for (int i = 0; i < szX; i++) {
|
||||
float uWVal = uW[(x * (j + minY)) + (i + minX)];
|
||||
if (Float.isNaN(uWVal)) {
|
||||
uWVal = GridUtil.GRID_FILL_VALUE;
|
||||
}
|
||||
adjustedUw[szX - 1 - i][j] = uWVal;
|
||||
|
||||
float vWVal = vW[(x * (j + minY)) + (i + minX)];
|
||||
if (Float.isNaN(vWVal)) {
|
||||
vWVal = GridUtil.GRID_FILL_VALUE;
|
||||
}
|
||||
adjustedVw[szX - 1 - i][j] = vWVal;
|
||||
}
|
||||
}
|
||||
|
||||
// Use ported legacy code to determine contour interval
|
||||
long t0 = System.currentTimeMillis();
|
||||
|
||||
double[] center = new double[2];
|
||||
double[] offCenter = new double[2];
|
||||
|
||||
try {
|
||||
rastPosToWorldGrid.transform(new double[] { x / 2.0, y / 2.0 }, 0,
|
||||
center, 0, 1);
|
||||
rastPosToWorldGrid.transform(new double[] { (x / 2.0) + 1.0,
|
||||
y / 2.0 }, 0, offCenter, 0, 1);
|
||||
} catch (TransformException e) {
|
||||
throw new VizException(
|
||||
"Could not perform center calculations for stream lines.",
|
||||
e);
|
||||
}
|
||||
|
||||
double gridPixelSize = offCenter[0] - center[0];
|
||||
double gridPixelMax = 2000.;
|
||||
|
||||
// If gridPixelSize is large, arrows on streamline will be too small, so
|
||||
// adjust here
|
||||
if (gridPixelSize > gridPixelMax) {
|
||||
gridPixelSize = gridPixelSize / 5;
|
||||
}
|
||||
float arrowSize = (float) (currentMagnification * 5 / zoom / gridPixelSize);
|
||||
|
||||
double spadiv = zoom * density * gridPixelSize / 25;
|
||||
|
||||
double minSpacing = 1.0 / spadiv;
|
||||
double maxSpacing = 3.0 / spadiv;
|
||||
float minspc = 0;
|
||||
float maxspc = 0;
|
||||
|
||||
if (minSpacing > 1) {
|
||||
minspc = (float) Math.sqrt(minSpacing);
|
||||
}
|
||||
if (minspc < 0.1) {
|
||||
minspc = 0.1f;
|
||||
}
|
||||
if (maxSpacing > 1) {
|
||||
maxspc = (float) Math.sqrt(maxSpacing);
|
||||
}
|
||||
if (maxspc < 0.25) {
|
||||
maxspc = 0.25f;
|
||||
}
|
||||
|
||||
StrmPakConfig config = new StrmPakConfig(arrowSize, minspc, maxspc,
|
||||
-1000000f, -999998f);
|
||||
StreamLineContainer container = StrmPak.strmpak(adjustedUw, adjustedVw,
|
||||
szX, szX, szY, config);
|
||||
|
||||
long t1 = System.currentTimeMillis();
|
||||
System.out.println("Contouring took: " + (t1 - t0));
|
||||
|
||||
long tAccum = 0;
|
||||
|
||||
try {
|
||||
for (List<StreamLinePoint> points : container.streamLines) {
|
||||
double[][] valsArr = new double[points.size()][2];
|
||||
|
||||
for (int i = 0; i < points.size(); i++) {
|
||||
StreamLinePoint point = points.get(i);
|
||||
try {
|
||||
long tZ0 = System.currentTimeMillis();
|
||||
rastPosToWorldGrid.transform(new double[] {
|
||||
maxX - point.getX(), point.getY() + minY }, 0,
|
||||
valsArr[i], 0, 1);
|
||||
long tZ1 = System.currentTimeMillis();
|
||||
tAccum += (tZ1 - tZ0);
|
||||
} catch (TransformException e) {
|
||||
throw new VizException(
|
||||
"Could not transform stream line coordinate into world grid space.",
|
||||
e);
|
||||
}
|
||||
}
|
||||
|
||||
contourGroup.posValueShape.addLineSegment(valsArr);
|
||||
}
|
||||
|
||||
System.out.println("streamline transformation time: " + tAccum);
|
||||
} catch (Throwable e) {
|
||||
throw new VizException("Error postprocessing contours", e);
|
||||
}
|
||||
}
|
||||
|
||||
private static void processMinMaxLabels(ContourContainer contours,
|
||||
String minMaxLabelFormat, String minLabel, String maxLabel,
|
||||
MathTransform transform, ContourGroup contourGroup,
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.viz.core.contours.util;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* An object that contains a list of coordinates used to draw stream lines over
|
||||
* a grid.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 21, 2013 #1999 dgilling Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author dgilling
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class StreamLineContainer {
|
||||
|
||||
public static class StreamLinePoint {
|
||||
|
||||
private final float x;
|
||||
|
||||
private final float y;
|
||||
|
||||
public StreamLinePoint(float xPoint, float yPoint) {
|
||||
this.x = xPoint;
|
||||
this.y = yPoint;
|
||||
}
|
||||
|
||||
public float getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
public float getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public final List<List<StreamLinePoint>> streamLines;
|
||||
|
||||
public StreamLineContainer() {
|
||||
this(new LinkedList<List<StreamLinePoint>>());
|
||||
}
|
||||
|
||||
private StreamLineContainer(List<List<StreamLinePoint>> listImpl) {
|
||||
streamLines = listImpl;
|
||||
}
|
||||
|
||||
public static StreamLineContainer emptyContainer() {
|
||||
List<List<StreamLinePoint>> listImpl = Collections.emptyList();
|
||||
return new StreamLineContainer(listImpl);
|
||||
}
|
||||
|
||||
public boolean addLine(List<StreamLinePoint> points) {
|
||||
return streamLines.add(points);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,998 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.viz.core.contours.util;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.raytheon.viz.core.contours.util.StreamLineContainer.StreamLinePoint;
|
||||
|
||||
/**
|
||||
* Port of strmpak.f.
|
||||
* <p>
|
||||
* This routine draws a set of streamlines. Works in area defined by current.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 10, 2013 #1999 dgilling Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author dgilling
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public final class StrmPak {
|
||||
|
||||
private final class PointValueBuffer<V> {
|
||||
|
||||
private final Map<Integer, V> buffer;
|
||||
|
||||
private final V defaultValue;
|
||||
|
||||
public PointValueBuffer(int initialSize, V defaultValue) {
|
||||
buffer = new HashMap<Integer, V>(initialSize, 1f);
|
||||
this.defaultValue = defaultValue;
|
||||
}
|
||||
|
||||
public V get(int key) {
|
||||
// TODO: introduce a bounds check so that this class throws an
|
||||
// equivalent to an ArrayIndexOutOfBoundsException when data is
|
||||
// requested that would have been outside of the original array's
|
||||
// bounds.
|
||||
// For now, neglecting for performance reasons
|
||||
V retVal = buffer.get(key);
|
||||
if (retVal == null) {
|
||||
retVal = defaultValue;
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
public V put(int key, V value) {
|
||||
// TODO: introduce a bounds check so that this class throws an
|
||||
// equivalent to an ArrayIndexOutOfBoundsException when data is
|
||||
// requested that would have been outside of the original array's
|
||||
// bounds.
|
||||
// For now, neglecting for performance reasons
|
||||
return buffer.put(key, value);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
buffer.clear();
|
||||
}
|
||||
}
|
||||
|
||||
private static final float minmag = 0.0f;
|
||||
|
||||
private static final float maxmag = 1e36f;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static final float checkval = 1e36f;
|
||||
|
||||
// private static Queue<StrmPak> instancePool = new
|
||||
// ConcurrentLinkedQueue<StrmPak>();
|
||||
|
||||
private int ill;
|
||||
|
||||
private int iur;
|
||||
|
||||
private int jll;
|
||||
|
||||
private int jur;
|
||||
|
||||
private int ium;
|
||||
|
||||
private int jum;
|
||||
|
||||
private float asiz;
|
||||
|
||||
// in fortran itrack/jtrack were size 2000 arrays, indexed 1 ->
|
||||
// 2000
|
||||
private final PointValueBuffer<Integer> itrack;
|
||||
|
||||
private final PointValueBuffer<Integer> jtrack;
|
||||
|
||||
// A2 porting note: LCPnt was a byte array in the original
|
||||
// source, but the only values ever assigned to the array were 0 or 1,
|
||||
// so a boolean array will work just as well.
|
||||
// in fortran LCPnt/IPnt/JPnt were size 8001 arrays, indexed -4000 ->
|
||||
// 4000
|
||||
private final PointValueBuffer<Boolean> LCPnt;
|
||||
|
||||
private final PointValueBuffer<Float> IPnt;
|
||||
|
||||
private final PointValueBuffer<Float> JPnt;
|
||||
|
||||
public static StreamLineContainer strmpak(float[][] uComp, float[][] vComp,
|
||||
int xSize, int nx, int ny, StrmPakConfig config) {
|
||||
StrmPak instance = new StrmPak();
|
||||
StreamLineContainer rval = instance.strmpakInternal(uComp, vComp,
|
||||
xSize, nx, ny, config);
|
||||
return rval;
|
||||
}
|
||||
|
||||
private StrmPak() {
|
||||
itrack = new PointValueBuffer<Integer>(512, 0);
|
||||
jtrack = new PointValueBuffer<Integer>(512, 0);
|
||||
LCPnt = new PointValueBuffer<Boolean>(64, Boolean.TRUE);
|
||||
IPnt = new PointValueBuffer<Float>(512, 0.0f);
|
||||
JPnt = new PointValueBuffer<Float>(512, 0.0f);
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine draws a set of streamlines. Works in area defined by
|
||||
* current.
|
||||
*
|
||||
* @param U
|
||||
* Array of U components
|
||||
* @param V
|
||||
* Array of V components
|
||||
* @param mnx
|
||||
* First dimension of data arrays.
|
||||
* @param nx
|
||||
* Inner dimension of grid.
|
||||
* @param ny
|
||||
* Outer dimension of grid.
|
||||
* @param config
|
||||
* Parameters for drawing the stream lines.
|
||||
*
|
||||
* @return A <code>StreamLineContainer</code> containing the coordinates for
|
||||
* the stream lines. Line segments will be divided by the sentinel
|
||||
* value (-99999, -99999).
|
||||
*/
|
||||
private StreamLineContainer strmpakInternal(float[][] U, float[][] V,
|
||||
int mnx, int nx, int ny, StrmPakConfig config) {
|
||||
StreamLineContainer rVal = new StreamLineContainer();
|
||||
|
||||
// Initialize environment of streamline output.
|
||||
float minmag2 = minmag * minmag;
|
||||
float maxmag2 = maxmag * maxmag;
|
||||
ill = 0;
|
||||
jll = 0;
|
||||
iur = nx - 1;
|
||||
jur = ny - 1;
|
||||
ium = iur - 1;
|
||||
jum = jur - 1;
|
||||
asiz = config.asize;
|
||||
|
||||
// Initialize work arrays.
|
||||
// A2 porting note: In the fortran, Work was an int/short array, but I'm
|
||||
// using byte because it seems the only values ever used in this
|
||||
// algorithm are -1, 0, and 1.
|
||||
byte[][][] Work = new byte[2][nx][ny];
|
||||
for (int i = ill; i <= ium; i++) {
|
||||
int ii = i + 1;
|
||||
|
||||
for (int j = jll; j <= jum; j++) {
|
||||
int jj = j + 1;
|
||||
|
||||
if ((!((U[i][j] < config.badlo) || U[i][j] > config.badhi))
|
||||
|| (!((U[i][jj] < config.badlo) || U[i][jj] > config.badhi))
|
||||
|| (!((U[ii][j] < config.badlo) || U[ii][j] > config.badhi))
|
||||
|| (!((U[ii][jj] < config.badlo) || U[ii][jj] > config.badhi))
|
||||
|| (!((V[i][j] < config.badlo) || V[i][j] > config.badhi))
|
||||
|| (!((V[i][jj] < config.badlo) || V[i][jj] > config.badhi))
|
||||
|| (!((V[ii][j] < config.badlo) || V[ii][j] > config.badhi))
|
||||
|| (!((V[ii][jj] < config.badlo) || V[ii][jj] > config.badhi))) {
|
||||
Work[0][i][j] = -1;
|
||||
Work[1][i][j] = -1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((minmag <= 0.0f) && (maxmag >= config.badlo)) {
|
||||
continue;
|
||||
}
|
||||
float mag2 = U[i][j] * U[i][j] + V[i][j] * V[i][j];
|
||||
if ((mag2 >= minmag2) && (mag2 <= maxmag2)) {
|
||||
continue;
|
||||
}
|
||||
mag2 = U[ii][j] * U[ii][j] + V[ii][j] * V[ii][j];
|
||||
if ((mag2 >= minmag2) && (mag2 <= maxmag2)) {
|
||||
continue;
|
||||
}
|
||||
mag2 = U[i][jj] * U[i][jj] + V[i][jj] * V[i][jj];
|
||||
if ((mag2 >= minmag2) && (mag2 <= maxmag2)) {
|
||||
continue;
|
||||
}
|
||||
mag2 = U[ii][jj] * U[ii][jj] + V[ii][jj] * V[ii][jj];
|
||||
if ((mag2 >= minmag2) && (mag2 <= maxmag2)) {
|
||||
continue;
|
||||
}
|
||||
Work[0][i][j] = -1;
|
||||
Work[1][i][j] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
float maxspc4 = (config.maxspc * 4);
|
||||
int k = (int) ((maxspc4 >= 0) ? (maxspc4 + 0.5f) : (maxspc4 - 0.5f));
|
||||
if (k < 1) {
|
||||
k = 1;
|
||||
}
|
||||
|
||||
do {
|
||||
int i1 = (ill + iur) / 2;
|
||||
int i2 = i1 + 1;
|
||||
int j1 = (jll + jur) / 2;
|
||||
int j2 = j1 + 1;
|
||||
|
||||
boolean again;
|
||||
do {
|
||||
again = false;
|
||||
float mymax = config.maxspc;
|
||||
if (k > mymax) {
|
||||
mymax = k;
|
||||
}
|
||||
|
||||
if (j1 >= jll) {
|
||||
float rj0 = j1;
|
||||
for (int i = i1; i <= i2 - 1; i += k) {
|
||||
float ri0 = i + 0.5f;
|
||||
StrmLin(U, V, Work, mnx, ri0, rj0, config.minspc,
|
||||
mymax, rVal);
|
||||
}
|
||||
j1 -= k;
|
||||
again = true;
|
||||
}
|
||||
|
||||
if (i1 >= ill) {
|
||||
float ri0 = i1;
|
||||
for (int j = j1; j <= j2 - 1; j += k) {
|
||||
float rj0 = j + 0.5f;
|
||||
StrmLin(U, V, Work, mnx, ri0, rj0, config.minspc,
|
||||
mymax, rVal);
|
||||
|
||||
}
|
||||
i1 -= k;
|
||||
again = true;
|
||||
}
|
||||
|
||||
if (j2 < jur) {
|
||||
float rj0 = j2;
|
||||
for (int i = i1; i <= i2 - 1; i += k) {
|
||||
float ri0 = i + 0.5f;
|
||||
StrmLin(U, V, Work, mnx, ri0, rj0, config.minspc,
|
||||
mymax, rVal);
|
||||
}
|
||||
j2 += k;
|
||||
again = true;
|
||||
}
|
||||
|
||||
if (i2 <= iur) {
|
||||
float ri0 = i2;
|
||||
for (int j = j1; j <= j2 - 1; j += k) {
|
||||
float rj0 = j + 0.5f;
|
||||
StrmLin(U, V, Work, mnx, ri0, rj0, config.minspc,
|
||||
mymax, rVal);
|
||||
}
|
||||
i2 += k;
|
||||
again = true;
|
||||
}
|
||||
} while (again);
|
||||
|
||||
k /= 2;
|
||||
} while (k >= 1);
|
||||
|
||||
return rVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* This routine draws a single streamline through the point (ri0, rj0). ri0
|
||||
* are rj0 real numbers in array index space.
|
||||
*
|
||||
* @param U
|
||||
* Array of U components
|
||||
* @param V
|
||||
* Array of V components
|
||||
* @param Work
|
||||
* Workspace which keeps track of how many streamlines have been
|
||||
* drawn in each cell. A value of -1 designates a cell as having
|
||||
* bad or missing data. 1 is for previously drawn streamlines, 2
|
||||
* includes the streamline currently being drawn.
|
||||
* @param mnx
|
||||
* First dimension of array to be countoured.
|
||||
* @param ri0
|
||||
* X-coordinate to draw the streamline through. Coordinates are
|
||||
* in array index space.
|
||||
* @param rj0
|
||||
* Y-coordinate to draw the streamline through. Coordinates are
|
||||
* in array index space.
|
||||
* @param minspc
|
||||
* If greater than one, no two streamlines will approach any
|
||||
* closer than this number of cells. If less than zero, a
|
||||
* streamline will terminate if it runs through 1/minspc
|
||||
* consecutive already occupied cells.
|
||||
* @param maxspc
|
||||
* No streamline will be started any closer than this number of
|
||||
* cells to an existing streamline.
|
||||
* @param container
|
||||
* <code>StreamLineContainer</code> object accumulating all line
|
||||
* segments necessary to draw stream lines for U and V.
|
||||
*/
|
||||
private void StrmLin(float[][] U, float[][] V, byte[][][] Work, int mnx,
|
||||
float ri0, float rj0, float minspc, float maxspc,
|
||||
StreamLineContainer container) {
|
||||
if ((ri0 < ill) || (ri0 > iur) || (rj0 < jll) || (rj0 > jur)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// declare formal arguments
|
||||
int side0;
|
||||
int i;
|
||||
int ii;
|
||||
int iii;
|
||||
int j;
|
||||
int jj;
|
||||
int jjj;
|
||||
int k;
|
||||
int kk;
|
||||
int kkk;
|
||||
int ovrlap = 0;
|
||||
float x;
|
||||
float y;
|
||||
// FIXME? in fortran SgSide was a size 8 array, indexed 1 -> 8
|
||||
int[] SgSide = new int[9];
|
||||
float[] SgLoc = new float[9];
|
||||
float[] SgSF = new float[9];
|
||||
// FIXME? in fortran SgCont was a size 8 array, indexed 1 -> 8
|
||||
float[] SgCont = new float[9];
|
||||
|
||||
itrack.clear();
|
||||
jtrack.clear();
|
||||
LCPnt.clear();
|
||||
IPnt.clear();
|
||||
JPnt.clear();
|
||||
|
||||
// Initialize some variables.
|
||||
int ntb = 1 + Math.min(iur - ill, jur - jll) / 4;
|
||||
int track = 0;
|
||||
int ntrack = (int) ((maxspc >= 0) ? (maxspc + 0.5f) : (maxspc - 0.5f));
|
||||
if (ntrack < ntb) {
|
||||
ntrack = ntb;
|
||||
}
|
||||
int qi0 = (int) ((ri0 >= 0) ? (ri0 + 0.5f) : (ri0 - 0.5f));
|
||||
int qj0 = (int) ((rj0 >= 0) ? (rj0 + 0.5f) : (rj0 - 0.5f));
|
||||
int kpnt1 = 0;
|
||||
int kpnt2 = 0;
|
||||
|
||||
// Loop for trying streamlines in both directions from this point.
|
||||
for (int kstrm = 1; kstrm <= 2; kstrm++) {
|
||||
int kpnt = 0;
|
||||
int dkpnt = 0;
|
||||
int btrack = track + 1;
|
||||
|
||||
// NOTE on A2 port: we use named blocks to substitute for common
|
||||
// goto points within the original fortran code.
|
||||
LABEL_7777: {
|
||||
LABEL_7775: {
|
||||
// Determine which side and which cell we are starting with
|
||||
if (Math.abs(ri0 - qi0) < Math.abs(rj0 - qj0)) {
|
||||
if (kstrm == 1) {
|
||||
side0 = 4;
|
||||
i = (int) ((ri0 >= 0) ? (ri0 + 0.5f) : (ri0 - 0.5f));
|
||||
j = (int) rj0;
|
||||
k = Math.max(
|
||||
((int) ((maxspc >= 0) ? (maxspc + 0.5f)
|
||||
: (maxspc - 0.5f)) - 1), 0);
|
||||
for (jjj = Math.max(jll, (j - k)); jjj <= Math.min(
|
||||
jum, j + k); jjj++) {
|
||||
for (iii = Math.max(ill, (i - k - 1)); iii <= Math
|
||||
.min(ium, i + k); iii++) {
|
||||
if (Work[0][iii][jjj] > 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i > ium) {
|
||||
break LABEL_7775;
|
||||
}
|
||||
} else {
|
||||
side0 = 2;
|
||||
i = (int) ((ri0 >= 0) ? (ri0 + 0.5f) : (ri0 - 0.5f)) - 1;
|
||||
j = (int) rj0;
|
||||
if (i < 1) {
|
||||
break LABEL_7775;
|
||||
}
|
||||
}
|
||||
|
||||
x = qi0 - (float) i;
|
||||
y = rj0 - j;
|
||||
} else {
|
||||
if (kstrm == 1) {
|
||||
side0 = 1;
|
||||
i = (int) ri0;
|
||||
j = (int) ((rj0 >= 0) ? (rj0 + 0.5f) : (rj0 - 0.5f));
|
||||
k = Math.max(
|
||||
((int) ((maxspc >= 0) ? (maxspc + 0.5f)
|
||||
: (maxspc - 0.5f)) - 1), 0);
|
||||
for (jjj = Math.max(jll, (j - k)); jjj <= Math.min(
|
||||
jum, (j + k)); jjj++) {
|
||||
for (iii = Math.max(ill, (i - k - 1)); iii <= Math
|
||||
.min(ium, (i + k)); iii++) {
|
||||
if (Work[0][iii][jjj] > 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (j > jum) {
|
||||
break LABEL_7775;
|
||||
}
|
||||
} else {
|
||||
side0 = 3;
|
||||
i = (int) ri0;
|
||||
j = (int) ((rj0 >= 0) ? (rj0 + 0.5f) : (rj0 - 0.5f)) - 1;
|
||||
if (j < 1) {
|
||||
break LABEL_7775;
|
||||
}
|
||||
}
|
||||
|
||||
x = ri0 - i;
|
||||
y = qj0 - (float) j;
|
||||
}
|
||||
|
||||
ii = i + 1;
|
||||
jj = j + 1;
|
||||
|
||||
// Check if cell has missing values.
|
||||
if (Work[0][i][j] == -1) {
|
||||
break LABEL_7777;
|
||||
}
|
||||
|
||||
// Determine whether we are working with or against the
|
||||
// flow.
|
||||
float dirflg;
|
||||
float influx;
|
||||
if (side0 == 1) {
|
||||
influx = V[i][j] * (1.0f - x) + V[ii][j] * x;
|
||||
} else if (side0 == 2) {
|
||||
influx = -(U[ii][j] * (1.0f - y) + U[ii][jj] * y);
|
||||
} else if (side0 == 3) {
|
||||
influx = -(V[i][jj] * (1.0f - x) + V[ii][jj] * x);
|
||||
} else {
|
||||
influx = U[i][j] * (1.0f - y) + U[i][jj] * y;
|
||||
}
|
||||
if (influx < 0.0f) {
|
||||
dirflg = -1.0f;
|
||||
dkpnt = -1;
|
||||
} else if (influx > 0.0f) {
|
||||
dirflg = 1.0f;
|
||||
dkpnt = 1;
|
||||
} else {
|
||||
break LABEL_7777;
|
||||
}
|
||||
|
||||
// Set some initialize values at streamline start point.
|
||||
float rpxi = i;
|
||||
float rpyj = j;
|
||||
int narrow = (ntb + 3) * 3 / 4;
|
||||
boolean done = false;
|
||||
int ntot = (narrow + 1) / 2;
|
||||
int loopct = 0;
|
||||
IPnt.put(kpnt, rpxi + x);
|
||||
JPnt.put(kpnt, rpyj + y);
|
||||
|
||||
int i1 = 0;
|
||||
int j1 = 0;
|
||||
int i0 = 0;
|
||||
int j0 = 0;
|
||||
int icheck = 0;
|
||||
|
||||
float xx;
|
||||
float yy;
|
||||
|
||||
// Start process of crossing this cell, check if we have
|
||||
// missing data.
|
||||
while (true) {
|
||||
if (Work[0][i][j] == -1) {
|
||||
break LABEL_7777;
|
||||
}
|
||||
|
||||
// Determine if there are already too many streamlines
|
||||
// around.
|
||||
if (track > btrack) {
|
||||
if (minspc < 1.5f) {
|
||||
if (Work[icheck][i][j] == 0) {
|
||||
ovrlap = 0;
|
||||
} else {
|
||||
ovrlap += Work[icheck][i][j];
|
||||
float minspcInv = 1.0f / minspc;
|
||||
if (ovrlap >= (int) ((minspcInv >= 0) ? (minspcInv + 0.5f)
|
||||
: (minspcInv - 0.5f))) {
|
||||
break LABEL_7777;
|
||||
}
|
||||
}
|
||||
|
||||
icheck = 1;
|
||||
} else {
|
||||
if (Work[icheck][i][j] > 0) {
|
||||
break LABEL_7777;
|
||||
}
|
||||
for (int djj = -1; djj <= 0; djj++) {
|
||||
LABEL_20: for (int dii = -1; dii <= 0; dii++) {
|
||||
if ((dii == 0) && (djj == 0)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((dii != 0) && (djj != 0)) {
|
||||
float minspc707 = minspc * .707f;
|
||||
k = (int) ((minspc707 >= 0) ? (minspc707 + 0.5f)
|
||||
: (minspc707 - 0.5f)) - 1;
|
||||
} else {
|
||||
k = (int) ((minspc >= 0) ? (minspc + 0.5f)
|
||||
: (minspc - 0.5f)) - 1;
|
||||
}
|
||||
if (k > (track - btrack)) {
|
||||
k = track - btrack;
|
||||
}
|
||||
if (k < 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
iii = i;
|
||||
jjj = j;
|
||||
LABEL_18: for (int l = 1; l <= k; l++) {
|
||||
iii += dii;
|
||||
if ((iii < ill) || (iii > ium)) {
|
||||
continue LABEL_20;
|
||||
}
|
||||
jjj += djj;
|
||||
if ((jjj < jll) || (jjj > jum)) {
|
||||
continue LABEL_20;
|
||||
}
|
||||
|
||||
if (Work[0][iii][jjj] > 0) {
|
||||
break LABEL_7777;
|
||||
}
|
||||
if (Work[1][iii][jjj] <= 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (int kkkk = (1 + track - k); kkkk <= track; kkkk++) {
|
||||
if ((itrack.get(kkkk) == iii)
|
||||
&& (jtrack.get(kkkk) == jjj)) {
|
||||
continue LABEL_18;
|
||||
}
|
||||
}
|
||||
break LABEL_7777;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
icheck = 1;
|
||||
}
|
||||
|
||||
// Determine flux contributions from each component.
|
||||
// FIXME? in fortran Flux was a size 8 array, indexed 1
|
||||
// -> 8
|
||||
float[] Flux = { Float.NaN, (-dirflg) * V[i][j],
|
||||
(-dirflg) * V[ii][j], dirflg * U[ii][j],
|
||||
dirflg * U[ii][jj], dirflg * V[ii][jj],
|
||||
dirflg * V[i][jj], (-dirflg) * U[i][jj],
|
||||
(-dirflg) * U[i][j] };
|
||||
|
||||
// Count total number of in, out, and zero contributions
|
||||
// to net flux.
|
||||
int nin = 0;
|
||||
int nout = 0;
|
||||
for (k = 1; k <= 8; k++) {
|
||||
if (Flux[k] < 0.0f) {
|
||||
nin++;
|
||||
} else if (Flux[k] > 0.0f) {
|
||||
nout++;
|
||||
}
|
||||
}
|
||||
if (nin == 0) {
|
||||
break LABEL_7777;
|
||||
}
|
||||
|
||||
// Check if there are no exit points in this cell.
|
||||
LABEL_77: {
|
||||
if (nout == 0) {
|
||||
// Determine termination point within this cell.
|
||||
float x1 = -Flux[8] - Flux[7];
|
||||
float x2 = -Flux[4] - Flux[3];
|
||||
if ((x1 + x2) <= 0.0f) {
|
||||
xx = 0.5f;
|
||||
} else {
|
||||
xx = x1 / (x1 + x2);
|
||||
}
|
||||
|
||||
float y1 = -Flux[5] - Flux[6];
|
||||
float y2 = -Flux[1] - Flux[2];
|
||||
if ((y1 + y2) <= 0.0f) {
|
||||
yy = 0.5f;
|
||||
} else {
|
||||
yy = y1 / (y1 + y2);
|
||||
}
|
||||
done = true;
|
||||
|
||||
// go to drawing portion
|
||||
break LABEL_77;
|
||||
}
|
||||
|
||||
// Make a list of segments on cell border with like
|
||||
// contribution to flux. Record location, side, and
|
||||
// flux contribution.
|
||||
influx = 0.0f;
|
||||
float outflux = 0.0f;
|
||||
int nsg = 0;
|
||||
SgLoc[0] = 0.0f;
|
||||
for (k = 1; k <= 4; k++) {
|
||||
kkk = k + k;
|
||||
kk = kkk - 1;
|
||||
boolean flxflg;
|
||||
if (Flux[kk] < 0.0f) {
|
||||
flxflg = (Flux[kkk] > 0.0f);
|
||||
} else if (Flux[kk] > 0.0f) {
|
||||
flxflg = (Flux[kkk] < 0.0f);
|
||||
} else {
|
||||
flxflg = false;
|
||||
}
|
||||
|
||||
if (flxflg) {
|
||||
float xy = Flux[kk]
|
||||
/ (Flux[kk] - Flux[kkk]);
|
||||
if (xy > 0.0f) {
|
||||
nsg++;
|
||||
SgSide[nsg] = k;
|
||||
SgLoc[nsg] = (k - 1f) + xy;
|
||||
SgCont[nsg] = xy * Flux[kk] / 2f;
|
||||
if (SgCont[nsg] < 0.0f) {
|
||||
influx += SgCont[nsg];
|
||||
} else {
|
||||
outflux += SgCont[nsg];
|
||||
}
|
||||
}
|
||||
|
||||
if (xy < 1.0f) {
|
||||
nsg++;
|
||||
SgSide[nsg] = k;
|
||||
SgCont[nsg] = (1.0f - xy) * Flux[kkk]
|
||||
/ 2f;
|
||||
}
|
||||
|
||||
SgLoc[nsg] = k;
|
||||
} else {
|
||||
nsg++;
|
||||
SgLoc[nsg] = k;
|
||||
SgSide[nsg] = k;
|
||||
SgCont[nsg] = Flux[kk] + Flux[kkk];
|
||||
}
|
||||
|
||||
if (SgCont[nsg] < 0.0f) {
|
||||
influx += SgCont[nsg];
|
||||
} else {
|
||||
outflux += SgCont[nsg];
|
||||
}
|
||||
}
|
||||
|
||||
// Adjust the magnitude of the flux segments to make
|
||||
// total flux integrated around the cell zero.
|
||||
// Integrate to get stream function values.
|
||||
float mult = (float) Math.sqrt((-outflux) / influx);
|
||||
SgSF[0] = 0.0f;
|
||||
for (k = 1; k < nsg; k++) {
|
||||
if (SgCont[k] > 0.0f) {
|
||||
SgSF[k] = SgSF[k - 1] + SgCont[k] / mult;
|
||||
} else {
|
||||
SgSF[k] = SgSF[k - 1] + SgCont[k] * mult;
|
||||
}
|
||||
}
|
||||
k = nsg + 1;
|
||||
SgSF[nsg] = 0.0f;
|
||||
|
||||
// Based on side of entry, determine circular
|
||||
// location of endpoint and direction to search for
|
||||
// exit point.
|
||||
float curloc;
|
||||
boolean forward;
|
||||
if (side0 == 1) {
|
||||
curloc = x;
|
||||
forward = ((dirflg * (U[i][j] * (1.0f - x) + U[ii][j]
|
||||
* x)) > 0.0f);
|
||||
} else if (side0 == 2) {
|
||||
curloc = 1.0f + y;
|
||||
forward = ((dirflg * (V[ii][j] * (1.0f - y) + V[ii][jj]
|
||||
* y)) > 0.0f);
|
||||
} else if (side0 == 3) {
|
||||
curloc = 3.0f - x;
|
||||
forward = ((dirflg * (U[i][jj] * x + U[ii][jj]
|
||||
* (1.0f - x))) < 0.0f);
|
||||
} else {
|
||||
curloc = 4.0f - y;
|
||||
forward = ((dirflg * (V[i][j] * y + V[i][jj]
|
||||
* (1.0f - y))) < 0.0f);
|
||||
}
|
||||
|
||||
// Determine stream function value of entry
|
||||
// location.
|
||||
float curSF = 0.0f;
|
||||
for (kk = 1; kk <= nsg; kk++) {
|
||||
if ((SgLoc[kk] > curloc) || (kk == nsg)) {
|
||||
k = kk - 1;
|
||||
if (SgCont[kk] >= 0.0f) {
|
||||
break LABEL_7777;
|
||||
}
|
||||
curSF = SgSF[k] + (SgSF[kk] - SgSF[k])
|
||||
* (curloc - SgLoc[k])
|
||||
/ (SgLoc[kk] - SgLoc[k]);
|
||||
if (k < 1) {
|
||||
k = nsg;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Search for next occurrence of this value of the
|
||||
// stream function.
|
||||
kkk = k;
|
||||
if (forward) {
|
||||
do {
|
||||
k = kk;
|
||||
kk++;
|
||||
if (kk > nsg) {
|
||||
kk = 1;
|
||||
}
|
||||
if (k == kkk) {
|
||||
break LABEL_7777;
|
||||
}
|
||||
} while ((SgCont[kk] <= 0.0f)
|
||||
|| ((SgSF[k] <= curSF) != (curSF < SgSF[kk])));
|
||||
} else {
|
||||
do {
|
||||
kk = k;
|
||||
k--;
|
||||
if (k < 1) {
|
||||
k = nsg;
|
||||
}
|
||||
if (k == kkk) {
|
||||
break LABEL_7777;
|
||||
}
|
||||
} while ((SgCont[kk] <= 0.0f)
|
||||
|| ((SgSF[k] <= curSF) != (curSF < SgSF[kk])));
|
||||
}
|
||||
if (k == nsg) {
|
||||
k = 0;
|
||||
}
|
||||
float outloc = SgLoc[k] + (SgLoc[kk] - SgLoc[k])
|
||||
* (curSF - SgSF[k]) / (SgSF[kk] - SgSF[k]);
|
||||
side0 = SgSide[kk];
|
||||
|
||||
// Based upon exit side, figure out location in x/y
|
||||
// space.
|
||||
if (side0 == 1) {
|
||||
xx = outloc;
|
||||
yy = 0.0f;
|
||||
} else if (side0 == 2) {
|
||||
xx = 1.0f;
|
||||
yy = outloc - 1.0f;
|
||||
} else if (side0 == 3) {
|
||||
xx = 3.0f - outloc;
|
||||
yy = 1.0f;
|
||||
} else {
|
||||
xx = 0.0f;
|
||||
yy = 4.0f - outloc;
|
||||
}
|
||||
}
|
||||
|
||||
// Record plotting location for this cell.
|
||||
ntot++;
|
||||
kpnt += dkpnt;
|
||||
if ((ntot > narrow) && (Work[1][i][j] == 0)) {
|
||||
float dx = xx - x;
|
||||
float dy = yy - y;
|
||||
float mag = (float) Math.sqrt(dx * dx + dy * dy);
|
||||
if (mag >= 0.2f) {
|
||||
LCPnt.put(kpnt, Boolean.FALSE);
|
||||
ntot = 0;
|
||||
}
|
||||
}
|
||||
IPnt.put(kpnt, rpxi + xx);
|
||||
JPnt.put(kpnt, rpyj + yy);
|
||||
|
||||
// Patch to prevent infinite loop.
|
||||
i1 = i0;
|
||||
j1 = j0;
|
||||
i0 = i;
|
||||
j0 = j;
|
||||
|
||||
// Keep track of cells used so far.
|
||||
Work[1][i][j]++;
|
||||
track++;
|
||||
itrack.put(track, i);
|
||||
jtrack.put(track, j);
|
||||
|
||||
// Based on exit side, figure out stuff for next cell.
|
||||
if (done) {
|
||||
break LABEL_7775;
|
||||
}
|
||||
if (side0 == 1) {
|
||||
side0 = 3;
|
||||
jj = j;
|
||||
j--;
|
||||
if (j < 1) {
|
||||
break LABEL_7775;
|
||||
}
|
||||
rpyj -= 1.0f;
|
||||
x = xx;
|
||||
y = 1.0f;
|
||||
} else if (side0 == 2) {
|
||||
side0 = 4;
|
||||
i = ii;
|
||||
ii++;
|
||||
if (i > ium) {
|
||||
break LABEL_7775;
|
||||
}
|
||||
rpxi += 1.0f;
|
||||
x = 0.0f;
|
||||
y = yy;
|
||||
} else if (side0 == 3) {
|
||||
side0 = 1;
|
||||
j = jj;
|
||||
jj++;
|
||||
if (j > jum) {
|
||||
break LABEL_7775;
|
||||
}
|
||||
rpyj += 1.0f;
|
||||
x = xx;
|
||||
y = 0.0f;
|
||||
} else if (side0 == 4) {
|
||||
side0 = 2;
|
||||
ii = i;
|
||||
i--;
|
||||
if (i < 1) {
|
||||
break LABEL_7775;
|
||||
}
|
||||
rpxi -= 1.0f;
|
||||
x = 1.0f;
|
||||
y = yy;
|
||||
}
|
||||
|
||||
// Patch to prevent infinite loop.
|
||||
if ((i == i1) && (j == j1)) {
|
||||
loopct++;
|
||||
if (loopct >= 3) {
|
||||
break LABEL_7777;
|
||||
}
|
||||
} else {
|
||||
loopct = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Escape point for streamline hitting grid border, source, or
|
||||
// sink.
|
||||
// allow shorter streamlines in this case.
|
||||
ntrack = (ntrack + 1) / 2;
|
||||
}
|
||||
|
||||
// Escape point for all others...record kpnt value.
|
||||
if (dkpnt == -1) {
|
||||
kpnt1 = kpnt;
|
||||
} else if (dkpnt == 1) {
|
||||
kpnt2 = kpnt;
|
||||
}
|
||||
}
|
||||
|
||||
// Don't draw this streamline if it is too short.
|
||||
if (track < ntrack) {
|
||||
for (k = 1; k <= track; k++) {
|
||||
Work[1][itrack.get(k)][jtrack.get(k)]--;
|
||||
}
|
||||
// A2 porting note: this code appeared in the original algorithm but
|
||||
// is unnecessary since the values stored to LCPnt don't persist
|
||||
// between calls to StrmLin().
|
||||
// for (k = kpnt1; k <= kpnt2; k++) {
|
||||
// LCPnt.put(k, Boolean.TRUE);
|
||||
// }
|
||||
return;
|
||||
} else {
|
||||
for (k = 1; k <= track; k++) {
|
||||
Work[0][itrack.get(k)][jtrack.get(k)]++;
|
||||
}
|
||||
}
|
||||
|
||||
int npass = 5;
|
||||
int wgt1 = 6;
|
||||
int wgt2 = 88;
|
||||
|
||||
// Do smoothing.
|
||||
if (npass > 0) {
|
||||
for (int kkkk = 1; kkkk <= npass; kkkk++) {
|
||||
k = kpnt1 + 1;
|
||||
float im = IPnt.get(kpnt1);
|
||||
float xx = IPnt.get(k);
|
||||
float jm = JPnt.get(kpnt1);
|
||||
float yy = JPnt.get(k);
|
||||
|
||||
for (int kp = kpnt1 + 2; kp <= kpnt2; kp++) {
|
||||
float ip = IPnt.get(kp);
|
||||
float jp = JPnt.get(kp);
|
||||
IPnt.put(k, (wgt1 * (ip + im) + wgt2 * xx) / 100f);
|
||||
JPnt.put(k, (wgt1 * (jp + jm) + wgt2 * yy) / 100f);
|
||||
im = xx;
|
||||
jm = yy;
|
||||
xx = ip;
|
||||
yy = jp;
|
||||
k = kp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Draw streamline.
|
||||
List<StreamLinePoint> lineSegment = new ArrayList<StreamLinePoint>(
|
||||
kpnt2 - kpnt1 + 1);
|
||||
for (i = kpnt1; i <= kpnt2; i++) {
|
||||
lineSegment.add(new StreamLinePoint(IPnt.get(i), JPnt.get(i)));
|
||||
}
|
||||
container.addLine(lineSegment);
|
||||
|
||||
// Draw arrows.
|
||||
if (kpnt1 < 0) {
|
||||
kkk = kpnt1 + 2;
|
||||
LCPnt.put(kkk,
|
||||
LCPnt.get(kpnt1).booleanValue()
|
||||
&& LCPnt.get(kpnt1 + 1).booleanValue());
|
||||
} else {
|
||||
kkk = kpnt1;
|
||||
}
|
||||
|
||||
for (k = kkk; k <= kpnt2; k++) {
|
||||
if (!LCPnt.get(k)) {
|
||||
LCPnt.put(k, Boolean.TRUE);
|
||||
|
||||
int km = ((k < 0) ? k : k - 1);
|
||||
int kp = ((k < 0) ? k + 1 : k);
|
||||
|
||||
float dx = IPnt.get(kp) - IPnt.get(km);
|
||||
float dy = JPnt.get(kp) - JPnt.get(km);
|
||||
float mag = (float) Math.sqrt(dx * dx + dy * dy);
|
||||
if (mag != 0.0f) {
|
||||
mag /= asiz;
|
||||
dx /= mag;
|
||||
dy /= mag;
|
||||
x = (IPnt.get(km) + IPnt.get(kp)) / 2f;
|
||||
y = (JPnt.get(km) + JPnt.get(kp)) / 2f;
|
||||
|
||||
// A2 porting note: these variables are not required in our
|
||||
// port of this code--they were used specifically by the A1
|
||||
// D2D drawing routines
|
||||
// float[] px = { (dy - dx), 0, (0 - dx - dx) };
|
||||
// float[] py = { px[2], 0, (0 - px[0]) };
|
||||
|
||||
List<StreamLinePoint> arrowHead = new ArrayList<StreamLinePoint>(
|
||||
3);
|
||||
arrowHead.add(new StreamLinePoint((x - (dy - dx)),
|
||||
(y - (-dy - dx))));
|
||||
arrowHead.add(new StreamLinePoint(x, y));
|
||||
arrowHead.add(new StreamLinePoint((x - (-dy - dx)),
|
||||
(y + (dy - dx))));
|
||||
container.addLine(arrowHead);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.viz.core.contours.util;
|
||||
|
||||
/**
|
||||
* Configuration parameters for calculating stream lines.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 26, 2013 #1999 dgilling Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author dgilling
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public final class StrmPakConfig {
|
||||
|
||||
public float asize;
|
||||
|
||||
public float minspc;
|
||||
|
||||
public float maxspc;
|
||||
|
||||
public float badlo;
|
||||
|
||||
public float badhi;
|
||||
|
||||
/**
|
||||
* Creates a new configuration to run StrmPak.
|
||||
*
|
||||
* @param asize
|
||||
* Size of arrows in MVI.
|
||||
* @param minspc
|
||||
* If greater than one, no two streamlines will approach any
|
||||
* closer than this number of cells. If less than one, a
|
||||
* streamline will terminate if it runs through 1/minspc
|
||||
* consecutive already occupied cells.
|
||||
* @param maxspc
|
||||
* No streamline will be started any closer than this number of
|
||||
* cells to an existing streamline.
|
||||
* @param badlo
|
||||
* @param badhi
|
||||
*/
|
||||
public StrmPakConfig(float asize, float minspc, float maxspc, float badlo,
|
||||
float badhi) {
|
||||
this.asize = asize;
|
||||
this.minspc = minspc;
|
||||
this.maxspc = maxspc;
|
||||
this.badlo = badlo;
|
||||
this.badhi = badhi;
|
||||
}
|
||||
}
|
|
@ -55,6 +55,7 @@ import com.raytheon.uf.viz.core.rsc.ResourceList;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 28, 2011 mpduff Initial creation.
|
||||
* Sep 11, 2012 1162 mpduff Made mergeMetaDataMap method public.
|
||||
* Jun 21, 2013 DR15394 mgamazaychikov Remove implementation of resourceChanged
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -104,9 +105,9 @@ public class VizGroupResourceData extends AbstractRequestableResourceData
|
|||
.construct(resourceList.get(i).getLoadProperties(),
|
||||
descriptor);
|
||||
rsc.setDescriptor(descriptor);
|
||||
rsc.getResourceData().addChangeListener(this);
|
||||
resourceList.get(i).setResource(rsc);
|
||||
rscs.add(rsc);
|
||||
rsc.getResourceData().addChangeListener(this);
|
||||
} catch (NoDataAvailableException e) {
|
||||
// Do nothing
|
||||
}
|
||||
|
@ -276,12 +277,7 @@ public class VizGroupResourceData extends AbstractRequestableResourceData
|
|||
*/
|
||||
@Override
|
||||
public void resourceChanged(ChangeType type, Object object) {
|
||||
for (ResourcePair rp : resourceList) {
|
||||
if ((rp.getResource() != null)
|
||||
&& (rp.getResource().getResourceData() != null)) {
|
||||
fireChangeListeners(type, object);
|
||||
}
|
||||
}
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
|
@ -95,10 +95,10 @@ import com.vividsolutions.jts.geom.Envelope;
|
|||
* The ReferenceSetMgr keeps track of the activeRefSet and interfaces to the
|
||||
* server to save, delete, and load Reference sets. It keeps track of the
|
||||
* availableRefSets and sends notification of changes to the inventory.
|
||||
*
|
||||
*
|
||||
* Requests are made to the ReferenceSetMgr to change, clear, and toggle the
|
||||
* reference set.
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
|
@ -107,9 +107,10 @@ import com.vividsolutions.jts.geom.Envelope;
|
|||
* 02/14/2013 #1506 mnash Move QueryScript to use new Python concurrency implementation
|
||||
* 02/12/2013 #1597 randerso Improved error message for exceptions evaluating queries
|
||||
* 02/26/2013 #1708 randerso Removed no longer needed near duplicate methods
|
||||
*
|
||||
* 06/21/2013 14983 ryu Added method for synchronous evaluation of query.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author randerso
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -188,7 +189,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/**
|
||||
* Set the wait cursor on or off
|
||||
*
|
||||
*
|
||||
* @param state
|
||||
* 0 = wait cursor on, 1 = wait cursor off
|
||||
*/
|
||||
|
@ -219,11 +220,11 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/**
|
||||
* Gets and updates the reference set inventory from the server.
|
||||
*
|
||||
*
|
||||
* Uses net() to get a pointer to the reference network (referenceNet). Asks
|
||||
* the reference server for the inventory. Stores the inventory and sends a
|
||||
* RefSetInventoryChanged message if the inventory has changed.
|
||||
*
|
||||
*
|
||||
*/
|
||||
private void getInventory() {
|
||||
// load the complete list of edit areas
|
||||
|
@ -341,7 +342,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see com.raytheon.viz.gfe.core.IReferenceSetManager#getGroupInventory()
|
||||
*/
|
||||
@Override
|
||||
|
@ -359,7 +360,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.gfe.core.IReferenceSetManager#getGroupData(java.lang
|
||||
* .String)
|
||||
|
@ -386,7 +387,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/**
|
||||
* Returns list of areas which are not in any group
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private List<String> getMisc() {
|
||||
|
@ -538,7 +539,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
/**
|
||||
* Command to update the reference data cache based on additions, deletions,
|
||||
* and changes.
|
||||
*
|
||||
*
|
||||
* @param additions
|
||||
* @param deletions
|
||||
* @param changes
|
||||
|
@ -560,9 +561,9 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/**
|
||||
* Constructor for ReferenceSet taking a pointer to the Data Manager
|
||||
*
|
||||
*
|
||||
* Stores the pointer in private data. Gets the inventory. *
|
||||
*
|
||||
*
|
||||
* @param dataManager
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
|
@ -668,7 +669,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.gfe.core.internal.IReferenceSetManager#getActiveRefSet()
|
||||
*/
|
||||
|
@ -679,7 +680,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.gfe.core.internal.IReferenceSetManager#setActiveRefSet
|
||||
* (com.raytheon.edex.plugin.gfe.reference.ReferenceData)
|
||||
|
@ -720,7 +721,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.gfe.core.internal.IReferenceSetManager#getAvailableSets
|
||||
* ()
|
||||
|
@ -732,7 +733,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.gfe.core.internal.IReferenceSetManager#emptyRefSet()
|
||||
*/
|
||||
|
@ -743,7 +744,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see com.raytheon.viz.gfe.core.internal.IReferenceSetManager#fullRefSet()
|
||||
*/
|
||||
@Override
|
||||
|
@ -753,7 +754,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.gfe.core.internal.IReferenceSetManager#loadRefSet(com
|
||||
* .raytheon.edex.plugin.gfe.reference.ReferenceID)
|
||||
|
@ -807,7 +808,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/**
|
||||
* Retrieves a list of ReferenceData corresponding to the referenceIDs
|
||||
*
|
||||
*
|
||||
* @param need
|
||||
* the referenceIDs
|
||||
* @return a List of ReferenceData
|
||||
|
@ -823,7 +824,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.gfe.core.internal.IReferenceSetManager#saveActiveRefSet
|
||||
* (com.raytheon.edex.plugin.gfe.reference.ReferenceID)
|
||||
|
@ -852,7 +853,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.gfe.core.internal.IReferenceSetManager#saveRefSet(com
|
||||
* .raytheon.edex.plugin.gfe.reference.ReferenceData)
|
||||
|
@ -902,7 +903,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.gfe.core.internal.IReferenceSetManager#deleteRefSet(
|
||||
* com.raytheon.edex.plugin.gfe.reference.ReferenceID)
|
||||
|
@ -935,7 +936,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see com.raytheon.viz.gfe.core.internal.IReferenceSetManager#undoRefSet()
|
||||
*/
|
||||
@Override
|
||||
|
@ -950,10 +951,10 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
* set has changed. The bypassActiveCheck bypasses the checking for whether
|
||||
* a change has occurred in the active ref set. This is only set for saving
|
||||
* the active reference set to prevent extra work.
|
||||
*
|
||||
*
|
||||
* Updates the reference data cache. Can update the active ref set. Sends
|
||||
* out inventory change notifications.
|
||||
*
|
||||
*
|
||||
* @param inventory
|
||||
* @param additions
|
||||
* @param deletions
|
||||
|
@ -1043,7 +1044,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.gfe.core.internal.IReferenceSetManager#taperGrid(com
|
||||
* .raytheon.edex.plugin.gfe.reference.ReferenceData, int)
|
||||
|
@ -1130,7 +1131,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.gfe.core.internal.IReferenceSetManager#directionTaperGrid
|
||||
* (com.raytheon.edex.plugin.gfe.reference.ReferenceData, java.lang.String)
|
||||
|
@ -1214,7 +1215,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.gfe.core.internal.IReferenceSetManager#siteGridpoints
|
||||
* (java.lang.String[], boolean)
|
||||
|
@ -1255,7 +1256,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.gfe.core.internal.IReferenceSetManager#mySiteGridpoints
|
||||
* ()
|
||||
|
@ -1267,7 +1268,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/**
|
||||
* Returns the Discrepancy Area Id number
|
||||
*
|
||||
*
|
||||
* @return the Discrepancy Area Id number
|
||||
*/
|
||||
public int nextAreaIdNumber() {
|
||||
|
@ -1281,7 +1282,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see com.raytheon.viz.gfe.core.internal.IReferenceSetManager#toString()
|
||||
*/
|
||||
@Override
|
||||
|
@ -1291,7 +1292,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see com.raytheon.viz.gfe.core.internal.IReferenceSetManager#getMode()
|
||||
*/
|
||||
@Override
|
||||
|
@ -1301,7 +1302,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.gfe.core.internal.IReferenceSetManager#setMode(com.raytheon
|
||||
* .viz.gfe.core.internal.ReferenceSetManager.RefSetMode)
|
||||
|
@ -1313,7 +1314,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.gfe.core.IReferenceSetManager#incomingRefSet(com.raytheon
|
||||
* .edex.plugin.gfe.reference.ReferenceData,
|
||||
|
@ -1403,7 +1404,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see com.raytheon.viz.gfe.core.IReferenceSetManager#clearRefSet()
|
||||
*/
|
||||
@Override
|
||||
|
@ -1413,7 +1414,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see com.raytheon.viz.gfe.core.IReferenceSetManager#toggleRefSet()
|
||||
*/
|
||||
@Override
|
||||
|
@ -1425,7 +1426,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @seecom.raytheon.viz.gfe.core.IReferenceSetManager#
|
||||
* addReferenceSetInvChangedListener
|
||||
* (com.raytheon.viz.gfe.core.msgs.IReferenceSetInvChangedListener)
|
||||
|
@ -1438,7 +1439,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @seecom.raytheon.viz.gfe.core.IReferenceSetManager#
|
||||
* removeReferenceSetInvChangedListener
|
||||
* (com.raytheon.viz.gfe.core.msgs.IReferenceSetInvChangedListener)
|
||||
|
@ -1451,7 +1452,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.gfe.core.IReferenceSetManager#addReferenceSetChangedListener
|
||||
* (com.raytheon.viz.gfe.core.msgs.IReferenceSetChangedListener)
|
||||
|
@ -1464,7 +1465,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @seecom.raytheon.viz.gfe.core.IReferenceSetManager#
|
||||
* removeReferenceSetChangedListener
|
||||
* (com.raytheon.viz.gfe.core.msgs.IReferenceSetChangedListener)
|
||||
|
@ -1477,7 +1478,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @seecom.raytheon.viz.gfe.core.IReferenceSetManager#
|
||||
* addReferenceSetIDChangedListener
|
||||
* (com.raytheon.viz.gfe.core.msgs.IReferenceSetIDChangedListener)
|
||||
|
@ -1490,7 +1491,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @seecom.raytheon.viz.gfe.core.IReferenceSetManager#
|
||||
* removeReferenceSetIDChangedListener
|
||||
* (com.raytheon.viz.gfe.core.msgs.IReferenceSetIDChangedListener)
|
||||
|
@ -1503,7 +1504,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @seecom.raytheon.viz.gfe.core.IReferenceSetManager#
|
||||
* addEditAreaGroupInvChangedListener
|
||||
* (com.raytheon.viz.gfe.core.msgs.IEditAreaGroupInvChangedListener)
|
||||
|
@ -1516,7 +1517,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @seecom.raytheon.viz.gfe.core.IReferenceSetManager#
|
||||
* removeEditAreaGroupInvChangedListener
|
||||
* (com.raytheon.viz.gfe.core.msgs.IEditAreaGroupInvChangedListener)
|
||||
|
@ -1529,7 +1530,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see com.raytheon.viz.gfe.core.IReferenceSetManager#handleQuickSet(int)
|
||||
*/
|
||||
@Override
|
||||
|
@ -1594,7 +1595,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see com.raytheon.viz.gfe.core.IReferenceSetManager#toggleQuickSetMode()
|
||||
*/
|
||||
@Override
|
||||
|
@ -1624,7 +1625,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see com.raytheon.viz.gfe.core.IReferenceSetManager#getQuickSetMode()
|
||||
*/
|
||||
@Override
|
||||
|
@ -1737,6 +1738,31 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluate the query and return the usable edit area.
|
||||
*
|
||||
* @param query
|
||||
* The query to be evaluated.
|
||||
* @return The resulting edit area.
|
||||
*/
|
||||
public ReferenceData evaluateQuery(String query) {
|
||||
ReferenceData ea = null;
|
||||
|
||||
Map<String, Object> argMap = new HashMap<String, Object>();
|
||||
argMap.put("expression", query);
|
||||
|
||||
IPythonExecutor<QueryScript, ReferenceData> executor = new QueryScriptExecutor(
|
||||
"evaluate", argMap);
|
||||
try {
|
||||
ea = coordinator.submitSyncJob(executor);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"Failed to evaluate query: " + query, e);
|
||||
}
|
||||
|
||||
return ea;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean willRecurse(String name, String query) {
|
||||
Map<String, Object> argMap = new HashMap<String, Object>();
|
||||
|
@ -1769,7 +1795,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.viz.gfe.core.msgs.Message.IMessageClient#receiveMessage(
|
||||
* com.raytheon.viz.gfe.core.msgs.Message)
|
||||
|
@ -1824,7 +1850,7 @@ public class ReferenceSetManager implements IReferenceSetManager,
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see com.raytheon.viz.gfe.core.msgs.ISpatialEditorTimeChangedListener#
|
||||
* spatialEditorTimeChanged(java.util.Date)
|
||||
*/
|
||||
|
|
|
@ -96,6 +96,7 @@ import com.vividsolutions.jts.io.WKBReader;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* wldougher Initial creation
|
||||
* Jul 11, 2011 9928 rferrel moveGroup now takes list of groups.
|
||||
* Jun 24, 2013 2134 randerso Fixed NullPointerException in fitToCWA.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -1317,7 +1318,6 @@ public class ZoneDbResource extends
|
|||
query.toString(), MAP_DB, QueryLanguage.SQL);
|
||||
if ((result != null) && (result.size() > 0)) {
|
||||
WKBReader wkbReader = new WKBReader();
|
||||
cwaGeometry = wkbReader.read((byte[]) result.get(0)[0]);
|
||||
Geometry geometry = null;
|
||||
// Combine the geometries in the CWA into one geometry
|
||||
for (Object[] row : result) {
|
||||
|
@ -1325,7 +1325,11 @@ public class ZoneDbResource extends
|
|||
// areas w/o marine zones return a row containing null
|
||||
if (wkb != null) {
|
||||
geometry = wkbReader.read(wkb);
|
||||
cwaGeometry = cwaGeometry.union(geometry);
|
||||
if (cwaGeometry == null) {
|
||||
cwaGeometry = geometry;
|
||||
} else {
|
||||
cwaGeometry = cwaGeometry.union(geometry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
|
@ -43,7 +43,7 @@ import com.raytheon.viz.gfe.ui.runtimeui.SelectionDlg;
|
|||
|
||||
/**
|
||||
* Utilities for smart tools
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
|
@ -51,9 +51,10 @@ import com.raytheon.viz.gfe.ui.runtimeui.SelectionDlg;
|
|||
* Feb 21, 2008 njensen Initial creation
|
||||
* Dec 1, 2009 1426 ryu Add time range warning
|
||||
* Nov 15, 2012 1298 rferrel Changes for non-blocking prcedures.
|
||||
*
|
||||
* Jun 25, 2013 16065 ryu Passing outerLevel to smart tool job.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author njensen
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -66,7 +67,7 @@ public class SmartUtil {
|
|||
* Checks if LD_PRELOAD is set in the environment. If not, jep may have
|
||||
* issues importing modules. (Note that this presumes LD_PRELOAD was set
|
||||
* correctly to point at the python .so file).
|
||||
*
|
||||
*
|
||||
* @return if LD_PRELOAD is set
|
||||
*/
|
||||
public static boolean isLdPreloadSet() {
|
||||
|
@ -80,9 +81,10 @@ public class SmartUtil {
|
|||
}
|
||||
|
||||
public static SmartToolRequest buildSmartToolRequest(DataManager dm,
|
||||
PreviewInfo preview) {
|
||||
PreviewInfo preview, boolean outerLevel) {
|
||||
SmartToolRequest req = new SmartToolRequest();
|
||||
req.setPreview(preview);
|
||||
req.setOuterLevel(outerLevel);
|
||||
return req;
|
||||
}
|
||||
|
||||
|
@ -114,7 +116,7 @@ public class SmartUtil {
|
|||
private static void runToolNoVarDict(DataManager dm, String toolName) {
|
||||
PreviewInfo pi = checkAndBuildPreview(dm, toolName);
|
||||
if (pi != null) {
|
||||
SmartToolRequest req = buildSmartToolRequest(dm, pi);
|
||||
SmartToolRequest req = buildSmartToolRequest(dm, pi, true);
|
||||
if (req != null) {
|
||||
SmartToolJob.enqueue(dm, req);
|
||||
}
|
||||
|
@ -143,7 +145,8 @@ public class SmartUtil {
|
|||
timeRange, editArea, emptyEditAreaFlag,
|
||||
MissingDataMode.valueFrom(missingDataMode));
|
||||
PreviewInfo pi = new PreviewInfo(editAction, passErrors, parm);
|
||||
final SmartToolRequest req = SmartUtil.buildSmartToolRequest(dm, pi);
|
||||
final SmartToolRequest req = SmartUtil.
|
||||
buildSmartToolRequest(dm, pi, false);
|
||||
|
||||
if (varDict != null) {
|
||||
req.setVarDict(varDict);
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
|
@ -46,18 +46,19 @@ import com.raytheon.viz.gfe.smarttool.Tool;
|
|||
|
||||
/**
|
||||
* Job for running smart tools off the UI thread
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 19, 2010 njensen Initial creation
|
||||
* Jan 18, 2013 1509 njensen Garbage collect after running tool
|
||||
* Apr 03, 2013 1855 njensen Never dispose interpreters until shutdown
|
||||
*
|
||||
* Jun 25, 2013 16065 ryu Clear undo parms list before tool execution
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author njensen
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -141,6 +142,9 @@ public class SmartToolJob extends AbstractQueueJob<SmartToolRequest> {
|
|||
progressJob.schedule();
|
||||
IStatus pjResult = Status.CANCEL_STATUS;
|
||||
try {
|
||||
if (request.getOuterLevel()) {
|
||||
dataMgr.getParmOp().clearUndoParmList();
|
||||
}
|
||||
Tool tool = new Tool(dataMgr.getParmManager(),
|
||||
request.getPreview().getParm(),
|
||||
ea.getItemName(), python);
|
||||
|
@ -202,7 +206,7 @@ public class SmartToolJob extends AbstractQueueJob<SmartToolRequest> {
|
|||
|
||||
/**
|
||||
* Remove a job from the Data Manger's job list.
|
||||
*
|
||||
*
|
||||
* @param dataMgr
|
||||
* - The job's data manager
|
||||
* @param job
|
||||
|
@ -230,7 +234,7 @@ public class SmartToolJob extends AbstractQueueJob<SmartToolRequest> {
|
|||
|
||||
/**
|
||||
* This manages the scheduling of jobs to service a Data Manger's requests.
|
||||
*
|
||||
*
|
||||
* @param dataMgr
|
||||
* - Data Manger for the request
|
||||
* @param request
|
||||
|
@ -283,7 +287,7 @@ public class SmartToolJob extends AbstractQueueJob<SmartToolRequest> {
|
|||
* This returns an array of two integers the first is the number of Smart
|
||||
* Tool Jobs being processed and the second is the number in the queue
|
||||
* waiting to be processed.
|
||||
*
|
||||
*
|
||||
* @return cnts
|
||||
*/
|
||||
public static int[] getJobCount() {
|
||||
|
@ -303,7 +307,7 @@ public class SmartToolJob extends AbstractQueueJob<SmartToolRequest> {
|
|||
|
||||
/**
|
||||
* Determine if there are any Smart Tool Jobs queued and/or being processed.
|
||||
*
|
||||
*
|
||||
* @return true when there are job(s)s queued or being processed otherwise
|
||||
* false
|
||||
*/
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
|
@ -27,16 +27,17 @@ import com.raytheon.viz.gfe.smarttool.PreviewInfo;
|
|||
|
||||
/**
|
||||
* Request to run a smart tool off the UI thread
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 19, 2010 njensen Initial creation
|
||||
*
|
||||
* Jun 25, 2013 16065 ryu Adding outerLevel attribute
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author njensen
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -53,6 +54,8 @@ public class SmartToolRequest extends QueueJobRequest<Object> {
|
|||
|
||||
private Object result;
|
||||
|
||||
private boolean outerLevel;
|
||||
|
||||
public SmartToolRequest() {
|
||||
super();
|
||||
|
||||
|
@ -88,6 +91,14 @@ public class SmartToolRequest extends QueueJobRequest<Object> {
|
|||
this.preview = preview;
|
||||
}
|
||||
|
||||
public boolean getOuterLevel() {
|
||||
return outerLevel;
|
||||
}
|
||||
|
||||
public void setOuterLevel(boolean outerLevel) {
|
||||
this.outerLevel = outerLevel;
|
||||
}
|
||||
|
||||
public void requestComplete(Object result) {
|
||||
this.result = result;
|
||||
completedSemaphore.release();
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
|
@ -31,16 +31,17 @@ import com.raytheon.viz.gfe.ui.runtimeui.SelectionDlg;
|
|||
|
||||
/**
|
||||
* Dynamic GUI for showing smart tools' Variable Lists and running the tools
|
||||
*
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 9, 2010 njensen Initial creation
|
||||
*
|
||||
* Jun 25, 2013 16065 ryu Passing outerLevel to tool job
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author njensen
|
||||
* @version 1.0
|
||||
*/
|
||||
|
@ -54,14 +55,15 @@ public class SmartToolSelectionDlg extends SelectionDlg {
|
|||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
*
|
||||
* @see com.raytheon.viz.gfe.ui.runtimeui.SelectionDlg#run()
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
PreviewInfo pi = SmartUtil.checkAndBuildPreview(dataMgr, name);
|
||||
if (pi != null) {
|
||||
SmartToolRequest req = SmartUtil.buildSmartToolRequest(dataMgr, pi);
|
||||
SmartToolRequest req = SmartUtil.
|
||||
buildSmartToolRequest(dataMgr, pi, true);
|
||||
if (req != null) {
|
||||
String varDict = dataMgr.getSmartToolInterface()
|
||||
.transformVarDict(getValues());
|
||||
|
|
|
@ -4169,6 +4169,14 @@
|
|||
<styleRule>
|
||||
<paramLevelMatches>
|
||||
<parameter>TPCSG</parameter>
|
||||
<parameter>TPCSG-20</parameter>
|
||||
<parameter>TPCSG-30</parameter>
|
||||
<parameter>TPCSG-40</parameter>
|
||||
<parameter>TPCSG-50</parameter>
|
||||
<parameter>TPCSG-60</parameter>
|
||||
<parameter>TPCSG-70</parameter>
|
||||
<parameter>TPCSG-80</parameter>
|
||||
<parameter>TPCSG-90</parameter>
|
||||
</paramLevelMatches>
|
||||
<imageStyle>
|
||||
<displayUnits>ft</displayUnits>
|
||||
|
@ -4188,15 +4196,30 @@
|
|||
-->
|
||||
<styleRule>
|
||||
<paramLevelMatches>
|
||||
<parameter>TPCSG_61E2</parameter>
|
||||
<parameter>TPCSG_305E2</parameter>
|
||||
<parameter>TPCSG_274E2</parameter>
|
||||
<parameter>TPCSG_244E2</parameter>
|
||||
<parameter>TPCSG_213E2</parameter>
|
||||
<parameter>TPCSG_183E2</parameter>
|
||||
<parameter>TPCSG_152E2</parameter>
|
||||
<parameter>TPCSG_122E2</parameter>
|
||||
<parameter>TPCSG_91E2</parameter>
|
||||
<parameter>TPCSG-61E2</parameter>
|
||||
<parameter>TPCSG-91E2</parameter>
|
||||
<parameter>TPCSG-122E2</parameter>
|
||||
<parameter>TPCSG-152E2</parameter>
|
||||
<parameter>TPCSG-183E2</parameter>
|
||||
<parameter>TPCSG-213E2</parameter>
|
||||
<parameter>TPCSG-244E2</parameter>
|
||||
<parameter>TPCSG-274E2</parameter>
|
||||
<parameter>TPCSG-305E2</parameter>
|
||||
<parameter>TPCSG-335E2</parameter>
|
||||
<parameter>TPCSG-366E2</parameter>
|
||||
<parameter>TPCSG-396E2</parameter>
|
||||
<parameter>TPCSG-457E2</parameter>
|
||||
<parameter>TPCSG-427E2</parameter>
|
||||
<parameter>TPCSG-488E2</parameter>
|
||||
<parameter>TPCSG-518E2</parameter>
|
||||
<parameter>TPCSG-549E2</parameter>
|
||||
<parameter>TPCSG-579E2</parameter>
|
||||
<parameter>TPCSG-610E2</parameter>
|
||||
<parameter>TPCSG-640E2</parameter>
|
||||
<parameter>TPCSG-671E2</parameter>
|
||||
<parameter>TPCSG-701E2</parameter>
|
||||
<parameter>TPCSG-732E2</parameter>
|
||||
<parameter>TPCSG-762E2</parameter>
|
||||
</paramLevelMatches>
|
||||
<imageStyle>
|
||||
<displayUnits>%</displayUnits>
|
||||
|
@ -4842,4 +4865,4 @@
|
|||
</imageStyle>
|
||||
</styleRule>
|
||||
<!-- </sourceTag>ER-sportsst -->
|
||||
</styleRuleset>
|
||||
</styleRuleset>
|
||||
|
|
|
@ -47,15 +47,38 @@
|
|||
<field key="ThPcat" displayTypes="IMAGE"/>
|
||||
<field key="Cig" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG_305E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG_274E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG_244E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG_213E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG_183E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG_152E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG_122E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG_91E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG_61E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-20" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-30" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-40" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-50" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-60" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-70" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-80" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-90" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-61E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-91E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-122E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-152E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-183E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-213E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-244E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-274E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-305E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-335E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-366E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-396E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-457E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-427E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-488E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-518E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-549E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-579E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-610E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-640E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-671E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-701E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-732E2" displayTypes="IMAGE"/>
|
||||
<field key="TPCSG-762E2" displayTypes="IMAGE"/>
|
||||
<field key="SLDP" displayTypes="IMAGE"/>
|
||||
<field key="TPFI" displayTypes="IMAGE"/>
|
||||
<field key="TIPD" displayTypes="IMAGE"/>
|
||||
|
|
|
@ -35,7 +35,6 @@ import com.raytheon.uf.viz.core.rsc.IResourceDataChanged;
|
|||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
import com.raytheon.uf.viz.core.rsc.ResourceList;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.AbstractCapability;
|
||||
import com.raytheon.viz.core.rsc.VizGroupResourceData;
|
||||
|
||||
/**
|
||||
* FFG Group Resource class.
|
||||
|
@ -49,6 +48,8 @@ import com.raytheon.viz.core.rsc.VizGroupResourceData;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 19, 2012 1162 mpduff Initial creation.
|
||||
* Jun 21, 2013 DR15394 mgamazaychikov Implement IResourceDataChanged and
|
||||
* override resourceChanged method.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -57,8 +58,8 @@ import com.raytheon.viz.core.rsc.VizGroupResourceData;
|
|||
*/
|
||||
|
||||
public class FFGVizGroupResource extends
|
||||
AbstractVizResource<VizGroupResourceData, MapDescriptor> implements
|
||||
IResourceDataChanged, IRefreshListener {
|
||||
AbstractVizResource<FfgVizGroupResourceData, MapDescriptor> implements
|
||||
IResourceDataChanged, IRefreshListener {
|
||||
|
||||
private final String NO_DATA = "No Data";
|
||||
|
||||
|
@ -68,10 +69,11 @@ public class FFGVizGroupResource extends
|
|||
* @param resourceData
|
||||
* @param loadProperties
|
||||
*/
|
||||
protected FFGVizGroupResource(VizGroupResourceData resourceData,
|
||||
protected FFGVizGroupResource(FfgVizGroupResourceData resourceData,
|
||||
LoadProperties loadProperties) {
|
||||
super(resourceData, loadProperties);
|
||||
dataTimes = new ArrayList<DataTime>();
|
||||
this.resourceData.addChangeListener(this);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -189,7 +191,6 @@ public class FFGVizGroupResource extends
|
|||
@Override
|
||||
public void refresh() {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -200,8 +201,15 @@ public class FFGVizGroupResource extends
|
|||
* .raytheon.uf.viz.core.rsc.IResourceDataChanged.ChangeType,
|
||||
* java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public void resourceChanged(ChangeType type, Object object) {
|
||||
// TODO Auto-generated method stub
|
||||
@Override
|
||||
public void resourceChanged(ChangeType type, Object object) {
|
||||
if ( object instanceof Object[]){
|
||||
this.resourceData.getRscs().get(0).getResourceData().update(object);
|
||||
}
|
||||
else if (object instanceof Object){
|
||||
ArrayList<Object> theObjectList = new ArrayList<Object>();
|
||||
theObjectList.add(object);
|
||||
this.resourceData.getRscs().get(0).getResourceData().update(theObjectList.toArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,9 +107,10 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 9, 2011 bsteffen Initial creation
|
||||
* Mar 09, 2011 bsteffen Initial creation
|
||||
* May 08, 2013 1980 bsteffen Set paint status in GridResources for
|
||||
* KML.
|
||||
* Jul 15, 2013 2107 bsteffen Fix sampling of grid vector arrows.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -803,7 +804,7 @@ public abstract class AbstractGridResource<T extends AbstractResourceData>
|
|||
}
|
||||
if (map.containsKey(INTERROGATE_DIRECTION)) {
|
||||
double dir = (Double) map.get(INTERROGATE_DIRECTION);
|
||||
result += String.format("%.0f\u00B0 ", dir);
|
||||
result = String.format("%.0f\u00B0 ", dir) + result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -853,7 +854,7 @@ public abstract class AbstractGridResource<T extends AbstractResourceData>
|
|||
result.put(INTERROGATE_UNIT, "");
|
||||
}
|
||||
if (data.isVector()) {
|
||||
sampler.setSource(new FloatBufferWrapper(data.getScalarData(), data
|
||||
sampler.setSource(new FloatBufferWrapper(data.getDirection(), data
|
||||
.getGridGeometry()));
|
||||
Double dir = sampler.sample(pixel.x, pixel.y);
|
||||
result.put(INTERROGATE_DIRECTION, dir);
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
package com.raytheon.viz.grid.rsc.general;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
|
@ -73,10 +74,11 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 9, 2011 bsteffen Initial creation
|
||||
* Mar 09, 2011 bsteffen Initial creation
|
||||
* Feb 25, 2013 1659 bsteffen Add PDOs to D2DGridResource in
|
||||
* constructor to avoid duplicate data
|
||||
* requests.
|
||||
* Jul 15, 2013 2107 bsteffen Fix sampling of grid vector arrows.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -273,18 +275,25 @@ public class D2DGridResource extends GridResource<GridResourceData> implements
|
|||
|
||||
@Override
|
||||
public String inspect(ReferencedCoordinate coord) throws VizException {
|
||||
if (getDisplayType() == DisplayType.IMAGE) {
|
||||
return super.inspect(coord);
|
||||
} else if (resourceData.isSampling()) {
|
||||
GridRecord record = getCurrentGridRecord();
|
||||
if (record == null) {
|
||||
return super.inspect(coord);
|
||||
if (resourceData.isSampling()) {
|
||||
if (getDisplayType() == DisplayType.ARROW) {
|
||||
Map<String, Object> map = interrogate(coord);
|
||||
if (map == null) {
|
||||
return "NO DATA";
|
||||
}
|
||||
double value = (Double) map.get(INTERROGATE_VALUE);
|
||||
return sampleFormat.format(value) + map.get(INTERROGATE_UNIT);
|
||||
} else if (getDisplayType() == DisplayType.CONTOUR) {
|
||||
GridRecord record = getCurrentGridRecord();
|
||||
if (record != null) {
|
||||
return record.getParameter().getAbbreviation() + "="
|
||||
+ super.inspect(coord);
|
||||
}
|
||||
}
|
||||
return record.getParameter().getAbbreviation() + "="
|
||||
+ super.inspect(coord);
|
||||
} else {
|
||||
} else if (getDisplayType() != DisplayType.IMAGE) {
|
||||
return null;
|
||||
}
|
||||
return super.inspect(coord);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -40,6 +40,7 @@ import com.raytheon.viz.hydrocommon.HydroDisplayManager;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* 6/27/06 lvenable Initial Creation.
|
||||
* 02/05/2013 1578 rferrel Changes for non-blocking singleton TimeSeriesDlg.
|
||||
* 6/8/2013 15980 wkwock Fix selected station not update
|
||||
* 07/10/2013 2166 mpduff Select the site but don't display the graph.
|
||||
*
|
||||
* </pre>
|
||||
|
@ -55,6 +56,6 @@ public class TimeSeriesAction extends AbstractHandler {
|
|||
dlg.updateAndOpen(HydroDisplayManager.getInstance().getCurrentLid(),
|
||||
false);
|
||||
|
||||
return null;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -122,6 +122,7 @@ import com.raytheon.viz.hydrocommon.util.StnClassSyncUtil;
|
|||
* 05 Feb 2013 1578 rferrel Dialog made non-blocking and a singleton.
|
||||
* 06 May 2013 1976 mpduff Code cleanup.
|
||||
* 06 Jun 2013 2076 mpduff Fix station list selection and graph button enabling.
|
||||
* 0 Jun 2013 15980 wkwock Fix selected station not update
|
||||
* </pre>
|
||||
*
|
||||
* @author lvenable
|
||||
|
@ -2612,4 +2613,18 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog {
|
|||
protected void preOpened() {
|
||||
super.preOpened();
|
||||
}
|
||||
|
||||
/**
|
||||
* In case user selected a different station in the Hydro perspective,
|
||||
* update currentLid, etc
|
||||
*/
|
||||
public void updateFromDisplayManager() {
|
||||
HydroDisplayManager hdm = HydroDisplayManager.getInstance();
|
||||
String newLid=hdm.getCurrentLid();
|
||||
if (newLid!=null && !newLid.equalsIgnoreCase(currentLid)) {
|
||||
updateAndOpen(newLid, this.displayGraph);
|
||||
openGraph();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ import com.raytheon.viz.mpe.ui.radartable.ReadBiasTableParam;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 14, 2009 snaples Initial creation
|
||||
* Jun 18, 2013 16053 snaples Removed reference to setRadarEditFlag
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -501,7 +502,6 @@ public class RadarBiasTableDialog extends Dialog {
|
|||
rwrr.setMemSpanUsed((double) memspan);
|
||||
rwrr.setRwBiasValUsed((double) editbias[i]);
|
||||
IHFSDbGenerated.UpdateRWRadarResult(rwrr);
|
||||
MPEDataManager.getInstance().setRadarEditFlag(true);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 27, 2009 2675 mpduff Initial creation
|
||||
* Aug 13, 2009 2675 mpduff TIM changes added
|
||||
* Jun 18, 2013 16053 snaples Removed reference to setRadarEditFlag
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -250,8 +251,6 @@ public class EditBiasDlg extends CaveSWTDialog {
|
|||
+ (double) biasSlider.getSelection() / 100);
|
||||
rwrr.setRwBiasValUsed((double) biasSlider.getSelection() / 100);
|
||||
IHFSDbGenerated.UpdateRWRadarResult(rwrr);
|
||||
|
||||
MPEDataManager.getInstance().setRadarEditFlag(true);
|
||||
setReturnValue(new Double((double) biasSlider.getSelection() / 100));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,6 +95,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Jul 22, 2009 2675 mpduff Initial creation
|
||||
* Aug 13, 2009 2675 mpduff TIM changes added
|
||||
* Nov 08, 2009 3232 mpduff Implement the precip gage overlay
|
||||
* Jun 18, 2013 16053 snaples Removed reference to setRadarEditFlag
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -316,8 +317,6 @@ public class ReviewHourlyRadarDlg extends CaveSWTDialog implements
|
|||
.updateIgnoreRadar(radId, dpaDate, ignoreRadar);
|
||||
if (status == 0) {
|
||||
System.err.println("Update not successful");
|
||||
} else {
|
||||
MPEDataManager.getInstance().setRadarEditFlag(true);
|
||||
}
|
||||
} catch (VizException e) {
|
||||
System.err
|
||||
|
|
|
@ -55,7 +55,12 @@ import com.raytheon.viz.mpe.ui.dialogs.polygon.RubberPolyData.PolygonEditAction;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 3, 2012 mschenke Initial creation
|
||||
* Dec 3, 2012 mschenke Initial creation
|
||||
* July 9, 2013 #2172 bkowal Set a polygon edit flag whenever new polygon
|
||||
* files are written.
|
||||
* Jul 15, 2013 15963 snaples Removed polygon edit flag, and
|
||||
* removed unneeded Constant for Backward compatibility.
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -141,15 +146,6 @@ public class PolygonEditManager {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This value is used as a multiplier in the file since the values before
|
||||
* this class existed were multiplied by this value due to incorrect
|
||||
* descaling in the UI class. It is expected that values in the
|
||||
* {@link RubberPolyData} are now actually set to precip values and not
|
||||
* scaled by 100*precipValue like before
|
||||
*/
|
||||
private static final double BACKWARDS_COMPATIBILITY_VALUE = 100.0;
|
||||
|
||||
private final static Set<IPolygonEditsChangedListener> listeners = new LinkedHashSet<IPolygonEditsChangedListener>();
|
||||
|
||||
public static void registerListener(IPolygonEditsChangedListener listener) {
|
||||
|
@ -231,12 +227,11 @@ public class PolygonEditManager {
|
|||
|
||||
PolygonEditAction editAction = polyEdit.getEditAction();
|
||||
DisplayFieldData subDrawSource = polyEdit.getSubDrawSource();
|
||||
double precipValue = polyEdit.getPrecipValue()
|
||||
* BACKWARDS_COMPATIBILITY_VALUE;
|
||||
double precipValue = polyEdit.getPrecipValue();
|
||||
Point[] editPoints = polyEdit.getEditPoints();
|
||||
boolean visible = polyEdit.isVisible();
|
||||
|
||||
String polyEditStr = editAction
|
||||
String polyEditStr = editAction.toPrettyName()
|
||||
+ " "
|
||||
+ (subDrawSource != null ? subDrawSource.getCv_use()
|
||||
: String.format("%6.2f", precipValue)) + " "
|
||||
|
@ -360,8 +355,7 @@ public class PolygonEditManager {
|
|||
subData, -999.0, editPoints, visible,
|
||||
persistent));
|
||||
} else {
|
||||
double precipValue = Double.parseDouble(pieces[2])
|
||||
/ BACKWARDS_COMPATIBILITY_VALUE;
|
||||
double precipValue = Double.parseDouble(pieces[2]);
|
||||
polygonEdits.add(new RubberPolyData(editAction, null,
|
||||
precipValue, editPoints, visible, persistent));
|
||||
}
|
||||
|
|
|
@ -74,6 +74,9 @@ import com.raytheon.viz.mpe.ui.rsc.MPEFieldResourceData.MPEFieldFrame;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 29, 2012 mschenke Initial creation.
|
||||
* May 28, 2013 15971 lbousaidi change the reading hour for SATPRE
|
||||
* since the start time in the file is one
|
||||
* hour less than the file time stamp.
|
||||
* Jul 02, 2013 2160 mpduff Changed how edited data are called for return.
|
||||
* </pre>
|
||||
*
|
||||
|
@ -317,9 +320,15 @@ public class MPEFieldResource extends
|
|||
for (int i = 0; i < accumInterval; ++i) {
|
||||
timeToLoad.setTime(currTime.getRefTime());
|
||||
timeToLoad.add(Calendar.HOUR, -i);
|
||||
|
||||
|
||||
if (displayField==DisplayFieldData.satPre) {
|
||||
//SATPRE MPE file time stamp is the start time of the hour
|
||||
//i.e. a 12z -13z product has a time stamp of 12z.
|
||||
timeToLoad.add(Calendar.HOUR, -1);
|
||||
}
|
||||
|
||||
XmrgFile file = MPEDisplayManager.getXmrgFile(displayField,
|
||||
timeToLoad.getTime());
|
||||
timeToLoad.getTime());
|
||||
try {
|
||||
file.load();
|
||||
} catch (IOException e) {
|
||||
|
|
|
@ -77,6 +77,8 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Nov 6, 2008 1649 snaples Added new methods for getting and
|
||||
* updating RawPP records
|
||||
* Nov 24, 2008 1748 snaples Added getters to MPEGageData
|
||||
* Jun 18, 2013 16053 snaples Removed methods set and getRadarEditFlag
|
||||
* July 9, 2013 2172 bkowal Added a polygon edit flag
|
||||
* </pre>
|
||||
*
|
||||
* @author randerso
|
||||
|
@ -670,7 +672,7 @@ public class MPEDataManager {
|
|||
|
||||
private ArrayList<String> badGages = new ArrayList<String>();
|
||||
|
||||
private boolean radarEditFlag = false;
|
||||
private boolean polygonEditFlag = false;
|
||||
|
||||
private Map<Date, MPEDateInfo> dateMap;
|
||||
|
||||
|
@ -746,8 +748,8 @@ public class MPEDataManager {
|
|||
}
|
||||
|
||||
public Map<Date, MPEDateInfo> getDateMap(boolean update) {
|
||||
|
||||
getDates(update);
|
||||
|
||||
getDates(update);
|
||||
return dateMap;
|
||||
}
|
||||
|
||||
|
@ -1484,19 +1486,12 @@ public class MPEDataManager {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param radarEditFlag
|
||||
* the radarEditFlag to set
|
||||
*/
|
||||
public void setRadarEditFlag(boolean radarEditFlag) {
|
||||
this.radarEditFlag = radarEditFlag;
|
||||
public boolean isPolygonEditFlag() {
|
||||
return polygonEditFlag;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the radarEditFlag
|
||||
*/
|
||||
public boolean isRadarEditFlag() {
|
||||
return radarEditFlag;
|
||||
public void setPolygonEditFlag(boolean polygonEditFlag) {
|
||||
this.polygonEditFlag = polygonEditFlag;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -55,6 +55,9 @@ import com.raytheon.viz.mpe.core.MPEDataManager.MPEGageData;
|
|||
* Aug 8, 2012 15271 snaples Updated hourly slot
|
||||
* Jan 02, 2013 15565 snaples Fixed problem with wrong time being sent to mpe_fieldgen
|
||||
* Mar 14, 2013 1457 mpduff Fixed memory leak.
|
||||
* Jun 18, 2013 16053 snaples Removed check for Radar Edit flag
|
||||
* July 7, 2013 2172 bkowal Polygon Edits will now also trigger an hourly
|
||||
* mpe field regeneration.
|
||||
* </pre>
|
||||
*
|
||||
* @author snaples
|
||||
|
@ -85,8 +88,6 @@ public class RegenHrFlds {
|
|||
|
||||
double pp_value;
|
||||
|
||||
private static final int NUM_HOURLY_SLOTS = 24;
|
||||
|
||||
private static final int NUM_6HOURLY_SLOTS = 4;
|
||||
|
||||
GagePPOptions options = new GagePPOptions();
|
||||
|
@ -164,6 +165,10 @@ public class RegenHrFlds {
|
|||
int pCount = pseudoList.size();
|
||||
num_gage_edit += pCount;
|
||||
}
|
||||
|
||||
private boolean polygonsModified() {
|
||||
return MPEDataManager.getInstance().isPolygonEditFlag();
|
||||
}
|
||||
|
||||
public double round(final double x) {
|
||||
double tmp = x + 0.5;
|
||||
|
@ -181,10 +186,9 @@ public class RegenHrFlds {
|
|||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
this.checkGages();
|
||||
boolean ref = MPEDataManager.getInstance().isRadarEditFlag();
|
||||
/* Store any gage edits into the HourlyPP or PseudoGageVal table. */
|
||||
if (num_gage_edit > 0 || ref == true) {
|
||||
options.shef_duplicate = shef_dup.USE_REVCODE;
|
||||
|
||||
options.shef_duplicate = shef_dup.USE_REVCODE;
|
||||
|
||||
for (MPEGageData gData : gages.values()) {
|
||||
|
||||
|
@ -270,7 +274,7 @@ public class RegenHrFlds {
|
|||
}
|
||||
}
|
||||
|
||||
MPEDataManager.getInstance().setRadarEditFlag(false);
|
||||
MPEDataManager.getInstance().setPolygonEditFlag(false);
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/* Read Gage Data and store in structure */
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
@ -299,7 +303,7 @@ public class RegenHrFlds {
|
|||
|
||||
MPEDataManager.getInstance().clearEditGages();
|
||||
shell.setCursor(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -91,6 +91,8 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Apr 21, 2009 chammack Refactor to common pointData model
|
||||
* Feb 01, 2013 1567 njensen Refactor handling of updates
|
||||
* May 14, 2013 1869 bsteffen Get plots working without dataURI
|
||||
* May 23, 2013 14996 snaples Updated processUpdatedPlot to handle AWOS
|
||||
* stations updates properly
|
||||
* Jun 06, 2013 2072 bsteffen Fix concurrency problems when init is
|
||||
* called before time matching is done.
|
||||
* Jun 25, 2013 1869 bsteffen Fix plot sampling.
|
||||
|
@ -404,6 +406,17 @@ public class PlotResource2 extends
|
|||
if (existingStation.plotImage != null) {
|
||||
existingStation.plotImage.getImage().dispose();
|
||||
existingStation.plotImage = null;
|
||||
// DR14966
|
||||
existingStation.rawMessage = null;
|
||||
PlotInfo[] samplePlot = new PlotInfo[1];
|
||||
samplePlot[0] = new PlotInfo();
|
||||
samplePlot[0] = plot;
|
||||
List<PlotInfo[]> list = new ArrayList<PlotInfo[]>();
|
||||
list.add(samplePlot);
|
||||
Params params = Params.SAMPLE_ONLY;
|
||||
GetDataTask task = new GetDataTask(list, params);
|
||||
generator.queueStation(task);
|
||||
// End DR14996
|
||||
}
|
||||
boolean dup = false;
|
||||
for (PlotInfo element : existingStation.info) {
|
||||
|
@ -415,9 +428,9 @@ public class PlotResource2 extends
|
|||
}
|
||||
}
|
||||
if (!dup) {
|
||||
existingStation.info = Arrays.copyOf(existingStation.info,
|
||||
existingStation.info.length + 1);
|
||||
existingStation.info[existingStation.info.length - 1] = plot;
|
||||
// Added for DR14996
|
||||
existingStation.info = Arrays.copyOf(existingStation.info, 1);
|
||||
existingStation.info[0] = plot;
|
||||
Arrays.sort(existingStation.info, new Comparator<PlotInfo>() {
|
||||
@Override
|
||||
public int compare(PlotInfo o1, PlotInfo o2) {
|
||||
|
|
|
@ -51,6 +51,7 @@ import com.vividsolutions.jts.geom.Envelope;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 03/04/2013 DCS51 zwang Initial creation
|
||||
* 06/18/2013 DR16162 zwang Remove "wind behind"
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -185,24 +186,6 @@ public class RadarGFMInterrogator extends RadarGraphicInterrogator implements
|
|||
pSpd = getSpeed(pU, pV);
|
||||
pDir = getDir(pU, pV);
|
||||
|
||||
// avg_speed
|
||||
String spdStr = currFeature
|
||||
.getValue(GFMAttributeIDs.AVG_SPEED.toString());
|
||||
if ((spdStr != null) && (spdStr.length() > 0)) {
|
||||
double spd = metersPerSecondToKnots
|
||||
.convert(new Double(spdStr));
|
||||
spdStr = formatter.format(spd);
|
||||
}
|
||||
|
||||
// avg_direction
|
||||
String dirStr = currFeature
|
||||
.getValue(GFMAttributeIDs.AVG_DIRECTION.toString());
|
||||
|
||||
if ((dirStr != null) && (dirStr.length() > 0)) {
|
||||
double dir = new Double(dirStr);
|
||||
dirStr = formatter.format(dir);
|
||||
}
|
||||
|
||||
// wsHarzard
|
||||
String wsStr = currFeature
|
||||
.getValue(GFMAttributeIDs.WSHAZARD.toString());
|
||||
|
@ -214,7 +197,6 @@ public class RadarGFMInterrogator extends RadarGraphicInterrogator implements
|
|||
|
||||
rval.append("Movement " + formatter.format(pSpd) + "kts@"
|
||||
+ formatter.format(pDir) + "\n");
|
||||
rval.append("Wind Behind " + spdStr + "kts@" + dirStr + "\n");
|
||||
rval.append("Wind Shear Hazard " + wsStr + "kts ");
|
||||
|
||||
}
|
||||
|
|
|
@ -120,6 +120,7 @@ import com.vividsolutions.jts.geom.LineString;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 8, 2009 chammack Initial creation
|
||||
* 03/05/2013 DCS51 zwang Handle GFM product
|
||||
* 06/24/2013 DR16162 zwang Remove "wind behind"
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -907,11 +908,9 @@ public class RadarGraphicsPage implements IRenderable {
|
|||
int numPoints = currFeature.getPoints().size();
|
||||
int numParam = currFeature.getParameters().size();
|
||||
|
||||
String propU, propV, windU, windV, windX, windY;
|
||||
String propU, propV, windX, windY;
|
||||
double pU = 0.0;
|
||||
double pV = 0.0;
|
||||
double wU = 0.0;
|
||||
double wV = 0.0;
|
||||
double wX = 0.0;
|
||||
double wY = 0.0;
|
||||
|
||||
|
@ -929,14 +928,6 @@ public class RadarGraphicsPage implements IRenderable {
|
|||
if ((propV != null) && (propV.length() > 0)) {
|
||||
pV = metersPerSecondToKnots.convert(new Double(propV));
|
||||
}
|
||||
windU = currFeature.getValue(GFMPacket.GFMAttributeIDs.WINDBEHINDU.getName());
|
||||
if ((windU != null) && (windU.length() > 0)) {
|
||||
wU = metersPerSecondToKnots.convert(new Double(windU));
|
||||
}
|
||||
windV = currFeature.getValue(GFMPacket.GFMAttributeIDs.WINDBEHINDV.getName());
|
||||
if ((windV != null) && (windV.length() > 0)) {
|
||||
wV = metersPerSecondToKnots.convert(new Double(windV));
|
||||
}
|
||||
windX = currFeature.getValue(GFMPacket.GFMAttributeIDs.WINDBEHINDX.getName());
|
||||
if ((windX != null) && (windX.length() > 0)) {
|
||||
wX = Float.parseFloat(windX);
|
||||
|
@ -946,6 +937,13 @@ public class RadarGraphicsPage implements IRenderable {
|
|||
wY = Float.parseFloat(windY);
|
||||
}
|
||||
|
||||
// Get the nearest point on the MIGFA front to the wind behind point
|
||||
// Plot front movement arrow at this point
|
||||
Coordinate windBehind = new Coordinate(wX, wY);
|
||||
Coordinate plotPoint = getPlotPoint(currFeature, windBehind);
|
||||
wX = plotPoint.x;
|
||||
wY = plotPoint.y;
|
||||
|
||||
// Prop wind arrow
|
||||
PlotObject poWind = new PlotObject();
|
||||
PointWindDisplay barb = new PointWindDisplay(imgSize * 0.4, 0.5, 2, 0);
|
||||
|
@ -964,26 +962,11 @@ public class RadarGraphicsPage implements IRenderable {
|
|||
IImage img = this.target.initializeRaster(new IODataPreparer(imgBuf, UUID.randomUUID().toString(), 0), null);
|
||||
poWind.image = img;
|
||||
|
||||
// Wind barb behind front
|
||||
PlotObject wWind = new PlotObject();
|
||||
PointWindDisplay barb1 = new PointWindDisplay(imgSize * 0.4, 0.5, 2, 0);
|
||||
barb1.setImageParameters(imgSize, imgSize, 255, 255, 255, 1);
|
||||
barb1.setColor(this.color);
|
||||
barb1.setWind(wU, wV, false);
|
||||
BufferedImage imgBuf1 = barb1.getWindImage(false, DisplayType.BARB, 1);
|
||||
IImage img1 = this.target.initializeRaster(new IODataPreparer(imgBuf1, UUID.randomUUID().toString(), 0), null);
|
||||
wWind.image = img1;
|
||||
|
||||
ReferencedCoordinate rc = referencedGfmCoord(wX, wY);
|
||||
try {
|
||||
poWind.coord = rc.asPixel(this.descriptor.getGridGeometry());
|
||||
poWind.pixelOffset = new int[] { 0, 0 };
|
||||
images.add(poWind);
|
||||
|
||||
wWind.coord = rc.asPixel(this.descriptor.getGridGeometry());
|
||||
wWind.pixelOffset = new int[] { 0, 0 };
|
||||
images.add(wWind);
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new VizException("Unable to transform coordinates", e);
|
||||
}
|
||||
|
@ -1504,4 +1487,38 @@ public class RadarGraphicsPage implements IRenderable {
|
|||
this.gridGeometry, Type.GRID_CENTER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the nearest point from GFM front to wind behind point to plot
|
||||
* front movement arrow
|
||||
*
|
||||
* @param AreaComponent
|
||||
* @param Coordinate
|
||||
* @return Coordinate
|
||||
*
|
||||
*/
|
||||
private Coordinate getPlotPoint(AreaComponent currFeature, Coordinate windBehind) {
|
||||
Coordinate point = new Coordinate();
|
||||
double minDist = Double.MAX_VALUE;
|
||||
|
||||
int numPoints = currFeature.getPoints().size();
|
||||
double x1 = windBehind.x;
|
||||
double y1 = windBehind.y;
|
||||
double x2 = 0.0;
|
||||
double y2 = 0.0;
|
||||
double dist = 0.0;
|
||||
|
||||
for (int k = 0; k < numPoints; k++) {
|
||||
x2 = currFeature.getPoints().get(k).getCoordinate1();
|
||||
y2 = currFeature.getPoints().get(k).getCoordinate2();
|
||||
dist = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);
|
||||
if (dist < minDist) {
|
||||
point.x = x2;
|
||||
point.y = y2;
|
||||
minDist = dist;
|
||||
}
|
||||
}
|
||||
|
||||
return point;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -37,33 +37,34 @@ import org.eclipse.core.runtime.ListenerList;
|
|||
import org.eclipse.swt.graphics.RGB;
|
||||
|
||||
import com.raytheon.edex.meteoLib.WindComp;
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.geospatial.ReferencedCoordinate;
|
||||
import com.raytheon.uf.common.sounding.SoundingLayer;
|
||||
import com.raytheon.uf.common.sounding.SoundingLayer.DATA_TYPE;
|
||||
import com.raytheon.uf.common.sounding.VerticalSounding;
|
||||
import com.raytheon.uf.common.sounding.WxMath;
|
||||
import com.raytheon.uf.common.sounding.SoundingLayer.DATA_TYPE;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
import com.raytheon.uf.viz.core.PixelExtent;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget.HorizontalAlignment;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget.LineStyle;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget.TextStyle;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget.VerticalAlignment;
|
||||
import com.raytheon.uf.viz.core.PixelExtent;
|
||||
import com.raytheon.uf.viz.core.drawables.IFont;
|
||||
import com.raytheon.uf.viz.core.drawables.PaintProperties;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.map.MapDescriptor;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
|
||||
import com.raytheon.uf.viz.core.rsc.IResourceDataChanged;
|
||||
import com.raytheon.uf.viz.core.rsc.IResourceDataChanged.ChangeType;
|
||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.ColorableCapability;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.DensityCapability;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.MagnificationCapability;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.OutlineCapability;
|
||||
import com.raytheon.uf.viz.core.status.StatusConstants;
|
||||
import com.raytheon.uf.viz.sounding.SoundingParams;
|
||||
import com.raytheon.uf.viz.xy.map.rsc.IInsetMapResource;
|
||||
import com.raytheon.uf.viz.xy.map.rsc.PointRenderable;
|
||||
|
@ -71,7 +72,6 @@ import com.raytheon.viz.core.ColorUtil;
|
|||
import com.raytheon.viz.core.graphing.LineStroke;
|
||||
import com.raytheon.viz.core.graphing.WGraphics;
|
||||
import com.raytheon.viz.core.graphing.WindBarbFactory;
|
||||
import com.raytheon.viz.skewt.Activator;
|
||||
import com.raytheon.viz.skewt.SkewTDescriptor;
|
||||
import com.raytheon.viz.skewt.SkewtDisplay;
|
||||
import com.raytheon.viz.skewt.rscdata.SkewTResourceData;
|
||||
|
@ -87,7 +87,8 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 10, 2009 randerso Initial creation
|
||||
* Sep 10, 2009 randerso Initial creation
|
||||
* Jul 05, 2013 1869 bsteffen Fix goes sounding updates.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -1538,4 +1539,24 @@ public class SkewTResource extends
|
|||
}
|
||||
point.paint(target, paintProps);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void resourceDataChanged(ChangeType type, Object updateObject) {
|
||||
super.resourceDataChanged(type, updateObject);
|
||||
if (type == ChangeType.DATA_UPDATE
|
||||
&& updateObject instanceof PluginDataObject[]) {
|
||||
PluginDataObject[] objects = (PluginDataObject[]) updateObject;
|
||||
try {
|
||||
VerticalSounding[] soundings = resourceData
|
||||
.convertToSounding(objects);
|
||||
for (VerticalSounding vs : soundings) {
|
||||
addSounding(vs.getDataTime(), vs);
|
||||
}
|
||||
} catch (VizException e) {
|
||||
statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(),
|
||||
e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -50,7 +50,8 @@ import com.raytheon.viz.skewt.rsc.SkewTResource;
|
|||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 23, 2009 randerso Initial creation
|
||||
* Sep 23, 2009 randerso Initial creation
|
||||
* Jul 05, 2013 1869 bsteffen Fix goes sounding updates.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -92,16 +93,20 @@ public class SkewTResourceData extends AbstractRequestableResourceData {
|
|||
protected SkewTResource constructResource(LoadProperties loadProperties,
|
||||
PluginDataObject[] objects) throws VizException {
|
||||
|
||||
soundings = convertToSounding(objects);
|
||||
|
||||
return new SkewTResource(this, loadProperties);
|
||||
}
|
||||
|
||||
public VerticalSounding[] convertToSounding(PluginDataObject[] objects)
|
||||
throws VizException {
|
||||
if (objects != null && objects.length > 0) {
|
||||
AbstractVerticalSoundingAdapter adapter = getAdapter(objects[0]);
|
||||
adapter.setObjects(objects);
|
||||
soundings = adapter.createSoundings();
|
||||
return adapter.createSoundings();
|
||||
} else {
|
||||
soundings = new VerticalSounding[0];
|
||||
return new VerticalSounding[0];
|
||||
}
|
||||
|
||||
SkewTResource rsc = new SkewTResource(this, loadProperties);
|
||||
return rsc;
|
||||
}
|
||||
|
||||
protected AbstractVerticalSoundingAdapter getAdapter(PluginDataObject object)
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.viz.texteditor.dialogs;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElements;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 07, 2013 DR 15733 Xiaochuan Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author XHuang
|
||||
* @version 1.0
|
||||
*/
|
||||
@XmlRootElement
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class FontSizeCfg implements ISerializableObject {
|
||||
@XmlElements({ @XmlElement(name = "SizeButtonCfg", type = SizeButtonCfg.class) })
|
||||
private List<SizeButtonCfg> buttons;
|
||||
|
||||
public List<SizeButtonCfg> getButtons() {
|
||||
return buttons;
|
||||
}
|
||||
|
||||
public void setButtons(List<SizeButtonCfg> buttons) {
|
||||
this.buttons = buttons;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,137 @@
|
|||
package com.raytheon.viz.texteditor.dialogs;
|
||||
|
||||
import javax.xml.bind.annotation.adapters.XmlAdapter;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 24, 2013 DR 15733 Xiaochuan Modified to have the functionality that can
|
||||
* handle color of strings like "red", "green",...
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author XHuang
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import com.raytheon.uf.viz.core.RGBColors;
|
||||
|
||||
public class RGBColorAdapter extends XmlAdapter<String, RGB> {
|
||||
|
||||
private final RGB DEFAULT_COLOR = new RGB(255, 0, 0);
|
||||
|
||||
@Override
|
||||
public String marshal(RGB rgbColor) throws Exception {
|
||||
// Set rgb to color string go here if save to file
|
||||
|
||||
int red = DEFAULT_COLOR.red;
|
||||
int green = DEFAULT_COLOR.green;
|
||||
int blue = DEFAULT_COLOR.blue;
|
||||
|
||||
if(rgbColor != null) {
|
||||
red = rgbColor.red;
|
||||
green = rgbColor.green;
|
||||
blue = rgbColor.blue;
|
||||
}
|
||||
|
||||
String rgbStringValue = buildRGBStringValue(red, green, blue);
|
||||
|
||||
return rgbStringValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RGB unmarshal(String colorStringValue) throws Exception {
|
||||
int red = 255, green = 0, blue = 0;
|
||||
RGB rgb = null;
|
||||
String colorString = colorStringValue.trim();
|
||||
|
||||
if(colorStringValue == null || colorString.trim().length() == 0)
|
||||
return DEFAULT_COLOR;
|
||||
|
||||
int sz = colorString.split(",").length;
|
||||
if( colorString.split(",").length == 1) {
|
||||
System.out.println(" Convert string color "
|
||||
+ colorString + ",,,");
|
||||
rgb = RGBColors.getRGBColor(colorString);
|
||||
|
||||
}
|
||||
else {
|
||||
int[] colorArray = parseStringToIntArray(colorString);
|
||||
if(colorArray != null) {
|
||||
red = colorArray[0];
|
||||
green = colorArray[1];
|
||||
blue = colorArray[2];
|
||||
rgb = new RGB(red, green, blue);
|
||||
}
|
||||
}
|
||||
|
||||
return rgb;
|
||||
}
|
||||
|
||||
private int[] parseStringToIntArray(String colorStringValue) {
|
||||
boolean isStringValid = false;
|
||||
int beginIndex = colorStringValue.indexOf('{');
|
||||
int endIndex = colorStringValue.indexOf('}');
|
||||
String rgbstring = null;
|
||||
try {
|
||||
if( beginIndex > -1 && endIndex > -1)
|
||||
rgbstring = colorStringValue.substring(beginIndex+1, endIndex);
|
||||
else
|
||||
rgbstring = colorStringValue;
|
||||
|
||||
} catch(IndexOutOfBoundsException iobe) {
|
||||
//do nothing
|
||||
}
|
||||
|
||||
if(rgbstring == null)
|
||||
return null;
|
||||
String[] rgbStringArray = rgbstring.split(",");
|
||||
if(rgbStringArray.length != 3)
|
||||
return null;
|
||||
|
||||
int[] rgbIntArray = new int[3];
|
||||
try {
|
||||
for(int i=0; i<3; i++) {
|
||||
int rgbIntValue = Integer.parseInt(rgbStringArray[i].trim());
|
||||
if(!isRGBValid(rgbIntValue)) {
|
||||
return null;
|
||||
}
|
||||
rgbIntArray[i] = rgbIntValue;
|
||||
}
|
||||
isStringValid = true;
|
||||
} catch(NumberFormatException nfe) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
if(!isStringValid)
|
||||
return null;
|
||||
return rgbIntArray;
|
||||
}
|
||||
|
||||
/*
|
||||
* This helper method is for future checking implementation
|
||||
*/
|
||||
private boolean isRGBValid(int rgbIntValue) {
|
||||
return true;
|
||||
}
|
||||
|
||||
private String buildRGBStringValue(int red, int green, int blue) {
|
||||
StringBuilder strBuilder = new StringBuilder(20);
|
||||
// strBuilder.append("RGB {")
|
||||
|
||||
strBuilder.append(red)
|
||||
.append(", ")
|
||||
.append(green)
|
||||
.append(", ")
|
||||
.append(blue)
|
||||
.append("}");
|
||||
return strBuilder.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
package com.raytheon.viz.texteditor.dialogs;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 07, 2013 DR 15733 Xiaochuan Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author XHuang
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class SizeButtonCfg implements ISerializableObject {
|
||||
@XmlElement(name = "LabelName")
|
||||
private String labelName;
|
||||
|
||||
@XmlElement(name = "SizeEnabled")
|
||||
private boolean sizeEnabled;
|
||||
|
||||
@XmlElement(name = "FontSize")
|
||||
private int fontSize;
|
||||
|
||||
@XmlElement(name = "Selected")
|
||||
private boolean selected;
|
||||
|
||||
public String getLabelName() {
|
||||
return labelName;
|
||||
}
|
||||
|
||||
public void setLabelName(String labelName) {
|
||||
this.labelName = labelName;
|
||||
}
|
||||
|
||||
public boolean isSizeEnabled() {
|
||||
return sizeEnabled;
|
||||
}
|
||||
|
||||
public void setSizeEnabled(boolean sizeEnabled) {
|
||||
this.sizeEnabled = sizeEnabled;
|
||||
}
|
||||
|
||||
public int getFontSize() {
|
||||
return fontSize;
|
||||
}
|
||||
|
||||
public void setFontSize(int fontSize) {
|
||||
this.fontSize = fontSize;
|
||||
}
|
||||
|
||||
public boolean isSelected() {
|
||||
return selected;
|
||||
}
|
||||
|
||||
public void setSelected(boolean selected) {
|
||||
this.selected = selected;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
package com.raytheon.viz.texteditor.dialogs;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 24, 2013 DR 15733 Xiaochuan Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author XHuang
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlRootElement(name = "TextColorElement")
|
||||
public class TextColorElement implements ISerializableObject {
|
||||
|
||||
@XmlAttribute
|
||||
@XmlJavaTypeAdapter(RGBColorAdapter.class)
|
||||
private RGB color;
|
||||
|
||||
@XmlAttribute
|
||||
private String paramName;
|
||||
|
||||
public RGB getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(RGB color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public String getParamName() {
|
||||
return paramName;
|
||||
}
|
||||
|
||||
public void setParamName(String paramName) {
|
||||
this.paramName = paramName;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.viz.texteditor.dialogs;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElements;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import com.raytheon.uf.common.serialization.ISerializableObject;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jun 15, 2013 DR 15733 Xiaochuan Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author XHuang
|
||||
* @version 1.0
|
||||
*/
|
||||
@XmlRootElement(name = "textColorsCfg")
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class TextColorsCfg implements ISerializableObject {
|
||||
@XmlElements({ @XmlElement(name = "TextColorElement", type = TextColorElement.class) })
|
||||
private List<TextColorElement> colorElements;
|
||||
|
||||
public List<TextColorElement> getTextColorElements() {
|
||||
return colorElements;
|
||||
}
|
||||
|
||||
public void setTextColorElements(List<TextColorElement> colorElements) {
|
||||
this.colorElements = colorElements;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -86,6 +86,7 @@ import org.eclipse.swt.events.ShellEvent;
|
|||
import org.eclipse.swt.events.VerifyEvent;
|
||||
import org.eclipse.swt.events.VerifyListener;
|
||||
import org.eclipse.swt.graphics.Cursor;
|
||||
import org.eclipse.swt.graphics.Color;
|
||||
import org.eclipse.swt.graphics.Font;
|
||||
import org.eclipse.swt.graphics.FontData;
|
||||
import org.eclipse.swt.graphics.FontMetrics;
|
||||
|
@ -141,6 +142,7 @@ import com.raytheon.uf.common.time.SimulatedTime;
|
|||
import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
||||
import com.raytheon.uf.edex.services.textdbsrv.IQueryTransport;
|
||||
import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
||||
// import com.raytheon.uf.viz.core.RGBColors;
|
||||
import com.raytheon.uf.viz.core.VizApp;
|
||||
import com.raytheon.uf.viz.core.auth.UserController;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
|
@ -322,6 +324,11 @@ import com.raytheon.viz.ui.dialogs.SWTMessageBox;
|
|||
* 31JAN2013 1568 rferrel Spell checker now tied to this dialog instead of parent.
|
||||
* 26Apr2013 16123 snaples Removed setFocus to TextEditor in postExecute method.
|
||||
* 07Jun2013 1981 mpduff Add user id to OUPRequest as it is now protected.
|
||||
* 20Jun2013 15733 XHuang Add functionalities that get Font size, Text colors from
|
||||
* *.xml files in localization;
|
||||
* add selection listener to catch the highlight words and
|
||||
* set the highlight colors.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author lvenable
|
||||
|
@ -368,6 +375,11 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
* System colro to use for foreground color when an obs is updated.
|
||||
*/
|
||||
private static final int UPDATE_FG = SWT.COLOR_WHITE;
|
||||
|
||||
private final int HIGHLIGHT_BG = SWT.COLOR_RED;
|
||||
|
||||
// Color red = shell.getDisplay().getSystemColor(SWT.COLOR_RED);
|
||||
// Color black = shell.getDisplay().getSystemColor(SWT.COLOR_BLACK);
|
||||
|
||||
/**
|
||||
* The length of BEGIN_ELEMENT_TAG.
|
||||
|
@ -779,19 +791,19 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
/**
|
||||
* Small font menu item.
|
||||
*/
|
||||
private MenuItem smallFontItem;
|
||||
// private MenuItem smallFontItem;
|
||||
|
||||
/**
|
||||
* Medium font menu item.
|
||||
*/
|
||||
private MenuItem mediumFontItem;
|
||||
// private MenuItem mediumFontItem;
|
||||
|
||||
/**
|
||||
* Large font menu item.
|
||||
*/
|
||||
private MenuItem largeFontItem;
|
||||
// private MenuItem largeFontItem;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Overstrike (overwrite) menu item.
|
||||
*/
|
||||
private MenuItem overStrikeItem;
|
||||
|
@ -1005,21 +1017,16 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
* Styled text editor.
|
||||
*/
|
||||
private StyledText textEditor;
|
||||
|
||||
|
||||
/**
|
||||
* Small font.
|
||||
* default font
|
||||
*/
|
||||
private Font smlFont;
|
||||
|
||||
private Font dftFont;
|
||||
|
||||
/**
|
||||
* Medium font.
|
||||
* default funt size.
|
||||
*/
|
||||
private Font medFont;
|
||||
|
||||
/**
|
||||
* Large font.
|
||||
*/
|
||||
private Font lrgFont;
|
||||
private final int DEFAULT_FUNT_SIZE = 11;
|
||||
|
||||
/**
|
||||
* Composite containing the editor buttons.
|
||||
|
@ -1292,12 +1299,12 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
*/
|
||||
private static final String[] popupItems = { "Select All", "Cut", "Copy",
|
||||
"Paste" };
|
||||
|
||||
|
||||
/**
|
||||
* Currently active popupItems.
|
||||
*/
|
||||
private static final boolean[] isPopItemDefault = { true, false, true,
|
||||
false };
|
||||
false };
|
||||
|
||||
/**
|
||||
* Indictes this instance of dialog if for a warnGen.
|
||||
|
@ -1375,6 +1382,14 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
* needs to be done.
|
||||
*/
|
||||
private boolean isPreviousLineWrapped;
|
||||
|
||||
private Color textForeground;
|
||||
private Color textBackground;
|
||||
private Color highlightForeground;
|
||||
private Color highlightBackground;
|
||||
|
||||
// protected Color color;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor with additional cave style rules
|
||||
|
@ -1470,14 +1485,8 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
*/
|
||||
@Override
|
||||
protected void initializeComponents(final Shell shell) {
|
||||
Display display = getDisplay();
|
||||
clipboard = new Clipboard(getDisplay());
|
||||
|
||||
// Set the fonts.
|
||||
smlFont = new Font(display, "Courier", 9, SWT.NORMAL);
|
||||
medFont = new Font(display, "Courier", 11, SWT.NORMAL);
|
||||
lrgFont = new Font(display, "Courier", 13, SWT.NORMAL);
|
||||
|
||||
if (textWorkstationFlag || isWarnGenDlg) {
|
||||
shell.addShellListener(new ShellAdapter() {
|
||||
@Override
|
||||
|
@ -2041,9 +2050,8 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
|
||||
Menu fontSizeSubMenu = new Menu(shell, SWT.DROP_DOWN);
|
||||
fontSizeMenuItem.setMenu(fontSizeSubMenu);
|
||||
|
||||
createFontSizeSubMenu(fontSizeSubMenu);
|
||||
|
||||
|
||||
// ------------------------------
|
||||
// Create overstrike menu item
|
||||
// ------------------------------
|
||||
|
@ -2864,7 +2872,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
private void createAutoWrapSubMenu(Menu autoWrapSubMenu) {
|
||||
AutoWrapCfg autoWrapcfg = getAutoWrapCfg();
|
||||
for (WrapButtonCfg buttonCfg : autoWrapcfg.getButtons()) {
|
||||
MenuItem item = new MenuItem(autoWrapSubMenu, SWT.RADIO);
|
||||
MenuItem item = new MenuItem(autoWrapSubMenu, SWT.RADIO);
|
||||
item.setText(buttonCfg.getLabelName());
|
||||
item.setSelection(buttonCfg.isSelected());
|
||||
item.setData(buttonCfg);
|
||||
|
@ -2952,44 +2960,113 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
* The font size sub menu.
|
||||
*/
|
||||
private void createFontSizeSubMenu(Menu fontSizeSubMenu) {
|
||||
smallFontItem = new MenuItem(fontSizeSubMenu, SWT.RADIO);
|
||||
smallFontItem.setText("Small");
|
||||
smallFontItem.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
if (smallFontItem.getSelection()) {
|
||||
textEditor.setFont(smlFont);
|
||||
headerTF.setFont(smlFont);
|
||||
}
|
||||
int selectFontSize = DEFAULT_FUNT_SIZE;
|
||||
|
||||
FontSizeCfg fontSizeCfg = getFontSizeCfg();
|
||||
for (SizeButtonCfg buttonCfg : fontSizeCfg.getButtons()) {
|
||||
MenuItem item = new MenuItem(fontSizeSubMenu, SWT.RADIO);
|
||||
item.setText(buttonCfg.getLabelName());
|
||||
item.setSelection(buttonCfg.isSelected());
|
||||
item.setData(buttonCfg);
|
||||
if (buttonCfg.isSizeEnabled() && buttonCfg.isSelected()) {
|
||||
selectFontSize = buttonCfg.getFontSize();
|
||||
item.setSelection(true);
|
||||
setDefaultFont(selectFontSize);
|
||||
}
|
||||
});
|
||||
|
||||
mediumFontItem = new MenuItem(fontSizeSubMenu, SWT.RADIO);
|
||||
mediumFontItem.setText("Medium");
|
||||
mediumFontItem.setSelection(true);
|
||||
mediumFontItem.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
if (mediumFontItem.getSelection()) {
|
||||
textEditor.setFont(medFont);
|
||||
headerTF.setFont(medFont);
|
||||
|
||||
item.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
MenuItem item = (MenuItem) event.getSource();
|
||||
if (item.getSelection()) {
|
||||
int selectFontSize = ( (SizeButtonCfg) item.getData()).getFontSize();
|
||||
setDefaultFont(selectFontSize);
|
||||
|
||||
textEditor.setFont(dftFont);
|
||||
headerTF.setFont(dftFont);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
largeFontItem = new MenuItem(fontSizeSubMenu, SWT.RADIO);
|
||||
largeFontItem.setText("Large");
|
||||
largeFontItem.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
if (largeFontItem.getSelection()) {
|
||||
textEditor.setFont(lrgFont);
|
||||
headerTF.setFont(lrgFont);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private FontSizeCfg getFontSizeCfg() {
|
||||
FontSizeCfg fontSizeCfg = null;
|
||||
|
||||
try {
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
File path = pm.getStaticFile("textws/gui/FontSizeCfg.xml");
|
||||
fontSizeCfg = JAXB.unmarshal(path, FontSizeCfg.class);
|
||||
|
||||
} catch (Exception e) {
|
||||
IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(TextEditorDialog.class);
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"Unable to parse Autowrap menu configuration.", e);
|
||||
fontSizeCfg = new FontSizeCfg();
|
||||
|
||||
}
|
||||
|
||||
// Perform Sanity Checks on configuration.
|
||||
StringBuilder message = new StringBuilder();
|
||||
|
||||
// Check buttonCfg values.
|
||||
int selectionCnt = 0;
|
||||
String selectionLabel = null;
|
||||
if (fontSizeCfg.getButtons() != null) {
|
||||
for (SizeButtonCfg buttonCfg : fontSizeCfg.getButtons()) {
|
||||
if (buttonCfg.isSelected()) {
|
||||
++selectionCnt;
|
||||
if (selectionCnt == 1) {
|
||||
selectionLabel = buttonCfg.getLabelName();
|
||||
} else {
|
||||
buttonCfg.setSelected(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (buttonCfg.isSizeEnabled()) {
|
||||
int fntSize = buttonCfg.getFontSize();
|
||||
if (fntSize <= 0) {
|
||||
message.append("Item \"")
|
||||
.append(buttonCfg.getLabelName())
|
||||
.append("\" bad fntSize value (")
|
||||
.append(buttonCfg.getFontSize())
|
||||
.append(") changing to ")
|
||||
.append(DEFAULT_FUNT_SIZE).append("\n");
|
||||
buttonCfg.setFontSize(DEFAULT_FUNT_SIZE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (selectionCnt == 0 && fontSizeCfg.getButtons().size() > 0) {
|
||||
SizeButtonCfg buttonCfg = fontSizeCfg.getButtons().get(0);
|
||||
message.append("No button selected. Selecting top item \"")
|
||||
.append(buttonCfg.getLabelName()).append("\"\n");
|
||||
buttonCfg.setSelected(true);
|
||||
} else if (selectionCnt > 1) {
|
||||
message.append(selectionCnt)
|
||||
.append(" items selected; will select item \"")
|
||||
.append(selectionLabel).append("\"\n");
|
||||
}
|
||||
|
||||
if (message.length() > 0) {
|
||||
message.insert(0, "FontSize problem(s): ");
|
||||
IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(TextEditorDialog.class);
|
||||
statusHandler.handle(Priority.PROBLEM, message.toString());
|
||||
}
|
||||
}
|
||||
|
||||
return fontSizeCfg;
|
||||
|
||||
}
|
||||
|
||||
public void setDefaultFont(int fontSize) {
|
||||
dftFont = new Font(getDisplay(), "Courier", fontSize, SWT.NORMAL);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the components and put them on the display.
|
||||
*/
|
||||
|
@ -3030,7 +3107,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
displayAfosBrowser();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Add the Load History button.
|
||||
rd = new RowData(BUTTON_WIDTH, BUTTON_HEIGHT);
|
||||
loadHistoryBtn = new Button(topBtnRowComp, SWT.PUSH);
|
||||
|
@ -3561,7 +3638,8 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
headerTF = new Text(headerTFComp, SWT.BORDER | SWT.MULTI
|
||||
| SWT.READ_ONLY);
|
||||
headerTF.setLayoutData(gd);
|
||||
headerTF.setFont(medFont);
|
||||
|
||||
headerTF.setFont(dftFont);
|
||||
headerTF.setEditable(false);
|
||||
|
||||
headerTFComp.layout();
|
||||
|
@ -3727,13 +3805,16 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
|
||||
textEditorComp = new Composite(shell, SWT.NONE);
|
||||
GridLayout gridLayout = new GridLayout(1, false);
|
||||
TextColorsCfg textColorCfg = null;
|
||||
|
||||
textEditorComp.setLayout(gridLayout);
|
||||
textEditorComp.setLayoutData(gd);
|
||||
|
||||
textEditor = new StyledText(textEditorComp, SWT.BORDER | SWT.MULTI
|
||||
| SWT.V_SCROLL | SWT.H_SCROLL);
|
||||
gd = new GridData(SWT.FILL, SWT.FILL, true, true);
|
||||
textEditor.setFont(medFont);
|
||||
textEditor.setFont(dftFont);
|
||||
|
||||
GC gc = new GC(textEditor);
|
||||
FontMetrics fm = gc.getFontMetrics();
|
||||
gc.dispose();
|
||||
|
@ -3745,6 +3826,31 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
textEditor.setEditable(false);
|
||||
airportToolTip = new DefaultToolTip(textEditor, SWT.DEFAULT, true);
|
||||
textEditor.setKeyBinding(SWT.INSERT, SWT.NULL); // DR 7826
|
||||
|
||||
textColorCfg = getTextColorCfg();
|
||||
setDefaultTextColor(textColorCfg);
|
||||
textEditor.setForeground(textForeground);
|
||||
textEditor.setBackground(textBackground);
|
||||
|
||||
textEditor.addSelectionListener(new SelectionListener() {
|
||||
@Override
|
||||
public void widgetDefaultSelected(SelectionEvent e) {
|
||||
System.out.println("\ntextEditor default selection event --" + e.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
|
||||
StyledText stylText = (StyledText) e.getSource();
|
||||
|
||||
// String slctText = stylText.getSelectionText();
|
||||
// int length = slctText.length();
|
||||
|
||||
stylText.setSelectionBackground(highlightBackground);
|
||||
stylText.setSelectionForeground(highlightForeground);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
textEditor.addKeyListener(new KeyAdapter() {
|
||||
@Override
|
||||
|
@ -3810,8 +3916,8 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
public void verifyKey(VerifyEvent event) {
|
||||
// Ignore edit keys when not in edit mode.
|
||||
if (textEditor.getEditable() == false) {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (event.keyCode == SWT.DEL || event.keyCode == SWT.BS
|
||||
|| event.keyCode == SWT.SHIFT) {
|
||||
// Do nothing...
|
||||
|
@ -3911,7 +4017,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
}
|
||||
|
||||
if (e.button == 3) {
|
||||
processPopup();
|
||||
processPopup();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3923,51 +4029,130 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
});
|
||||
}
|
||||
|
||||
private TextColorsCfg getTextColorCfg() {
|
||||
TextColorsCfg textColorsCfg = null;
|
||||
|
||||
try {
|
||||
IPathManager pm = PathManagerFactory.getPathManager();
|
||||
File path = pm.getStaticFile("textws/gui/TextColorsCfg.xml");
|
||||
textColorsCfg = JAXB.unmarshal(path, TextColorsCfg.class);
|
||||
|
||||
} catch (Exception e) {
|
||||
IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(TextEditorDialog.class);
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"Unable to parse TextColors configuration.", e);
|
||||
textColorsCfg = new TextColorsCfg();
|
||||
|
||||
}
|
||||
|
||||
// Perform Sanity Checks on configuration.
|
||||
StringBuilder message = new StringBuilder();
|
||||
|
||||
for (TextColorElement textElm : textColorsCfg.getTextColorElements()) {
|
||||
String prmtName = textElm.getParamName();
|
||||
if (prmtName == null) {
|
||||
message.append("Item \"paramName\" problem!\n");
|
||||
|
||||
}
|
||||
|
||||
if( textElm.getColor() == null ) {
|
||||
message.append("Item \"color\" data enter problem!\n");
|
||||
}
|
||||
|
||||
if (message.length() > 0) {
|
||||
message.insert(0, "TextColorsCfg broblem(s): ");
|
||||
IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(TextEditorDialog.class);
|
||||
statusHandler.handle(Priority.PROBLEM, message.toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return textColorsCfg;
|
||||
|
||||
}
|
||||
|
||||
private void setDefaultTextColor(TextColorsCfg clrCfg) {
|
||||
|
||||
for (TextColorElement textElm : clrCfg.getTextColorElements()) {
|
||||
|
||||
String paramName = textElm.getParamName().trim();
|
||||
if( paramName.equalsIgnoreCase("textBG")) {
|
||||
if ( textElm.getColor() != null)
|
||||
textBackground = new Color(shell.getDisplay(), textElm.getColor());
|
||||
else
|
||||
textBackground = shell.getDisplay().getSystemColor(UPDATE_BG);
|
||||
|
||||
}
|
||||
else if( paramName.equalsIgnoreCase("textFG")) {
|
||||
if ( textElm.getColor() != null)
|
||||
textForeground = new Color(shell.getDisplay(), textElm.getColor());
|
||||
else
|
||||
textForeground = shell.getDisplay().getSystemColor(UPDATE_FG);
|
||||
}
|
||||
else if( paramName.equalsIgnoreCase("highlightBG")) {
|
||||
if ( textElm.getColor() != null)
|
||||
highlightBackground = new Color(shell.getDisplay(), textElm.getColor());
|
||||
else
|
||||
highlightBackground = shell.getDisplay().getSystemColor(HIGHLIGHT_BG);
|
||||
}
|
||||
else if( paramName.equalsIgnoreCase("highlightFG")) {
|
||||
if ( textElm.getColor() != null)
|
||||
highlightForeground = new Color(shell.getDisplay(), textElm.getColor());
|
||||
else
|
||||
highlightForeground = shell.getDisplay().getSystemColor(UPDATE_FG);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the user choice from the popup list. DR14842 - re-written
|
||||
*/
|
||||
private void processPopup() {
|
||||
Menu menu = new Menu(shell, SWT.POP_UP);
|
||||
List<String> items = Arrays.asList(popupItems);
|
||||
for (String pi : popupItems) {
|
||||
MenuItem mi = new MenuItem(menu, SWT.PUSH);
|
||||
mi.setText(pi);
|
||||
if (isEditMode()) {
|
||||
mi.setEnabled(true);
|
||||
} else {
|
||||
mi.setEnabled(isPopItemDefault[items.indexOf(pi)]);
|
||||
}
|
||||
mi.addListener(SWT.Selection, new Listener() {
|
||||
private void processPopup() {
|
||||
Menu menu = new Menu(shell, SWT.POP_UP);
|
||||
List<String> items = Arrays.asList(popupItems);
|
||||
for (String pi : popupItems) {
|
||||
MenuItem mi = new MenuItem(menu, SWT.PUSH);
|
||||
mi.setText(pi);
|
||||
if (isEditMode()) {
|
||||
mi.setEnabled(true);
|
||||
} else {
|
||||
mi.setEnabled(isPopItemDefault[items.indexOf(pi)]);
|
||||
}
|
||||
mi.addListener(SWT.Selection, new Listener() {
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
handleSelection(event);
|
||||
}
|
||||
});
|
||||
}
|
||||
menu.setVisible(true);
|
||||
}
|
||||
|
||||
public void handleEvent(Event event) {
|
||||
handleSelection(event);
|
||||
}
|
||||
});
|
||||
}
|
||||
menu.setVisible(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the selection from the popup menu
|
||||
* Handle the selection from the popup menu
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
protected void handleSelection(Event event) {
|
||||
MenuItem item = (MenuItem) event.widget;
|
||||
String choice = item.getText();
|
||||
if (choice != null) {
|
||||
if (popupItems[0].equals(choice)) {
|
||||
textEditor.selectAll();
|
||||
} else if (popupItems[1].equals(choice)) {
|
||||
cutText();
|
||||
} else if (popupItems[2].equals(choice)) {
|
||||
copyText();
|
||||
} else if (popupItems[3].equals(choice)) {
|
||||
pasteText();
|
||||
}
|
||||
textEditor.update();
|
||||
}
|
||||
}
|
||||
protected void handleSelection(Event event) {
|
||||
MenuItem item = (MenuItem) event.widget;
|
||||
String choice = item.getText();
|
||||
if (choice != null) {
|
||||
if (popupItems[0].equals(choice)) {
|
||||
textEditor.selectAll();
|
||||
} else if (popupItems[1].equals(choice)) {
|
||||
cutText();
|
||||
} else if (popupItems[2].equals(choice)) {
|
||||
copyText();
|
||||
} else if (popupItems[3].equals(choice)) {
|
||||
pasteText();
|
||||
}
|
||||
textEditor.update();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* creates the bar containing the script runner controls.
|
||||
|
@ -5546,94 +5731,93 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
textEditor.setText("");
|
||||
}
|
||||
} else {
|
||||
// TODO FIX PARSING
|
||||
// TODO FIX PARSING
|
||||
|
||||
// First, set the current header by assuming that it usually
|
||||
// consists of the first two lines of text in the text product,
|
||||
// though there will be exceptions to that "rule" as handled below.
|
||||
// So, obtain the AFOS NNNxxx. If it's where it is supposed to be
|
||||
// in the new format, then the existing header is already an AWIPS
|
||||
// First, set the current header by assuming that it usually
|
||||
// consists of the first two lines of text in the text product,
|
||||
// though there will be exceptions to that "rule" as handled below.
|
||||
// So, obtain the AFOS NNNxxx. If it's where it is supposed to be
|
||||
// in the new format, then the existing header is already an AWIPS
|
||||
// text product identifier. Otherwise it is a legacy AFOS
|
||||
// identifier.
|
||||
if (TextDisplayModel.getInstance().hasStdTextProduct(token)) {
|
||||
StdTextProduct textProd = TextDisplayModel.getInstance()
|
||||
.getStdTextProduct(token);
|
||||
StdTextProductId prodId = textProd.getProdId();
|
||||
try {
|
||||
// start of second line of text
|
||||
start = textEditor.getOffsetAtLine(thisLine + 1);
|
||||
if ((textEditor.getText(start, start + afosNnnLimit)
|
||||
.equals(prodId.getNnnid()))
|
||||
if (TextDisplayModel.getInstance().hasStdTextProduct(token)) {
|
||||
StdTextProduct textProd = TextDisplayModel.getInstance()
|
||||
.getStdTextProduct(token);
|
||||
StdTextProductId prodId = textProd.getProdId();
|
||||
try {
|
||||
// start of second line of text
|
||||
start = textEditor.getOffsetAtLine(thisLine + 1);
|
||||
if ((textEditor.getText(start, start + afosNnnLimit)
|
||||
.equals(prodId.getNnnid()))
|
||||
&& (textEditor.getText(start + afosNnnLimit + 1,
|
||||
start + afosXxxLimit).equals(prodId
|
||||
.getXxxid()))) {
|
||||
// Text matches the products nnnid and xxxid
|
||||
numberOfLinesOfHeaderText = 2;
|
||||
// Text matches the products nnnid and xxxid
|
||||
numberOfLinesOfHeaderText = 2;
|
||||
} else if (textEditor.getText(start,
|
||||
start + afosNnnLimit + 2).equals(
|
||||
AFOSParser.DRAFT_PIL)
|
||||
|| textEditor.getText(start,
|
||||
start + afosNnnLimit + 2).equals("TTAA0")) {
|
||||
// Text matches temporary WRKWG#
|
||||
numberOfLinesOfHeaderText = 2;
|
||||
} else {
|
||||
// Assume this header block is a legacy AFOS identifier.
|
||||
numberOfLinesOfHeaderText = 1;
|
||||
}
|
||||
} catch (IllegalArgumentException e) {
|
||||
// Text matches temporary WRKWG#
|
||||
numberOfLinesOfHeaderText = 2;
|
||||
} else {
|
||||
// Assume this header block is a legacy AFOS identifier.
|
||||
numberOfLinesOfHeaderText = 1;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
start = 0;
|
||||
finish = textEditor.getOffsetAtLine(thisLine
|
||||
+ numberOfLinesOfHeaderText) - 1;
|
||||
} catch (IllegalArgumentException e) {
|
||||
// The text does not span enough lines so use the full extent
|
||||
// of the product.
|
||||
finish = textEditor.getCharCount() - 1;
|
||||
// Assume this header block is a legacy AFOS identifier.
|
||||
numberOfLinesOfHeaderText = 1;
|
||||
}
|
||||
}
|
||||
|
||||
// Set the content of the header block to consist of just the header
|
||||
// of
|
||||
// the text product... it will get reunited with the body when it is
|
||||
// saved.
|
||||
if (finish > start) {
|
||||
headerTF.setText(textEditor.getText(start, finish));
|
||||
} else {
|
||||
headerTF.setText("");
|
||||
}
|
||||
try {
|
||||
start = 0;
|
||||
finish = textEditor.getOffsetAtLine(thisLine
|
||||
+ numberOfLinesOfHeaderText) - 1;
|
||||
} catch (IllegalArgumentException e) {
|
||||
// The text does not span enough lines so use the full extent
|
||||
// of the product.
|
||||
finish = textEditor.getCharCount() - 1;
|
||||
}
|
||||
|
||||
// Next, set the current body by assuming that it always
|
||||
// consists of the rest of the text product beyond the line(s)
|
||||
// of text in the header.
|
||||
try {
|
||||
int numberOfBlankLines = -1;
|
||||
String line = null;
|
||||
do {
|
||||
numberOfBlankLines++;
|
||||
// Set the content of the header block to consist of just the header of
|
||||
// the text product... it will get reunited with the body when it is
|
||||
// saved.
|
||||
if (finish > start) {
|
||||
headerTF.setText(textEditor.getText(start, finish));
|
||||
} else {
|
||||
headerTF.setText("");
|
||||
}
|
||||
|
||||
// Next, set the current body by assuming that it always
|
||||
// consists of the rest of the text product beyond the line(s)
|
||||
// of text in the header.
|
||||
try {
|
||||
int numberOfBlankLines = -1;
|
||||
String line = null;
|
||||
do {
|
||||
numberOfBlankLines++;
|
||||
line = textEditor.getLine(thisLine
|
||||
+ numberOfLinesOfHeaderText + numberOfBlankLines);
|
||||
} while (line.length() == 0 || line.equals(""));
|
||||
// Note: 'st' is a reference to 'textEditor'...
|
||||
// delelete the header from the text in 'textEditor'
|
||||
finish = textEditor.getOffsetAtLine(thisLine
|
||||
+ numberOfLinesOfHeaderText + numberOfBlankLines);
|
||||
textEditor.setSelection(start, finish);
|
||||
textEditor.setEditable(true);
|
||||
textEditor.invokeAction(SWT.DEL);
|
||||
textEditor.setEditable(false);
|
||||
} catch (IllegalArgumentException e) {
|
||||
// There is no text product body, so set it to the empty string.
|
||||
textEditor.setText("");
|
||||
}
|
||||
} while (line.length() == 0 || line.equals(""));
|
||||
// Note: 'st' is a reference to 'textEditor'...
|
||||
// delelete the header from the text in 'textEditor'
|
||||
finish = textEditor.getOffsetAtLine(thisLine
|
||||
+ numberOfLinesOfHeaderText + numberOfBlankLines);
|
||||
textEditor.setSelection(start, finish);
|
||||
textEditor.setEditable(true);
|
||||
textEditor.invokeAction(SWT.DEL);
|
||||
textEditor.setEditable(false);
|
||||
} catch (IllegalArgumentException e) {
|
||||
// There is no text product body, so set it to the empty string.
|
||||
textEditor.setText("");
|
||||
}
|
||||
}
|
||||
// set editor status flags
|
||||
dirty = false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Update the editor's header text field.
|
||||
*
|
||||
|
@ -5840,9 +6024,9 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
statusBarLabel.update();
|
||||
setBusy(true);
|
||||
|
||||
if (queryTransport == null) {
|
||||
queryTransport = TextEditorUtil.getTextDbsrvTransport();
|
||||
}
|
||||
if (queryTransport == null) {
|
||||
queryTransport = TextEditorUtil.getTextDbsrvTransport();
|
||||
}
|
||||
productQueryJob.addRequest(command, isObsUpdated);
|
||||
}
|
||||
|
||||
|
@ -7527,17 +7711,9 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
protected void disposed() {
|
||||
textEditor.setFont(shell.getFont());
|
||||
headerTF.setFont(shell.getFont());
|
||||
|
||||
if (smlFont != null) {
|
||||
smlFont.dispose();
|
||||
}
|
||||
|
||||
if (medFont != null) {
|
||||
medFont.dispose();
|
||||
}
|
||||
|
||||
if (lrgFont != null) {
|
||||
lrgFont.dispose();
|
||||
|
||||
if (dftFont != null) {
|
||||
dftFont.dispose();
|
||||
}
|
||||
|
||||
if (clipboard != null) {
|
||||
|
@ -8129,7 +8305,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
private void displayAirportTooltip(Point location) {
|
||||
String word = parseProduct(textEditor, location.y);
|
||||
if (word != null) {
|
||||
String result = AfosBrowserModel.getInstance().getNodeHelp(word);
|
||||
String result = AfosBrowserModel.getInstance().getNodeHelp(word);
|
||||
if (result != null) {
|
||||
// dispaly below and to the right of location.
|
||||
location.x += 5;
|
||||
|
@ -8155,29 +8331,29 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener,
|
|||
|
||||
String result = new String("");
|
||||
try {
|
||||
char c = lineText.charAt(0);
|
||||
if ((c == 'M') || (c == 'S') || (c == 'T')) {
|
||||
char c = lineText.charAt(0);
|
||||
if ((c == 'M') || (c == 'S') || (c == 'T')) {
|
||||
// # Most obs start with METAR, SPECI, TESTM, or TESTS. Skip
|
||||
// over
|
||||
// that tag,
|
||||
// # a space, and the K or P, to get to the 3-char station ID.
|
||||
if (lineText.length() > 10) {
|
||||
result = lineText.substring(7, 10);
|
||||
} else {
|
||||
result = lineText.substring(lineText.length() - 3);
|
||||
}
|
||||
} else if ((c == 'W') || (c == 'Y')) {
|
||||
// that tag,
|
||||
// # a space, and the K or P, to get to the 3-char station ID.
|
||||
if (lineText.length() > 10) {
|
||||
result = lineText.substring(7, 10);
|
||||
} else {
|
||||
result = lineText.substring(lineText.length() - 3);
|
||||
}
|
||||
} else if ((c == 'W') || (c == 'Y')) {
|
||||
// # Canadian SAOs have 3-character IDs, starting with W or Y.
|
||||
// Grab
|
||||
// 'em.
|
||||
result = lineText.substring(0, 3);
|
||||
} else {
|
||||
// 'em.
|
||||
result = lineText.substring(0, 3);
|
||||
} else {
|
||||
// # Some military obs don't get tagged. Skip the K or P and get
|
||||
// 3
|
||||
// chars.
|
||||
int wordLineStart = 1;
|
||||
result = lineText.substring(wordLineStart, wordLineStart + 4);
|
||||
}
|
||||
// chars.
|
||||
int wordLineStart = 1;
|
||||
result = lineText.substring(wordLineStart, wordLineStart + 4);
|
||||
}
|
||||
} catch (StringIndexOutOfBoundsException ex) {
|
||||
// User has non METAR/SAO products and the parsing failed.
|
||||
result = null;
|
||||
|
|
|
@ -91,6 +91,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
|
|||
* 02Oct2012 1229 rferrel Option to allow blocking when top dialog.
|
||||
* 13Dec2012 1353 rferrel Fix bug introduced in the Show all dialogs.
|
||||
* 30Jan2013 DR 14736 D. Friedman Display local time.
|
||||
* 24Jun2013 DR 15733 XHuang Display MAX_BUTTON_CNT (8 button).
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -436,7 +437,7 @@ public class TextWorkstationDlg extends CaveSWTDialog implements
|
|||
textBtnArray = new ArrayList<Button>();
|
||||
textEditorArray = new ArrayList<TextEditorDialog>();
|
||||
|
||||
for (int x = 1; x <= INIT_BUTTON_CNT; ++x) {
|
||||
for (int x = 1; x <= MAX_BUTTON_CNT; ++x) {
|
||||
createButtonAndTextEditor(x);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,15 +19,11 @@
|
|||
**/
|
||||
package com.raytheon.viz.ui.personalities.awips;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
|
||||
import com.raytheon.uf.viz.core.maps.MapStore;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* This is the default component for CAVE that is the standard workbench with
|
||||
* all the perspectives.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -35,7 +31,7 @@ import com.raytheon.uf.viz.core.maps.MapStore;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 9, 2010 mschenke Initial creation
|
||||
* Jun 25, 2013 2139 jsanchez Loaded the map tree on CAVE start up.
|
||||
* Jul 1, 2013 2139 jsanchez Loaded map tree at cave start up.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -58,14 +54,11 @@ public class CAVE extends AbstractCAVEComponent {
|
|||
*/
|
||||
@Override
|
||||
protected void startInternal(String componentName) throws Exception {
|
||||
Job job = new Job("Loading Map Tree") {
|
||||
@Override
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
MapStore.getMapTree();
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
};
|
||||
job.schedule();
|
||||
// Loading Map Tree
|
||||
long t = System.currentTimeMillis();
|
||||
MapStore.getMapTree();
|
||||
System.out.println("Loading Map Tree: "
|
||||
+ (System.currentTimeMillis() - t));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -38,9 +38,6 @@
|
|||
<Level displayName="Surface" key="Surface">
|
||||
<DatabaseLevel levelName="SFC" levelOneValue="0.0" />
|
||||
<DatabaseLevel levelName="MSL" levelOneValue="0.0" />
|
||||
<DatabaseLevel levelName="BL" levelOneValue="0" />
|
||||
<DatabaseLevel levelName="BLS" levelOneValue="0" />
|
||||
<DatabaseLevel levelName="HYB" levelOneValue="1" />
|
||||
</Level>
|
||||
<Level displayName="10FHAG" key="10FHAG">
|
||||
<DatabaseLevel levelName="FHAG" levelOneValue="10.0" />
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.geotools.referencing.GeodeticCalculator;
|
|||
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
import com.vividsolutions.jts.geom.GeometryFactory;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -102,11 +103,20 @@ public class GisUtil {
|
|||
|
||||
// Test for central by not being near adjacent borders.
|
||||
if (useCentral && iQuad.centralGeom != null
|
||||
&& iQuad.centralGeom.contains(warnedArea)) {
|
||||
&& iQuad.centralGeom.intersects(warnedArea) && !iQuad.north
|
||||
&& !iQuad.south && !iQuad.east && !iQuad.west) {
|
||||
portions.add(Direction.CENTRAL);
|
||||
return portions;
|
||||
}
|
||||
|
||||
// If the parentGeom is oddly shaped (i.e. BROOMFIELD), the intended
|
||||
// special cases won't work. A basic comparison can only be applied.
|
||||
Coordinate centre = parentGeom.getEnvelopeInternal().centre();
|
||||
GeometryFactory gf = new GeometryFactory();
|
||||
if (!parentGeom.intersects(gf.createPoint(centre))) {
|
||||
return getPointDesc(iQuad, useExtreme);
|
||||
}
|
||||
|
||||
// Possible case of a stripe across the middle
|
||||
if (iQuad.q == 0) {
|
||||
// Only one direction encoded
|
||||
|
@ -120,8 +130,9 @@ public class GisUtil {
|
|||
|
||||
// All quadrants in use.
|
||||
if (iQuad.q == 4 && iQuad.qq == 4) {
|
||||
if ((iQuad.north && iQuad.south && !iQuad.east && !iQuad.west)
|
||||
|| (iQuad.east && iQuad.west && !iQuad.north && !iQuad.south)) {
|
||||
if (useCentral
|
||||
&& ((iQuad.north && iQuad.south && !iQuad.east && !iQuad.west) || (iQuad.east
|
||||
&& iQuad.west && !iQuad.north && !iQuad.south))) {
|
||||
// Add CENTRAL if north and south are impacted, but not east and
|
||||
// west. Apply vice versa
|
||||
portions.add(Direction.CENTRAL);
|
||||
|
@ -161,19 +172,6 @@ public class GisUtil {
|
|||
}
|
||||
}
|
||||
|
||||
// Three diagonal quadrants in use.
|
||||
if (iQuad.qq == 3 && portions.isEmpty()) {
|
||||
if (iQuad.nn == 0) {
|
||||
portions.add(Direction.SOUTH);
|
||||
} else if (iQuad.ss == 0) {
|
||||
portions.add(Direction.NORTH);
|
||||
} else if (iQuad.ww == 0) {
|
||||
portions.add(Direction.EAST);
|
||||
} else if (iQuad.ee == 0) {
|
||||
portions.add(Direction.WEST);
|
||||
}
|
||||
}
|
||||
|
||||
// add extreme for three quadrant case.
|
||||
if (!portions.isEmpty()) {
|
||||
if (useExtreme && iQuad.xxx > 0) {
|
||||
|
@ -230,18 +228,18 @@ public class GisUtil {
|
|||
EnumSet<Direction> portions = EnumSet.noneOf(Direction.class);
|
||||
int counter = 0;
|
||||
|
||||
if (iQuad.north) {
|
||||
if (iQuad.north && !iQuad.south) {
|
||||
portions.add(Direction.NORTH);
|
||||
counter++;
|
||||
} else if (iQuad.south) {
|
||||
} else if (iQuad.south && !iQuad.north) {
|
||||
portions.add(Direction.SOUTH);
|
||||
counter++;
|
||||
}
|
||||
|
||||
if (iQuad.east) {
|
||||
if (iQuad.east && !iQuad.west) {
|
||||
portions.add(Direction.EAST);
|
||||
counter++;
|
||||
} else if (iQuad.west) {
|
||||
} else if (iQuad.west && !iQuad.east) {
|
||||
portions.add(Direction.WEST);
|
||||
counter++;
|
||||
}
|
||||
|
@ -264,6 +262,10 @@ public class GisUtil {
|
|||
while (dirIter.hasNext()) {
|
||||
list.add(dirIter.next().toString());
|
||||
}
|
||||
|
||||
if (list.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
@ -368,11 +370,9 @@ public class GisUtil {
|
|||
portions.add(Direction.WEST);
|
||||
}
|
||||
|
||||
if (azimuth < (90 - DIRECTION_DELTA)
|
||||
&& azimuth > (-90 + DIRECTION_DELTA)) {
|
||||
if (Math.abs(azimuth) < (90 - DIRECTION_DELTA)) {
|
||||
portions.add(Direction.NORTH);
|
||||
} else if (azimuth > (90 + DIRECTION_DELTA)
|
||||
&& azimuth < (-90 - DIRECTION_DELTA)) {
|
||||
} else if (Math.abs(azimuth) > (90 + DIRECTION_DELTA)) {
|
||||
portions.add(Direction.SOUTH);
|
||||
}
|
||||
|
||||
|
|
|
@ -338,7 +338,7 @@ public class ImpactedQuadrants {
|
|||
}
|
||||
|
||||
/**
|
||||
* Identifies portions of the parent envelope which is 20% from each edge.
|
||||
* Identifies portions of the parent envelope which is 15% from each edge.
|
||||
*
|
||||
* @param impactedQuadrants
|
||||
* @param parentEnvelopeInternal
|
||||
|
@ -348,8 +348,8 @@ public class ImpactedQuadrants {
|
|||
ImpactedQuadrants impactedQuadrants,
|
||||
Envelope parentEnvelopeInternal, Geometry warnedArea) {
|
||||
|
||||
double deltaY = parentEnvelopeInternal.getHeight() * 0.20;
|
||||
double deltaX = parentEnvelopeInternal.getWidth() * 0.20;
|
||||
double deltaY = parentEnvelopeInternal.getHeight() * 0.15;
|
||||
double deltaX = parentEnvelopeInternal.getWidth() * 0.15;
|
||||
|
||||
double minLat = parentEnvelopeInternal.getMinY();
|
||||
double maxLat = parentEnvelopeInternal.getMaxY();
|
||||
|
|
|
@ -65,6 +65,10 @@ import com.vividsolutions.jts.geom.prep.PreparedGeometryFactory;
|
|||
* 04/16/2013 DR 16045 Qinglu Lin Relocated removeDuplicateCoordinate(), computeSlope(),
|
||||
* computeCoordinate(), and adjustPolygon from WarngenUIState.
|
||||
* 05/23/2013 DR 16169 D. Friedman Improve redraw-from-hatched-area polygons.
|
||||
* 06/17/2013 DR 15787 Qinglu Lin Added removeOverlaidLinesegments() and removeTriplyOverlaidLinesegments().
|
||||
* 07/11/2013 DR 16376 Qinglu Lin Removed removeTriplyOverlaidLinesegments() and updated computeSlope()
|
||||
* and removeOverlaidLinesegments().
|
||||
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -1112,8 +1116,8 @@ public class PolygonUtil {
|
|||
*/
|
||||
private static double computeSlope(Coordinate[] coords, int i) {
|
||||
double min = 1.0E-08;
|
||||
double slope = 1.0E08;
|
||||
double dx = coords[i].x - coords[i + 1].x;
|
||||
double slope = 0.0;
|
||||
if (Math.abs(dx) > min) {
|
||||
slope = (coords[i].y - coords[i + 1].y) / dx;
|
||||
}
|
||||
|
@ -1251,4 +1255,59 @@ public class PolygonUtil {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static Coordinate[] removeOverlaidLinesegments(Coordinate[] coords) {
|
||||
Coordinate[] expandedCoords = null;
|
||||
boolean flag = true;
|
||||
while (flag) {
|
||||
expandedCoords = new Coordinate[coords.length+1];
|
||||
flag = false;
|
||||
for (int i = 0; i < coords.length; i++) {
|
||||
expandedCoords[i] = new Coordinate(coords[i]);
|
||||
}
|
||||
expandedCoords[expandedCoords.length-1] = new Coordinate(coords[1]);
|
||||
double min = 1.0E-8;
|
||||
int m = expandedCoords.length;
|
||||
int count = 0;
|
||||
double slope = 0.0, slope1 = 0.0;
|
||||
for (int i = 0; i < m - 1; i++) {
|
||||
slope = computeSlope(expandedCoords,i);
|
||||
if (count == 0) {
|
||||
slope1 = slope;
|
||||
count += 1;
|
||||
} else {
|
||||
if (Math.abs(slope - slope1) < min) {
|
||||
count += 1;
|
||||
} else {
|
||||
count = 0;
|
||||
slope1 = slope;
|
||||
count += 1;
|
||||
}
|
||||
}
|
||||
if (count == 2) {
|
||||
// remove the middle point, i.e., that has index of i, of the three that either form two
|
||||
// overlaid/partial overlaid line segments or is in the middle
|
||||
// of a straight line segment
|
||||
coords = new Coordinate[coords.length - 1];
|
||||
if (i == m - 2) {
|
||||
for (int j = 1; j < m - 2; j++) {
|
||||
coords[j-1] = new Coordinate(expandedCoords[j]);
|
||||
}
|
||||
coords[coords.length-1] = new Coordinate(coords[0]);
|
||||
} else {
|
||||
for (int j = 0; j < i; j++) {
|
||||
coords[j] = new Coordinate(expandedCoords[j]);
|
||||
}
|
||||
for (int j = i + 1; j < expandedCoords.length-2; j++) {
|
||||
coords[j-1] = new Coordinate(expandedCoords[j]);
|
||||
}
|
||||
coords[coords.length-1] = new Coordinate(coords[0]);
|
||||
}
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return coords;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ import java.util.Collections;
|
|||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
@ -108,6 +109,11 @@ import com.vividsolutions.jts.geom.Point;
|
|||
* Mar 25, 2013 1605 jsanchez Checks if a storm location is over an urban bound area.
|
||||
* Apr 24, 2013 1943 jsanchez Calculated partOfArea for a storm location over an urban bound area.
|
||||
* May 2, 2013 1963 jsanchez Referenced calculateLocationPortion from GisUtil.
|
||||
* Jun 20, 2013 16224 Qinglu Lin Updated pathcast() by removing restriction of "i < maxCount" at line 478,
|
||||
* and added findPointsToBeRemoved(), computeAngle(), and remove pathcast's
|
||||
* points that are in the past.
|
||||
* Jun 24, 2013 DR 16317 D. Friedman Handle "motionless" track.
|
||||
* Jun 25, 2013 16224 Qinglu Lin Resolved the issue with "Date start" for pathcast in CON.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -249,6 +255,8 @@ public class Wx {
|
|||
|
||||
GeometryFactory gf = new GeometryFactory();
|
||||
|
||||
boolean flag = true;
|
||||
List<ClosestPoint> pointsToBeRemoved = null;
|
||||
try {
|
||||
Abbreviation areaTypeAbbrev = null;
|
||||
String trxFileStr = pathcastConfiguration
|
||||
|
@ -268,11 +276,11 @@ public class Wx {
|
|||
Geometry bufferedPathCastArea = null;
|
||||
List<PathCast> pathcasts = new ArrayList<PathCast>();
|
||||
Map<PathCast, Coordinate[]> pathCastCoords = new HashMap<PathCast, Coordinate[]>();
|
||||
if (stormTrackState.trackVisible) {
|
||||
if (stormTrackState.isNonstationary()) {
|
||||
List<Coordinate> coordinates = new ArrayList<Coordinate>();
|
||||
Date start = DateUtil.roundDate(new Date(wwaStartTime + delta),
|
||||
pathcastConfiguration.getInterval());
|
||||
Date stormTime = new Date(wwaStartTime);
|
||||
Date stormTime = new Date();
|
||||
Date start = DateUtil.roundDate(new Date(stormTime.getTime() + delta),
|
||||
pathcastConfiguration.getInterval());
|
||||
DestinationGeodeticCalculator gc = new DestinationGeodeticCalculator();
|
||||
while (start.getTime() <= wwaStopTime) {
|
||||
PathCast cast = new PathCast();
|
||||
|
@ -440,6 +448,23 @@ public class Wx {
|
|||
} else {
|
||||
points = new ArrayList<ClosestPoint>(0);
|
||||
}
|
||||
if (flag) {
|
||||
pointsToBeRemoved = findPointsToBeRemoved(centroid, points, stormTrackState.angle);
|
||||
flag = false;
|
||||
}
|
||||
|
||||
if (pointsToBeRemoved != null) {
|
||||
for (int i=0; i<pointsToBeRemoved.size(); i++) {
|
||||
for (int j=0; j<points.size(); j++) {
|
||||
// double comparison below can be replaced by gid comparison when bug in getGid() is fixed.
|
||||
if (pointsToBeRemoved.get(i).getPoint().x == points.get(j).getPoint().x &&
|
||||
pointsToBeRemoved.get(i).getPoint().y == points.get(j).getPoint().y) {
|
||||
points.remove(j);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pcPoints.put(pc, points);
|
||||
}
|
||||
// Figure out which points should go with which pathcast. Starts
|
||||
|
@ -452,12 +477,12 @@ public class Wx {
|
|||
while (tmp.isEmpty() == false) {
|
||||
PathCast pc = tmp.remove();
|
||||
List<ClosestPoint> points = pcPoints.get(pc);
|
||||
for (int i = 0; i < points.size() && i < maxCount; ++i) {
|
||||
for (int i = 0; i < points.size(); ++i) {
|
||||
ClosestPoint cp = points.get(i);
|
||||
for (PathCast pc2 : tmp) {
|
||||
if (pc2 != pc) {
|
||||
List<ClosestPoint> points2 = pcPoints.get(pc2);
|
||||
ClosestPoint found = find(cp, points2, maxCount);
|
||||
ClosestPoint found = find(cp, points2, Integer.MAX_VALUE);
|
||||
if (found != null) {
|
||||
// We found a point within maxCount in this
|
||||
// list.
|
||||
|
@ -932,4 +957,30 @@ public class Wx {
|
|||
public Date getObsTime() {
|
||||
return new Date(this.wwaStartTime);
|
||||
}
|
||||
|
||||
private List<ClosestPoint> findPointsToBeRemoved(Point centroid, List<ClosestPoint> points, double stormtrackAngle) {
|
||||
// convert storm track angle to geometry angle in range of (0,360)
|
||||
double convertedAngle = 90.0 - stormtrackAngle;
|
||||
if (convertedAngle < 0.0)
|
||||
convertedAngle += 360.0;
|
||||
|
||||
Iterator<ClosestPoint> iter = points.iterator();
|
||||
List<ClosestPoint> removedPoints = new ArrayList<ClosestPoint>();
|
||||
while (iter.hasNext()) {
|
||||
ClosestPoint cp = iter.next();
|
||||
double d = Math.abs(convertedAngle - computeAngle(centroid, cp.point));
|
||||
if (d > 180.0)
|
||||
d = 360.0 - d;
|
||||
if (d > 90.0)
|
||||
removedPoints.add(cp);
|
||||
}
|
||||
return removedPoints;
|
||||
}
|
||||
|
||||
private double computeAngle(Point p, Coordinate c) {
|
||||
double angle = Math.atan2(c.y - p.getY(), c.x - p.getX()) * 180 / Math.PI;
|
||||
if (angle < 0)
|
||||
angle += 360;
|
||||
return angle;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -139,6 +139,8 @@ import com.vividsolutions.jts.geom.Polygon;
|
|||
* Apr 30, 2013 DR 16118 Qinglu Lin For reissue (followup NEW), called redrawFromWarned() in okPressed().
|
||||
* May 17, 2013 DR 16118 Qinglu Lin Copied the fix from 13.4.1.
|
||||
* May 17, 2013 2012 jsanchez Preserved the warned area if the hatched area source is the same when changing templates.
|
||||
* Jun 24, 2013 DR 16317 D. Friedman Handle "motionless" track.
|
||||
* Jul 16, 2013 DR 16387 Qinglu Lin Reset totalSegments for each followup product.
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
|
@ -830,8 +832,10 @@ public class WarngenDialog extends CaveSWTDialog implements
|
|||
if (warngenLayer.getWarningArea() == null) {
|
||||
str = "Area selected has no overlap with current area of responsibility";
|
||||
} else {
|
||||
|
||||
if (warngenLayer.getStormTrackState().trackVisible) {
|
||||
if (warngenLayer.getStormTrackState().isInitiallyMotionless() &&
|
||||
! warngenLayer.getStormTrackState().isNonstationary()) {
|
||||
str += WarngenConstants.INSTRUCTION_DRAG_STORM + "\n";
|
||||
} else if (warngenLayer.getStormTrackState().trackVisible) {
|
||||
str += "Adjust Centroid in any Frame" + "\n";
|
||||
}
|
||||
str += "Adjust box around Warning Area";
|
||||
|
@ -1022,6 +1026,7 @@ public class WarngenDialog extends CaveSWTDialog implements
|
|||
startTime.getTime(), endTime.getTime(),
|
||||
selectedBullets, followupData, backupData);
|
||||
Matcher m = FollowUpUtil.vtecPtrn.matcher(result);
|
||||
totalSegments = 0;
|
||||
while (m.find()) {
|
||||
totalSegments++;
|
||||
}
|
||||
|
@ -1195,7 +1200,7 @@ public class WarngenDialog extends CaveSWTDialog implements
|
|||
}
|
||||
if (warngenLayer.getConfiguration().isTrackEnabled() == false
|
||||
|| warngenLayer.getConfiguration().getPathcastConfig() == null) {
|
||||
warngenLayer.getStormTrackState().trackVisible = false;
|
||||
warngenLayer.getStormTrackState().setInitiallyMotionless(true);
|
||||
}
|
||||
warngenLayer.resetInitialFrame();
|
||||
warngenLayer.setWarningAction(null);
|
||||
|
@ -1457,11 +1462,15 @@ public class WarngenDialog extends CaveSWTDialog implements
|
|||
warngenLayer.getStormTrackState().displayType = lineOfStorms
|
||||
.getSelection() ? DisplayType.POLY : DisplayType.POINT;
|
||||
}
|
||||
if (warngenLayer.getConfiguration().isTrackEnabled() == false
|
||||
|| warngenLayer.getConfiguration().getPathcastConfig() == null) {
|
||||
warngenLayer.getStormTrackState().trackVisible = false;
|
||||
warngenLayer.getStormTrackState().setInitiallyMotionless(
|
||||
warngenLayer.getConfiguration().isTrackEnabled() == false
|
||||
|| warngenLayer.getConfiguration()
|
||||
.getPathcastConfig() == null);
|
||||
if (warngenLayer.getStormTrackState().isInitiallyMotionless()) {
|
||||
warngenLayer.getStormTrackState().speed = 0;
|
||||
warngenLayer.getStormTrackState().angle = 0;
|
||||
} else {
|
||||
warngenLayer.getStormTrackState().trackVisible = true;
|
||||
warngenLayer.getStormTrackState().pointMoved = true;
|
||||
}
|
||||
restartBtn.setEnabled(true);
|
||||
} else {
|
||||
|
|
|
@ -178,6 +178,10 @@ import com.vividsolutions.jts.io.WKTReader;
|
|||
* 05/23/2013 DR 16169 D. Friedman Improve redraw-from-hatched-area polygons.
|
||||
* 05/31/2013 DR 16237 D. Friedman Refactor goespatial data routines and watch handling.
|
||||
* 06/05/2013 DR 16279 D. Friedman Fix determination of frame time from parsed storm track.
|
||||
* 06/17/1013 DR 15787 Qinglu Lin Called removeTriplyOverlaidLinesegments().
|
||||
* 06/24/2013 DR 16317 D. Friedman Handle "motionless" track.
|
||||
* 06/25/2013 DR 16013 Qinglu Lin Added setUniqueFip() and code for re-hatching polygon.
|
||||
* 07/09/2013 DR 16376 Qinglu Lin Removed calling removeOverTriplylaidLinesegment() but called removeOverlaidLinesegment().
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
|
@ -188,6 +192,8 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(WarngenLayer.class);
|
||||
|
||||
String uniqueFip = null;
|
||||
|
||||
private static class GeospatialDataList {
|
||||
|
||||
private static final String LOCAL_GEOM = "localGeometry";
|
||||
|
@ -409,11 +415,13 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
Coordinate[] coords = hatched.getCoordinates();
|
||||
PolygonUtil.round(coords, 2);
|
||||
PolygonUtil.adjustPolygon(coords);
|
||||
PolygonUtil.removeOverlaidLinesegments(coords);
|
||||
GeometryFactory gf = new GeometryFactory();
|
||||
LinearRing lr = gf.createLinearRing(coords);
|
||||
hatchedArea = gf.createPolygon(lr, null);
|
||||
if (!hatchedArea.isValid())
|
||||
if (!hatchedArea.isValid()) {
|
||||
hatchedArea = adjustVertex(hatchedArea);
|
||||
}
|
||||
hatchedWarningArea = createWarnedArea(
|
||||
latLonToLocal(hatchedArea),
|
||||
latLonToLocal(warningArea));
|
||||
|
@ -619,7 +627,13 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
try {
|
||||
// TODO: Check to see if feasible to try STIData first, might be
|
||||
// too slow
|
||||
if (checkStormTrackData(data = ToolsDataManager.getInstance()
|
||||
displayState.setInitiallyMotionless(!configuration
|
||||
.isTrackEnabled());
|
||||
if (!configuration.isTrackEnabled()) {
|
||||
displayState.angle = 0;
|
||||
displayState.speed = 0;
|
||||
} else if (checkStormTrackData(data = ToolsDataManager
|
||||
.getInstance()
|
||||
.getStormTrackData())) {
|
||||
displayState.angle = adjustAngle(data.getMotionDirection());
|
||||
displayState.speed = knotToMeterPerSec.convert(data
|
||||
|
@ -766,13 +780,11 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
}
|
||||
if (warningAction == null || warningAction == WarningAction.NEW) {
|
||||
// Initialize box
|
||||
redrawBoxFromTrack();
|
||||
if (((configuration.isTrackEnabled() == false || configuration
|
||||
.getPathcastConfig() == null) && this.displayState.displayType != DisplayType.POLY)
|
||||
|| frameCount == 1) {
|
||||
createSquare();
|
||||
resetInitialFrame();
|
||||
} else {
|
||||
redrawBoxFromTrack();
|
||||
}
|
||||
} else {
|
||||
redrawBoxFromTrack();
|
||||
|
@ -795,11 +807,6 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
if (hasDrawnShaded && shouldDrawShaded) {
|
||||
target.drawShadedShape(shadedCoveredArea, 1.0f);
|
||||
}
|
||||
|
||||
if (displayState.trackVisible == false
|
||||
&& trackUtil.getCurrentFrame(paintProps.getFramesInfo()) != displayState.intialFrame) {
|
||||
displayState.trackVisible = true;
|
||||
}
|
||||
}
|
||||
|
||||
lastMode = displayState.mode;
|
||||
|
@ -947,8 +954,9 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
}
|
||||
if (config != null) {
|
||||
init(config);
|
||||
displayState.trackVisible = this.configuration.isTrackEnabled()
|
||||
&& this.configuration.getPathcastConfig() != null;
|
||||
displayState.setInitiallyMotionless(
|
||||
this.configuration.isTrackEnabled() == false
|
||||
|| this.configuration.getPathcastConfig() == null);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1888,6 +1896,14 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
if (displayState.mode == Mode.DRAG_ME) {
|
||||
return;
|
||||
}
|
||||
if ((configuration.isTrackEnabled() == false ||
|
||||
configuration.getPathcastConfig() == null)
|
||||
&& !this.displayState.isNonstationary()
|
||||
&& this.displayState.displayType != DisplayType.POLY) {
|
||||
createSquare();
|
||||
return;
|
||||
}
|
||||
|
||||
DestinationGeodeticCalculator gc = new DestinationGeodeticCalculator();
|
||||
GeometryFactory gf = new GeometryFactory();
|
||||
|
||||
|
@ -2212,8 +2228,8 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
}
|
||||
|
||||
Point point = displayState.dragMePoint;
|
||||
displayState.trackVisible = (motdir != null && motspd != null);
|
||||
if (displayState.trackVisible) {
|
||||
if (motdir != null && motspd != null) {
|
||||
displayState.setInitiallyMotionless(false);
|
||||
displayState.angle = adjustAngle(motdir);
|
||||
displayState.speed = knotToMeterPerSec.convert(motspd);
|
||||
|
||||
|
@ -2228,6 +2244,10 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
|
||||
point = gf.createPoint(figurePoint(recordFrameTime,
|
||||
currentFrameTime, displayState.speed, displayState.angle));
|
||||
} else {
|
||||
displayState.setInitiallyMotionless(true);
|
||||
displayState.angle = 0;
|
||||
displayState.speed = 0;
|
||||
}
|
||||
|
||||
// Uses the new dragMePoint when creating a track
|
||||
|
@ -2313,7 +2333,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
int currentFrame = trackUtil.getCurrentFrame(info);
|
||||
int frameCount = trackUtil.getFrameCount(info);
|
||||
if (currentFrame == frameCount - 1
|
||||
|| displayState.trackVisible == false) {
|
||||
|| ! displayState.isNonstationary()) {
|
||||
return coordinate;
|
||||
}
|
||||
DataTime[] datatimes = trackUtil.getDataTimes(info);
|
||||
|
@ -2621,6 +2641,10 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
Geometry tmp = removeCounty(state.getWarningArea(),
|
||||
getFips(f));
|
||||
if (tmp.isEmpty()) {
|
||||
String fip = getFips(f);
|
||||
if (fip != null && uniqueFip != null && fip.equals(uniqueFip)) {
|
||||
updateWarnedAreas(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -3130,4 +3154,15 @@ public class WarngenLayer extends AbstractStormTrackResource {
|
|||
}
|
||||
return new HashSet<String>(namePrefix.values());
|
||||
}
|
||||
|
||||
public void setUniqueFip() {
|
||||
Geometry g = state.getWarningArea();
|
||||
if (g != null) {
|
||||
if (getAllFipsInArea(g).size() == 1) {
|
||||
Set<String> fips = getAllFipsInArea(g);
|
||||
Iterator<String> iter = fips.iterator();
|
||||
uniqueFip = iter.next();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,6 +64,7 @@ import com.vividsolutions.jts.geom.Polygon;
|
|||
* Jan 30, 2013 15439 Qinglu Lin Code were added to prevent nullPointException from occurring
|
||||
* when c2 is null for "case SINGLE_POINT" in move().
|
||||
* Mar 28, 2013 DR 15974 D. Friedman Do not track removed GIDs.
|
||||
* Jun 25, 2013 DR 16013 Qinglu Lin Called setUniqueFip() in handleMouseUp().
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -270,6 +271,9 @@ public class WarngenUIManager extends InputAdapter {
|
|||
pointDeleted = false;
|
||||
pointCreated = false;
|
||||
menuMove = false;
|
||||
if (mouseButton == 1) {
|
||||
warngenLayer.setUniqueFip();
|
||||
}
|
||||
return rval;
|
||||
}
|
||||
|
||||
|
|
|
@ -153,6 +153,7 @@ import com.vividsolutions.jts.io.WKTReader;
|
|||
* and secondtimezone can get correct values when warning area covers two time zones.
|
||||
* May 10, 2013 1951 rjpeter Updated ugcZones references
|
||||
* May 30, 2013 DR 16237 D. Friedman Fix watch query.
|
||||
* Jun 18, 2013 2118 njensen Only calculate pathcast if it's actually used
|
||||
* </pre>
|
||||
*
|
||||
* @author njensen
|
||||
|
@ -488,12 +489,23 @@ public class TemplateRunner {
|
|||
context.put(variableName, points.get(variableName));
|
||||
}
|
||||
|
||||
PathCast[] pathCast = wx.pathcast(threeLetterSiteId);
|
||||
context.put(config.getPathcastConfig().getVariable(), pathCast);
|
||||
boolean hasPathCast = false;
|
||||
for (String s : selectedBullets) {
|
||||
if (s.indexOf("pathcast") > -1) {
|
||||
hasPathCast = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (hasPathCast) {
|
||||
PathCast[] pathCast = wx.pathcast(threeLetterSiteId);
|
||||
context.put(config.getPathcastConfig().getVariable(),
|
||||
pathCast);
|
||||
|
||||
if (pathCast == null) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"WarnGen critical error: No PathCast Information");
|
||||
if (pathCast == null) {
|
||||
statusHandler
|
||||
.handle(Priority.PROBLEM,
|
||||
"WarnGen critical error: No PathCast Information");
|
||||
}
|
||||
}
|
||||
|
||||
// Now create the "other areas
|
||||
|
@ -1012,15 +1024,17 @@ public class TemplateRunner {
|
|||
request.addConstraint("startTime", new RequestConstraint(
|
||||
TimeUtil.formatDate(startConstraintTime),
|
||||
ConstraintType.LESS_THAN_EQUALS));
|
||||
request.addConstraint("endTime", new RequestConstraint(
|
||||
TimeUtil.formatDate(endConstraintTime),
|
||||
ConstraintType.GREATER_THAN_EQUALS));
|
||||
request.addConstraint(
|
||||
"endTime",
|
||||
new RequestConstraint(TimeUtil
|
||||
.formatDate(endConstraintTime),
|
||||
ConstraintType.GREATER_THAN_EQUALS));
|
||||
/*
|
||||
* TODO: Currently limited to filtering out one of
|
||||
* ("CAN","EXP"). Could use "Act" in addition to "act", but this
|
||||
* should really be fixed the underlying system.
|
||||
request.addConstraint("act", new RequestConstraint("CAN",
|
||||
ConstraintType.NOT_EQUALS));
|
||||
* request.addConstraint("act", new RequestConstraint("CAN",
|
||||
* ConstraintType.NOT_EQUALS));
|
||||
*/
|
||||
request.addConstraint("act", new RequestConstraint("EXP",
|
||||
ConstraintType.NOT_EQUALS));
|
||||
|
@ -1030,20 +1044,22 @@ public class TemplateRunner {
|
|||
// TODO: Talk to Jonathan about this... Do I even need officeid
|
||||
// IN or is ugc zone good enough?
|
||||
|
||||
/* Get all UGCs in the CWA now so that the watches will be
|
||||
/*
|
||||
* Get all UGCs in the CWA now so that the watches will be
|
||||
* formatted with all portions of the affected state(s).
|
||||
*
|
||||
* Filtering for valid UGCs is performed in processATEntries
|
||||
*/
|
||||
RequestConstraint ugcConstraint = new RequestConstraint("",
|
||||
ConstraintType.IN);
|
||||
ugcConstraint.setConstraintValueList(warngenLayer.getAllCountyUgcs());
|
||||
ugcConstraint.setConstraintValueList(warngenLayer
|
||||
.getAllCountyUgcs());
|
||||
request.addConstraint("ugcZone", ugcConstraint);
|
||||
|
||||
// These are the only fields we need for processing watches
|
||||
request.addFields(new String[] { "issueTime", "startTime",
|
||||
"endTime", "ugcZone", "phensig", "vtecstr",
|
||||
"etn", "act" });
|
||||
"endTime", "ugcZone", "phensig", "vtecstr", "etn",
|
||||
"act" });
|
||||
|
||||
DbQueryResponse response = (DbQueryResponse) ThriftClient
|
||||
.sendRequest(request);
|
||||
|
@ -1051,9 +1067,10 @@ public class TemplateRunner {
|
|||
List<ActiveTableRecord> records = new ArrayList<ActiveTableRecord>(
|
||||
response.getNumResults());
|
||||
for (Map<String, Object> result : response.getResults()) {
|
||||
/* TODO: Doing this here because only "EXP" is filtered
|
||||
* out by the query. Remove "act" from the field list
|
||||
* once this is fixed.
|
||||
/*
|
||||
* TODO: Doing this here because only "EXP" is filtered out
|
||||
* by the query. Remove "act" from the field list once this
|
||||
* is fixed.
|
||||
*/
|
||||
if ("CAN".equals(result.get("act")))
|
||||
continue;
|
||||
|
@ -1081,14 +1098,18 @@ public class TemplateRunner {
|
|||
t1 = System.currentTimeMillis();
|
||||
System.out.println("getWatches.polygonBuffer time: "
|
||||
+ (t1 - t0));
|
||||
validUgcZones = warngenLayer.getUgcsForCountyWatches(watchArea);
|
||||
validUgcZones = warngenLayer
|
||||
.getUgcsForCountyWatches(watchArea);
|
||||
} catch (RuntimeException e) {
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"Error determining areas to search for watches.", e);
|
||||
statusHandler
|
||||
.handle(Priority.ERROR,
|
||||
"Error determining areas to search for watches.",
|
||||
e);
|
||||
return rval;
|
||||
}
|
||||
|
||||
rval = processATEntries(records, warngenLayer, validUgcZones);
|
||||
rval = processATEntries(records, warngenLayer,
|
||||
validUgcZones);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ QPID_LIBS=$QPID_HOME/lib/qpid-all.jar:$QPID_HOME/lib/bdbstore-launch.jar
|
|||
export JAVA=java \
|
||||
JAVA_VM=-server \
|
||||
JAVA_MEM=-Xmx1024m \
|
||||
JAVA_GC="-XX:+UseConcMarkSweepGC -XX:+HeapDumpOnOutOfMemoryError" \
|
||||
JAVA_GC="-XX:+UseConcMarkSweepGC -XX:+CMSIIncrementalMode -XX:NewSize=300m -XX:MaxNewSize=300m -XX:SurvivorRatio=6 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/fxa/qpid" \
|
||||
QPID_CLASSPATH=$QPID_LIBS \
|
||||
QPID_RUN_LOG=2
|
||||
|
||||
|
|
|
@ -0,0 +1,134 @@
|
|||
######################################################
|
||||
## AIRPORT WEATHER WARNING TEMPLATE ##
|
||||
## EXAMPLE TEMPLATE USING HUNTSVILLE PRODUCT ##
|
||||
## CREATED BY PHIL KURIMSKI - WFO DTX ##
|
||||
## VERSION AWIPS II 1.0 -- APR 12 2012 ##
|
||||
## VERSION AWIPS II 1.1 -- SEP 12 2012 OB12.9.1-12 ##
|
||||
######################################################
|
||||
##
|
||||
${WMOId} ${vtecOffice} 000000 ${BBBId}
|
||||
AWW${siteId}
|
||||
#if(${productClass}=="T")
|
||||
TEST...AIRPORT WEATHER WARNING...TEST##
|
||||
#else
|
||||
AIRPORT WEATHER WARNING##
|
||||
#end
|
||||
|
||||
NATIONAL WEATHER SERVICE ${officeShort}
|
||||
#backupText(${backupSite})
|
||||
${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})}
|
||||
|
||||
#if(${productClass}=="T")
|
||||
...THIS MESSAGE IS FOR TEST PURPOSES ONLY...
|
||||
#end
|
||||
|
||||
${ugcline}
|
||||
#set($zoneList = "")
|
||||
#foreach (${area} in ${areas})
|
||||
#set($zoneList = "${zoneList}${area.name}-")
|
||||
#end
|
||||
${zoneList}
|
||||
${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})}
|
||||
|
||||
|
||||
#if(${productClass}=="T")
|
||||
THIS IS A TEST MESSAGE. ##
|
||||
#end
|
||||
#######################################################################
|
||||
## Set initial variables for initial issuance
|
||||
#######################################################################
|
||||
#set ($cancel = "")
|
||||
#set ($issue = "ISSUED AN")
|
||||
#######################################################################
|
||||
## Override initial variables if a cancellation is selected
|
||||
#######################################################################
|
||||
#if(${list.contains(${bullets}, "cancelAWW")})
|
||||
#set ($cancel = " CANCELLED")
|
||||
#set ($issue = "CANCELLED THE")
|
||||
#end
|
||||
#######################################################################
|
||||
## Set the airport based on selection in template
|
||||
## Sites can use different airports by modifying the code below
|
||||
#######################################################################
|
||||
#set ($site = "!** YOU DIDN'T SELECT AN AIRPORT **!")
|
||||
#if(${list.contains(${bullets}, "HSV")})
|
||||
#set ($site = "HUNTSVILLE INTERNATIONAL AIRPORT /HSV/")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "MSL")})
|
||||
#set ($site = "NORTHWEST ALABAMA REGIONAL AIRPORT (IN MUSCLE SHOALS) /MSL/")
|
||||
#end
|
||||
######################################################
|
||||
###### Storm current location description ##########
|
||||
######################################################
|
||||
...AIRPORT WEATHER WARNING${cancel}...
|
||||
|
||||
THE NATIONAL WEATHER SERVICE IN ${officeLoc} HAS ${issue} AIRPORT WEATHER WARNING FOR...
|
||||
|
||||
${site}
|
||||
|
||||
####################################################
|
||||
############# SECOND BULLET ########################
|
||||
####################################################
|
||||
## If cancelling the AWW do not output any text
|
||||
####################################################
|
||||
#if(${list.contains(${bullets}, "cancelAWW")})
|
||||
!** GIVE REASON FOR CANCELLATION **!
|
||||
#else
|
||||
* ##
|
||||
#if(${productClass}=="T")
|
||||
THIS IS A TEST MESSAGE. ##
|
||||
#end
|
||||
#secondBullet(${dateUtil},${expire},${timeFormat},${localtimezone},${secondtimezone})
|
||||
|
||||
|
||||
FOR THE FOLLOWING THREATS...
|
||||
|
||||
###################################################################
|
||||
## Create threats based on selections in the xml file
|
||||
## Sites can add or modify threats by changing the code below
|
||||
###################################################################
|
||||
#if(${list.contains(${bullets}, "wind")})
|
||||
* WIND GUSTS 30 KNOTS OR HIGHER.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "lightning")})
|
||||
* CLOUD TO GROUND LIGHTNING WITHIN 5 NM OF THE AIRPORT.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "hail")})
|
||||
* HAIL OF 1/2 INCH OR GREATER.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "freezingRain")})
|
||||
* ONSET OF FREEZING RAIN.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "sleetSnow")})
|
||||
* ONSET OF ACCUMULATING SLEET OR SNOW.
|
||||
|
||||
#end
|
||||
|
||||
## parse file command here is to pull in mile marker info
|
||||
## #parse("mileMarkers.vm")
|
||||
#end
|
||||
#############
|
||||
## WATCHES ##
|
||||
#############
|
||||
#######################################################################
|
||||
## If sites do not want watches in their AWW product comment out the
|
||||
## section below
|
||||
#######################################################################
|
||||
#if(${list.contains(${includedWatches}, "torWatches")} && ${list.contains(${bullets}, "includeTorWatches")})
|
||||
#inserttorwatches(${watches}, ${list}, ${secondtimezone}, ${dateUtil}, ${timeFormat})
|
||||
|
||||
#end
|
||||
#if(${list.contains(${includedWatches}, "svrWatches")} && ${list.contains(${bullets}, "includeSvrWatches")})
|
||||
#insertsvrwatches(${watches}, ${list}, ${secondtimezone}, ${dateUtil}, ${timeFormat})
|
||||
|
||||
#end
|
||||
|
||||
###printcoords(${areaPoly}, ${list})
|
||||
|
||||
$$
|
||||
|
||||
#parse("forecasterName.vm")
|
|
@ -0,0 +1,263 @@
|
|||
<!-- Airport Weather Warning template -->
|
||||
<!-- created using Huntsville as an example -->
|
||||
<!-- Customized by Phil Kurimski WFO DTX 12 April 2012
|
||||
Updated by Phil Kurimski 12 September 2012 OB12.9.1-12
|
||||
Updated Evan Bookbinder 5-5-13 to change units per Directive -->
|
||||
<warngenConfig>
|
||||
|
||||
<!-- Config distance/speed units -->
|
||||
<unitDistance>nmi</unitDistance>
|
||||
<unitSpeed>kn</unitSpeed>
|
||||
|
||||
<!-- Maps to load on template selection. Refer to 'Maps' menu in CAVE.
|
||||
The various menu items are also the different maps
|
||||
that can be loaded with each template. -->
|
||||
<maps>
|
||||
<map>ACARS Airport Locations</map>
|
||||
<map>Forecast Zones</map>
|
||||
</maps>
|
||||
|
||||
<!-- Followups: VTEC actions of allowable followups when this template is selected -->
|
||||
<followups>
|
||||
</followups>
|
||||
|
||||
<!-- Phensigs: The list of phenomena and significance combinations that this template applies to -->
|
||||
<phensigs>
|
||||
</phensigs>
|
||||
|
||||
<!-- Enables/disables user from selecting the Restart button the GUI -->
|
||||
<enableRestart>true</enableRestart>
|
||||
|
||||
<!-- Enable/disables the system to lock text based on various patterns -->
|
||||
<autoLockText>true</autoLockText>
|
||||
|
||||
<!-- Included watches: If a tornado watch or severe thunderstorm watch is to be
|
||||
included with the warning product include torWatches and/or svrWatches,
|
||||
respectively. Please refer to 'includedWatchAreaBuffer' in <areaConfig/>. -->
|
||||
<includedWatches>
|
||||
<includedWatch>torWatches</includedWatch>
|
||||
<includedWatch>svrWatches</includedWatch>
|
||||
</includedWatches>
|
||||
|
||||
<!-- durations: the list of possible durations of the warning -->
|
||||
<defaultDuration>60</defaultDuration>
|
||||
<durations>
|
||||
<duration>15</duration>
|
||||
<duration>30</duration>
|
||||
<duration>45</duration>
|
||||
<duration>60</duration>
|
||||
<duration>75</duration>
|
||||
<duration>90</duration>
|
||||
<duration>120</duration>
|
||||
<duration>180</duration>
|
||||
<duration>240</duration>
|
||||
<duration>300</duration>
|
||||
</durations>
|
||||
|
||||
<bulletActionGroups>
|
||||
<bulletActionGroup action="NEW">
|
||||
<bullets>
|
||||
<!-- <bullet bulletText="***** CLICK 'CREATE TEXT' BELOW AFTER SELECTING AREA *****" bulletType="title"/> -->
|
||||
<bullet bulletText=" *****Choose Airport*****...(Choose 1) " bulletType="title"/>
|
||||
<bullet bulletName="HSV" bulletText="Huntsville (HSV)" bulletGroup="airport"/>
|
||||
<bullet bulletName="MSL" bulletText="Muscle Shoals (MSL)" bulletGroup="airport"/>
|
||||
<!-- You can add additional airports using the same format above -->
|
||||
<bullet bulletText="" bulletType="title"/>
|
||||
<bullet bulletText=" ****Choose Specific Threats****" bulletType="title"/>
|
||||
<bullet bulletName="wind" bulletText="Convective Wind Gusts"/>
|
||||
<bullet bulletName="lightning" bulletText="Cloud to ground lightning"/>
|
||||
<bullet bulletName="hail" bulletText="Hail"/>
|
||||
<bullet bulletName="freezingRain" bulletText="Freezing Rain"/>
|
||||
<bullet bulletName="sleetSnow" bulletText="Sleet or Snow"/>
|
||||
<!-- You can add additional Threats using the same format above -->
|
||||
<bullet bulletText="" bulletType="title"/>
|
||||
<bullet bulletText=" ****Cancellation Section****" bulletType="title"/>
|
||||
<bullet bulletName="cancelAWW" bulletText="Cancel AWW"/>
|
||||
</bullets>
|
||||
</bulletActionGroup>
|
||||
<bulletActionGroup action="COR">
|
||||
<bullets>
|
||||
<!-- <bullet bulletText="***** CLICK 'CREATE TEXT' BELOW AFTER SELECTING AREA *****" bulletType="title"/> -->
|
||||
<bullet bulletText=" *****Choose Airport*****...(Choose 1) " bulletType="title"/>
|
||||
<bullet bulletName="HSV" bulletText="Huntsville (HSV)" bulletGroup="airport"/>
|
||||
<bullet bulletName="MSL" bulletText="Muscle Shoals (MSL)" bulletGroup="airport"/>
|
||||
<!-- You can add additional airports using the same format above -->
|
||||
<bullet bulletText="" bulletType="title"/>
|
||||
<bullet bulletText=" ****Choose Specific Threats****" bulletType="title"/>
|
||||
<bullet bulletName="wind" bulletText="Convective Wind Gusts"/>
|
||||
<bullet bulletName="lightning" bulletText="Cloud to ground lightning"/>
|
||||
<bullet bulletName="hail" bulletText="Hail"/>
|
||||
<bullet bulletName="freezingRain" bulletText="Freezing Rain"/>
|
||||
<bullet bulletName="sleetSnow" bulletText="Sleet or Snow"/>
|
||||
<!-- You can add additional Threats using the same format above -->
|
||||
<bullet bulletText=" ****Cancellation Section****" bulletType="title"/>
|
||||
<bullet bulletName="cancelAWW" bulletText="Cancel AWW"/>
|
||||
</bullets>
|
||||
</bulletActionGroup>
|
||||
</bulletActionGroups>
|
||||
|
||||
<!-- Four variables below have been changed from the County-coded products -->
|
||||
<!-- areaSource.areaField -->
|
||||
<!-- areaSource.fipsField -->
|
||||
<!-- pathcastConfig.areaField and -->
|
||||
<!-- geospatialConfig.areaSource -->
|
||||
|
||||
<!-- areaSource object to generate county-based information -->
|
||||
<areaSource variable="areas">
|
||||
<areaSource>Zone</areaSource>
|
||||
<inclusionPercent>0</inclusionPercent>
|
||||
<inclusionAndOr>AND</inclusionAndOr>
|
||||
<inclusionArea>0</inclusionArea>
|
||||
<!-- <areaField>COUNTYNAME</areaField> -->
|
||||
<areaField>NAME</areaField>
|
||||
<parentAreaField>NAME</parentAreaField>
|
||||
<areaNotationField>STATE</areaNotationField>
|
||||
<feAreaField>FE_AREA</feAreaField>
|
||||
<timeZoneField>TIME_ZONE</timeZoneField>
|
||||
<areaNotationTranslationFile>countyTypes.txt</areaNotationTranslationFile>
|
||||
<fipsField>STATE_ZONE</fipsField>
|
||||
<!-- <fipsField>FIPS</fipsField> -->
|
||||
<pointField>NAME</pointField>
|
||||
<sortBy>
|
||||
<sort>parent</sort>
|
||||
</sortBy>
|
||||
<pointFilter>
|
||||
<mapping key="WARNGENLEV">
|
||||
<constraint constraintValue="1" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</pointFilter>
|
||||
<includedWatchAreaBuffer>25</includedWatchAreaBuffer>
|
||||
</areaSource>
|
||||
|
||||
<pointSource variable="otherPoints">
|
||||
<pointField>NAME</pointField>
|
||||
<inclusionPercent>1</inclusionPercent>
|
||||
<type>AREA</type>
|
||||
<searchMethod>TRACK</searchMethod>
|
||||
<withinPolygon>true</withinPolygon>
|
||||
<maxResults>10</maxResults>
|
||||
<distanceThreshold>10</distanceThreshold>
|
||||
<sortBy>
|
||||
<sort>distance</sort>
|
||||
</sortBy>
|
||||
<filter>
|
||||
<mapping key="WARNGENLEV">
|
||||
<constraint constraintValue="3,4" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="LANDWATER">
|
||||
<constraint constraintValue="L,LW,LC" constraintType="IN" />
|
||||
</mapping>
|
||||
</filter>
|
||||
</pointSource>
|
||||
|
||||
|
||||
<pointSource variable="closestPoints">
|
||||
<pointField>NAME</pointField>
|
||||
<type>AREA</type>
|
||||
<searchMethod>POINTS</searchMethod>
|
||||
<filter>
|
||||
<mapping key="WARNGENLEV">
|
||||
<constraint constraintValue="1,2" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="LANDWATER">
|
||||
<constraint constraintValue="L,LW,LC" constraintType="IN" />
|
||||
</mapping>
|
||||
</filter>
|
||||
<maxResults>1</maxResults>
|
||||
<distanceThreshold>100</distanceThreshold>
|
||||
<sortBy>
|
||||
<sort>distance</sort>
|
||||
<sort>warngenlev</sort>
|
||||
</sortBy>
|
||||
</pointSource>
|
||||
|
||||
<pointSource variable="otherClosestPoints">
|
||||
<pointField>NAME</pointField>
|
||||
<type>AREA</type>
|
||||
<searchMethod>POINTS</searchMethod>
|
||||
<filter>
|
||||
<mapping key="WARNGENLEV">
|
||||
<constraint constraintValue="1,2" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="LANDWATER">
|
||||
<constraint constraintValue="L,LW,LC" constraintType="IN" />
|
||||
</mapping>
|
||||
</filter>
|
||||
<maxResults>5</maxResults>
|
||||
<distanceThreshold>100</distanceThreshold>
|
||||
<sortBy>
|
||||
<sort>distance</sort>
|
||||
<sort>warngenlev</sort>
|
||||
</sortBy>
|
||||
</pointSource>
|
||||
|
||||
<pathcastConfig>
|
||||
<type>AREA</type>
|
||||
<withinPolygon>true</withinPolygon>
|
||||
<distanceThreshold>8.0</distanceThreshold>
|
||||
<interval>5</interval>
|
||||
<delta>5</delta>
|
||||
<maxResults>10</maxResults>
|
||||
<maxGroup>8</maxGroup>
|
||||
<pointField>Name</pointField>
|
||||
<!-- <areaField>COUNTYNAME</areaField> -->
|
||||
<areaField>NAME</areaField> -->
|
||||
<parentAreaField>STATE</parentAreaField>
|
||||
<areaNotationField>STATE</areaNotationField>
|
||||
<areaNotationTranslationFile>countyTypes.txt</areaNotationTranslationFile>
|
||||
<sortBy>
|
||||
<sort>warngenlev</sort>
|
||||
<sort>population</sort>
|
||||
<sort>distance</sort>
|
||||
</sortBy>
|
||||
<filter>
|
||||
<mapping key="WARNGENLEV">
|
||||
<constraint constraintValue="1,2" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="LANDWATER">
|
||||
<constraint constraintValue="L,LW,LC" constraintType="IN" />
|
||||
</mapping>
|
||||
</filter>
|
||||
</pathcastConfig>
|
||||
|
||||
<pointSource variable="cityList">
|
||||
<pointField>NAME</pointField>
|
||||
<inclusionPercent>1</inclusionPercent>
|
||||
<type>AREA</type>
|
||||
<searchMethod>TRACK</searchMethod>
|
||||
<withinPolygon>true</withinPolygon>
|
||||
<maxResults>20</maxResults>
|
||||
<distanceThreshold>10</distanceThreshold>
|
||||
<filter>
|
||||
<mapping key="WARNGENLEV">
|
||||
<constraint constraintValue="1,2,3" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="LANDWATER">
|
||||
<constraint constraintValue="L,LW,LC" constraintType="IN" />
|
||||
</mapping>
|
||||
</filter>
|
||||
<sortBy>
|
||||
<sort>warngenlev</sort>
|
||||
<sort>population</sort>
|
||||
<sort>distance</sort>
|
||||
</sortBy>
|
||||
</pointSource>
|
||||
|
||||
<!-- this "include file" tag will grab the Mile Marker XML pointSource tags,
|
||||
and place into this template
|
||||
-->
|
||||
<include file="mileMarkers.xml"/>
|
||||
|
||||
|
||||
|
||||
<geospatialConfig>
|
||||
<pointSource>WarnGenLoc</pointSource>
|
||||
<!-- <areaSource>County</areaSource> -->
|
||||
<areaSource>Zone</areaSource>
|
||||
<parentAreaSource>States</parentAreaSource>
|
||||
<timezoneSource>TIMEZONES</timezoneSource>
|
||||
<timezoneField>TIME_ZONE</timezoneField>
|
||||
</geospatialConfig>
|
||||
|
||||
|
||||
</warngenConfig>
|
|
@ -0,0 +1,373 @@
|
|||
######################################################################
|
||||
## BURN SCAR FLASH FLOOD WARNING TEMPLATE FOR COUNTY-BASED PRODUCTS ##
|
||||
######################################################################
|
||||
## CREATED BY Phil Kurimski 2-08-2013 OB13.2.1-5
|
||||
######################################################################
|
||||
## This template can be used for any pre-defined polygon that a site
|
||||
## needs to issue a FFW for outside of a dam break.
|
||||
#################################### SET SOME VARIABLES ###################################
|
||||
#set($hycType = "")
|
||||
#set($burnDrainage = "")
|
||||
#set($burnScar = "")
|
||||
#set($burnCTA = "")
|
||||
##
|
||||
#if(${action} == "EXT")
|
||||
#set($starttime = "000000T0000Z")
|
||||
#set($extend = true)
|
||||
#else
|
||||
#set($starttime = ${dateUtil.format(${start}, ${timeFormat.ymdthmz})})
|
||||
#set($extend = false)
|
||||
#end
|
||||
##
|
||||
#set($ic = "ER")
|
||||
#set($snowMelt = "")
|
||||
#if(${list.contains(${bullets}, "icrs")})
|
||||
#set($ic = "RS")
|
||||
#set($hycType = "RAIN AND SNOW MELT IN...")
|
||||
#set($snowMelt = "RAPID SNOW MELT IS ALSO OCCURRING AND WILL ADD TO THE FLOODING.")
|
||||
#end
|
||||
##
|
||||
${WMOId} ${vtecOffice} 000000 ${BBBId}
|
||||
FFW${siteId}
|
||||
${ugcline}
|
||||
#################################### VTEC LINE ###################################
|
||||
/${productClass}.${action}.${vtecOffice}.FF.W.${etn}.${starttime}-${dateUtil.format(${expire}, ${timeFormat.ymdthmz}, 15)}/
|
||||
/00000.0.${ic}.000000T0000Z.000000T0000Z.000000T0000Z.OO/
|
||||
|
||||
#################################### MND HEADER ###################################
|
||||
BULLETIN - EAS ACTIVATION REQUESTED
|
||||
#if(${productClass}=="T")
|
||||
TEST...FLASH FLOOD WARNING...TEST
|
||||
#else
|
||||
FLASH FLOOD WARNING
|
||||
#end
|
||||
NATIONAL WEATHER SERVICE ${officeShort}
|
||||
#backupText(${backupSite})
|
||||
${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})}
|
||||
|
||||
#if(${productClass}=="T")
|
||||
...THIS MESSAGE IS FOR TEST PURPOSES ONLY...
|
||||
|
||||
#end
|
||||
|
||||
#############################################################################
|
||||
## Flash Flood Emergency Headline -- Coming soon to a warning near you! #
|
||||
#############################################################################
|
||||
###if(${list.contains(${bullets}, "ffwEmergency")} )
|
||||
##...FLASH FLOOD EMERGENCY FOR !** LOCATION **!...
|
||||
##
|
||||
###end
|
||||
#headlineext(${officeLoc}, ${backupSite}, ${extend})
|
||||
|
||||
#################################
|
||||
######## FIRST BULLET ###########
|
||||
#################################
|
||||
* ##
|
||||
#if(${productClass}=="T")
|
||||
THIS IS A TEST MESSAGE. ##
|
||||
#end
|
||||
FLASH FLOOD WARNING FOR...
|
||||
#if(${hycType} != "")
|
||||
<L> ${hycType}</L>
|
||||
#end
|
||||
#firstBullet(${areas})
|
||||
|
||||
#################################
|
||||
####### SECOND BULLET ###########
|
||||
#################################
|
||||
|
||||
* ##
|
||||
#if(${productClass}=="T")
|
||||
THIS IS A TEST MESSAGE. ##
|
||||
#end
|
||||
#secondBullet(${dateUtil},${expire},${timeFormat},${localtimezone},${secondtimezone})
|
||||
|
||||
################################################
|
||||
#################################
|
||||
######## THIRD BULLET ###########
|
||||
#################################
|
||||
#set($report = "HEAVY RAIN IS OCCURRING. !** ADD MORE DETAIL HERE **!")
|
||||
#if(${list.contains(${bullets}, "flash")} )
|
||||
#set($isExpected = "FLASH FLOODING IS ALREADY OCCURRING.")
|
||||
#else
|
||||
#set($isExpected = "FLASH FLOODING IS EXPECTED TO BEGIN SHORTLY.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "burnScar")} )
|
||||
#set($burnScar = "EXCESSIVE RAINFALL OVER THE BURN SCAR WILL RESULT IN DEBRIS FLOW MOVING THROUGH THE !** DRAINAGE **!. THE DEBRIS FLOW CAN CONSIST OF ROCK...MUD...VEGETATION AND OTHER LOOSE MATERIALS.")
|
||||
## #set($burnCTA = "PERSONS IN THE VICINITY OF !** DRAINAGE **! SHOULD EVACUATE IMMEDIATELY.")
|
||||
## #set($ctaSelected = "YES")
|
||||
#elseif(${list.contains(${bullets}, "mudSlide")} )
|
||||
#set($burnScar = "EXCESSIVE RAINFALL OVER THE WARNING AREA WILL CAUSE MUD SLIDES NEAR STEEP TERRAIN. THE MUD SLIDE CAN CONSIST OF ROCK...MUD...VEGETATION AND OTHER LOOSE MATERIALS.")
|
||||
## #set($burnCTA = "PERSONS IN THE VICINITY OF !** DRAINAGE **! SHOULD EVACUATE IMMEDIATELY.")
|
||||
## #set($ctaSelected = "YES")
|
||||
#else
|
||||
#set($burnScar = "")
|
||||
#set($burnCTA = "")
|
||||
#end
|
||||
#set($rainAmount = "")
|
||||
#if(${list.contains(${bullets}, "rain1")} )
|
||||
#set($rainAmount = "UP TO ONE INCH OF RAIN HAS ALREADY FALLEN.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "rain2")} )
|
||||
#set($rainAmount = "UP TO TWO INCHES OF RAIN HAVE ALREADY FALLEN.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "rain3")} )
|
||||
#set($rainAmount = "UP TO THREE INCHES OF RAIN HAVE ALREADY FALLEN.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "rainEdit")} )
|
||||
#set($rainAmount = "!** RAINFALL AMOUNTS **! INCHES OF RAIN HAVE FALLEN.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "doppler")})
|
||||
#set($report = "DOPPLER RADAR INDICATED HEAVY RAIN ACROSS THE WARNED AREA.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "doppler")} && ${list.contains(${bullets}, "thunder")})
|
||||
#set($report = "DOPPLER RADAR INDICATED THUNDERSTORMS PRODUCING HEAVY RAIN ACROSS THE WARNED AREA.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "dopplerGauge")})
|
||||
#set($report = "DOPPLER RADAR AND AUTOMATED RAIN GAUGES INDICATED THAT HEAVY RAIN WAS FALLING OVER THE AREA.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "dopplerGauge")} && ${list.contains(${bullets}, "thunder")})
|
||||
#set($report = "DOPPLER RADAR AND AUTOMATED RAIN GAUGES INDICATED THUNDERSTORMS PRODUCING HEAVY RAIN OVER THE AREA.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "trainedSpotters")})
|
||||
#set($report = "TRAINED WEATHER SPOTTERS REPORTED HEAVY RAIN IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "trainedSpotters")} && ${list.contains(${bullets}, "thunder")})
|
||||
#set($report = "TRAINED WEATHER SPOTTERS REPORTED THUNDERSTORMS PRODUCING HEAVY RAIN IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "trainedSpotters")} && ${list.contains(${bullets}, "flash")})
|
||||
#set($report = "TRAINED WEATHER SPOTTERS REPORTED FLASH FLOODING OCCURRING IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "trainedSpotters")} && ${list.contains(${bullets}, "plainRain")})
|
||||
#set($report = "TRAINED WEATHER SPOTTERS REPORTED HEAVY RAIN IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "public")})
|
||||
#set($report = "THE PUBLIC REPORTED HEAVY RAIN IN !** LOCATION **!")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "public")} && ${list.contains(${bullets}, "thunder")})
|
||||
#set($report = "THE PUBLIC REPORTED HEAVY RAIN FROM THUNDERSTORMS IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "public")} && ${list.contains(${bullets}, "flash")})
|
||||
#set($report = "THE PUBLIC REPORTED FLASH FLOODING OCCURRING IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "public")} && ${list.contains(${bullets}, "plainRain")})
|
||||
#set($report = "THE PUBLIC REPORTED HEAVY RAIN IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "lawEnforcement")})
|
||||
#set($report = "LOCAL LAW ENFORCEMENT REPORTED HEAVY RAIN OVER !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "lawEnforcement")} && ${list.contains(${bullets}, "thunder")})
|
||||
#set($report = "LOCAL LAW ENFORCEMENT REPORTED HEAVY RAIN DUE THUNDERSTORMS OVER !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "lawEnforcement")} && ${list.contains(${bullets}, "flash")})
|
||||
#set($report = "LOCAL LAW ENFORCEMENT REPORTED FLASH FLOODING IS OCCURRING IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "lawEnforcement")} && ${list.contains(${bullets}, "plainRain")})
|
||||
#set($report = "LOCAL LAW ENFORCEMENT REPORTED HEAVY RAIN IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "emergencyManagement")})
|
||||
#set($report = "EMERGENCY MANAGEMENT REPORTED HEAVY RAIN OVER !** LOCATION **! ")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "emergencyManagement")} && ${list.contains(${bullets}, "thunder")})
|
||||
#set($report = "EMERGENCY MANAGEMENT REPORTED HEAVY RAIN DUE TO THUNDERSTORMS OVER !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "emergencyManagement")} && ${list.contains(${bullets}, "flash")})
|
||||
#set($report = "EMERGENCY MANAGEMENT REPORTED FLASH FLOODING IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "emergencyManagement")} && ${list.contains(${bullets}, "plainRain")})
|
||||
#set($report = "EMERGENCY MANAGEMENT REPORTED HEAVY RAIN IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "satellite")})
|
||||
#set($report = "SATELLITE ESTIMATES INDICATED HEAVY RAIN.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "satellite")} && ${list.contains(${bullets}, "thunder")})
|
||||
#set($report = "SATELLITE ESTIMATES INDICATED THUNDERSTORMS PRODUCING HEAVY RAIN OVER THE WARNED AREA.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "satelliteGauge")})
|
||||
#set($report = "SATELLITE ESTIMATES AND AUTOMATED RAIN GAUGES INDICATED THAT HEAVY RAIN WAS FALLING OVER THE WARNED AREA.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "satelliteGauge")} && ${list.contains(${bullets}, "thunder")})
|
||||
#set($report = "SATELLITE ESTIMATES AND AUTOMATED RAIN GAUGES INDICATED THUNDERSTORMS WERE PRODUCING HEAVY RAIN OVER THE WARNED AREA.")
|
||||
#end
|
||||
#########################################################################
|
||||
## Parse command to include a burnScarInfo.vm file with site specific dam
|
||||
## information. Sites can include this information in a separate file or
|
||||
## include in the template per the coding below.
|
||||
#########################################################################
|
||||
#parse ("burnScarInfo.vm")
|
||||
|
||||
* ##
|
||||
#if(${productClass}=="T")
|
||||
THIS IS A TEST MESSAGE. ##
|
||||
#end
|
||||
#thirdBullet(${dateUtil},${event},${timeFormat},${localtimezone},${secondtimezone})...${report} ${rainAmount} ${isExpected} ${snowMelt}
|
||||
|
||||
#wrapText("${burnScar}" 2 2)
|
||||
|
||||
##########################################################################
|
||||
## Flash Flood Emergency per NWS 10-922 Directive goes with third bullet #
|
||||
##########################################################################
|
||||
#if(${list.contains(${bullets}, "ffwEmergency")} )
|
||||
#wrapText("THIS IS A FLASH FLOOD EMERGENCY FOR !** LOCATION **!. SEEK HIGHER GROUND NOW! THIS IS A POTENTIALLY LIFE THREATENING SITUATION!" 2 2)
|
||||
#end
|
||||
|
||||
|
||||
#############################################################
|
||||
######## FOURTH BULLET (OPTIONAL IN FLOOD PRODUCTS) #########
|
||||
#############################################################
|
||||
#if(${list.contains(${bullets}, "listofcities")})
|
||||
#set($phenomena = "FLASH FLOOD")
|
||||
#set($floodType = "FLASH FLOODING")
|
||||
#set($warningType = "WARNING")
|
||||
* ##
|
||||
#if(${productClass}=="T")
|
||||
THIS IS A TEST MESSAGE. ##
|
||||
#end
|
||||
#### THE THIRD ARGUMENT IS A NUMBER SPECIFYING THE NUMBER OF COLUMNS TO OUTPUT THE CITIES LIST IN
|
||||
#### 0 IS A ... SEPARATED LIST, 1 IS ONE PER LINE, >1 IS A COLUMN FORMAT
|
||||
#### IF YOU USE SOMETHING OTHER THAN "LOCATIONS IMPACTED INCLUDE" LEAD IN BELOW, MAKE SURE THE
|
||||
#### ACCOMPANYING XML FILE PARSE STRING IS CHANGED TO MATCH!
|
||||
#locationsList("SOME LOCATIONS THAT WILL EXPERIENCE FLOODING INCLUDE..." ${floodType} 0 ${cityList} ${otherPoints} ${areas} ${dateUtil} ${timeFormat} 0)
|
||||
#end
|
||||
########################################## END OF OPTIONAL FOURTH BULLET ##############################
|
||||
######################################
|
||||
###### WHERE ADDITIONAL INFO GOES ####
|
||||
######################################
|
||||
|
||||
#if(${list.contains(${bullets}, "addRainfall")})
|
||||
ADDITIONAL RAINFALL AMOUNTS OF !** EDIT AMOUNT **! ARE POSSIBLE IN THE WARNED AREA.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "drainages")})
|
||||
#drainages(${riverdrainages})
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "particularStream")})
|
||||
FLOOD WATERS ARE MOVING DOWN !**name of channel**! FROM !**location**! TO !**location**!. THE FLOOD CREST IS EXPECTED TO REACH !**location(s)**! BY !**time(s)**!.
|
||||
|
||||
#end
|
||||
|
||||
#wrapText("${burnDrainage}" 2 2)
|
||||
|
||||
## parse file command here is to pull in mile marker info
|
||||
## #parse("mileMarkers.vm")
|
||||
|
||||
#################################### END OF ADDITIONAL STUFF ###################################
|
||||
######################################
|
||||
####### CALL TO ACTIONS ##############
|
||||
######################################
|
||||
##Check to see if we've selected any calls to action.
|
||||
#foreach (${bullet} in ${bullets})
|
||||
#if(${bullet.endsWith("CTA")})
|
||||
#set($ctaSelected = "YES")
|
||||
#end
|
||||
#end
|
||||
##
|
||||
#if(${ctaSelected} == "YES")
|
||||
PRECAUTIONARY/PREPAREDNESS ACTIONS...
|
||||
|
||||
#end
|
||||
|
||||
${burnCTA}
|
||||
|
||||
#if(${list.contains(${bullets}, "ffwEmergencyCTA")} || ${list.contains(${bullets}, "ffwEmergency")})
|
||||
#if(${list.contains(${bullets}, "ffwEmergency")})
|
||||
MOVE TO HIGHER GROUND NOW. THIS IS AN EXTREMELY DANGEROUS AND LIFE THREATENING SITUATION. DO NOT ATTEMPT TO TRAVEL UNLESS YOU ARE FLEEING AN AREA SUBJECT TO FLOODING OR UNDER AN EVACUATION ORDER.
|
||||
|
||||
#else
|
||||
!** YOU SELECTED THE FLASH FLOOD EMERGENCY CTA WITHOUT SELECTING THE FLASH FLOOD EMERGENCY HEADER. PLEASE CLOSE THIS WINDOW AND RE-GENERATE THIS WARNING **!
|
||||
|
||||
#end
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "actQuicklyCTA")})
|
||||
MOVE TO HIGHER GROUND NOW. ACT QUICKLY TO PROTECT YOUR LIFE.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "childSafetyCTA")})
|
||||
KEEP CHILDREN AWAY FROM STORM DRAINS...CULVERTS...CREEKS AND STREAMS. WATER LEVELS CAN RISE RAPIDLY AND SWEEP CHILDREN AWAY.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "urbanFloodingCTA")})
|
||||
EXCESSIVE RUNOFF FROM HEAVY RAINFALL WILL CAUSE FLOODING OF SMALL CREEKS AND STREAMS...URBAN AREAS...HIGHWAYS...STREETS AND UNDERPASSES AS WELL AS OTHER DRAINAGE AREAS AND LOW LYING SPOTS.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "ruralFloodingCTA")})
|
||||
EXCESSIVE RUNOFF FROM HEAVY RAINFALL WILL CAUSE FLOODING OF SMALL CREEKS AND STREAMS...COUNTRY ROADS...AS WELL AS FARMLAND AS WELL AS OTHER DRAINAGE AREAS AND LOW LYING SPOTS.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "ruralUrbanCTA")})
|
||||
EXCESSIVE RUNOFF FROM HEAVY RAINFALL WILL CAUSE FLOODING OF SMALL CREEKS AND STREAMS...HIGHWAYS AND UNDERPASSES. ADDITIONALLY...COUNTRY ROADS AND FARMLANDS ALONG THE BANKS OF CREEKS...STREAMS AND OTHER LOW LYING AREAS ARE SUBJECT TO FLOODING.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "nighttimeCTA")})
|
||||
BE ESPECIALLY CAUTIOUS AT NIGHT WHEN IT IS HARDER TO RECOGNIZE THE DANGERS OF FLOODING.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "safetyCTA")})
|
||||
DO NOT ENTER OR CROSS FLOWING WATER OR WATER OF UNKNOWN DEPTH.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "stayAwayCTA")})
|
||||
STAY AWAY OR BE SWEPT AWAY. RIVER BANKS AND CULVERTS CAN BECOME UNSTABLE AND UNSAFE.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "dontDriveCTA")})
|
||||
DO NOT DRIVE YOUR VEHICLE INTO AREAS WHERE THE WATER COVERS THE ROADWAY. THE WATER DEPTH MAY BE TOO GREAT TO ALLOW YOUR CAR TO CROSS SAFELY. MOVE TO HIGHER GROUND.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "turnAroundCTA")})
|
||||
TURN AROUND...DONT DROWN WHEN ENCOUNTERING FLOODED ROADS. MOST FLOOD DEATHS OCCUR IN VEHICLES.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "arroyosCTA")})
|
||||
REMAIN ALERT FOR FLOODING EVEN IN LOCATIONS NOT RECEIVING RAIN. ARROYOS...STREAMS AND RIVERS CAN BECOME RAGING KILLER CURRENTS IN A MATTER OF MINUTES...EVEN FROM DISTANT RAINFALL.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "burnAreasCTA")})
|
||||
MOVE AWAY FROM RECENTLY BURNED AREAS. LIFE THREATENING FLOODING OF CREEKS...ROADS AND NORMALLY DRY ARROYOS IS LIKELY. THE HEAVY RAINS WILL LIKELY TRIGGER ROCKSLIDES...MUDSLIDES AND DEBRIS FLOWS IN STEEP TERRAIN...ESPECIALLY IN AND AROUND THESE AREAS.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "autoSafetyCTA")})
|
||||
FLOODING IS OCCURRING OR IS IMMINENT. MOST FLOOD RELATED DEATHS OCCUR IN AUTOMOBILES. DO NOT ATTEMPT TO CROSS WATER COVERED BRIDGES...DIPS...OR LOW WATER CROSSINGS. NEVER TRY TO CROSS A FLOWING STREAM...EVEN A SMALL ONE...ON FOOT. TO ESCAPE RISING WATER FIND ANOTHER ROUTE OVER HIGHER GROUND.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "camperSafetyCTA")})
|
||||
FLOODING IS OCCURRING OR IS IMMINENT. IT IS IMPORTANT TO KNOW WHERE YOU ARE RELATIVE TO STREAMS...RIVERS...OR CREEKS WHICH CAN BECOME KILLERS IN HEAVY RAINS. CAMPERS AND HIKERS SHOULD AVOID STREAMS OR CREEKS.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "lowSpotsCTA")})
|
||||
IN HILLY TERRAIN THERE ARE HUNDREDS OF LOW WATER CROSSINGS WHICH ARE POTENTIALLY DANGEROUS IN HEAVY RAIN. DO NOT ATTEMPT TO TRAVEL ACROSS FLOODED ROADS. FIND AN ALTERNATE ROUTE. IT TAKES ONLY A FEW INCHES OF SWIFTLY FLOWING WATER TO CARRY VEHICLES AWAY.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "ffwMeansCTA")})
|
||||
A FLASH FLOOD WARNING MEANS THAT FLOODING IS IMMINENT OR OCCURRING. IF YOU ARE IN THE WARNING AREA MOVE TO HIGHER GROUND IMMEDIATELY. RESIDENTS LIVING ALONG STREAMS AND CREEKS SHOULD TAKE IMMEDIATE PRECAUTIONS TO PROTECT LIFE AND PROPERTY. DO NOT ATTEMPT TO CROSS SWIFTLY FLOWING WATERS OR WATERS OF UNKNOWN DEPTH BY FOOT OR BY AUTOMOBILE.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "powerFloodCTA")})
|
||||
DO NOT UNDERESTIMATE THE POWER OF FLOOD WATERS. ONLY A FEW INCHES OF RAPIDLY FLOWING WATER CAN QUICKLY CARRY AWAY YOUR VEHICLE.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "reportFloodingCTA")})
|
||||
PLEASE REPORT TO YOUR LOCAL LAW ENFORCEMENT AGENCY WHEN YOU CAN DO SO SAFELY.
|
||||
|
||||
#end
|
||||
#if(${ctaSelected} == "YES")
|
||||
&&
|
||||
|
||||
#end
|
||||
#################################### END OF CTA STUFF ###################################
|
||||
|
||||
##########################################
|
||||
########BOTTOM OF THE PRODUCT#############
|
||||
##########################################
|
||||
|
||||
#if(${productClass}=="T")
|
||||
THIS IS A TEST MESSAGE. DO NOT TAKE ACTION BASED ON THIS MESSAGE.
|
||||
|
||||
#end
|
||||
#printcoords(${areaPoly}, ${list})
|
||||
|
||||
|
||||
$$
|
||||
|
||||
#parse("forecasterName.vm")
|
|
@ -0,0 +1,382 @@
|
|||
<!-- Burn Scar Flash Flood Warning configuration for County-based products-->
|
||||
<!-- This template can be used for any pre-defined polygon that a site needs
|
||||
to issue a FFW for outside of a dam break. -->
|
||||
<!-- Created by Phil Kurimski 02-07-2013 for OB13.2.1-5
|
||||
-->
|
||||
|
||||
<warngenConfig>
|
||||
|
||||
<!-- Config distance/speed units -->
|
||||
<unitDistance>mi</unitDistance>
|
||||
<unitSpeed>mph</unitSpeed>
|
||||
|
||||
<!-- OPTIONAL: Maps to load on template selection. Refer to 'Maps' menu in CAVE.
|
||||
The various menu items are also the different maps
|
||||
that can be loaded with each template. -->
|
||||
<maps>
|
||||
<!-- <map>FFMP Small Stream Basin Links</map> -->
|
||||
<map>County Names</map>
|
||||
<map>County Warning Areas</map>
|
||||
<map>FFMP Small Stream Basin Links</map>
|
||||
<map>Major Rivers</map>
|
||||
</maps>
|
||||
|
||||
<!-- Followups: VTEC actions of allowable followups when this template is selected
|
||||
Each followup will become available when the appropriate time range permits.
|
||||
-->
|
||||
<followups>
|
||||
<followup>NEW</followup>
|
||||
<followup>COR</followup>
|
||||
<followup>EXT</followup>
|
||||
</followups>
|
||||
|
||||
<!-- Phensigs: The list of phenomena and significance combinations that this template applies to -->
|
||||
<phensigs>
|
||||
<phensig>FF.W</phensig>
|
||||
</phensigs>
|
||||
|
||||
<!-- Enables/disables user from selecting the Restart button the GUI -->
|
||||
<enableRestart>true</enableRestart>
|
||||
|
||||
<!-- Enable/disables the system to lock text based on various patterns -->
|
||||
<autoLockText>true</autoLockText>
|
||||
|
||||
<!-- Enables/disables the 'Dam Break Threat Area' button -->
|
||||
<enableDamBreakThreat>true</enableDamBreakThreat>
|
||||
|
||||
<!-- Included watches: If a tornado watch or severe thunderstorm watch is to be
|
||||
included with the warning product include torWatches and/or svrWatches,
|
||||
respectively. Please refer to 'includedWatchAreaBuffer' in <areaConfig/>.
|
||||
<includedWatches>
|
||||
<includedWatch>torWatches</includedWatch>
|
||||
<includedWatch>svrWatches</includedWatch>
|
||||
</includedWatches>
|
||||
-->
|
||||
|
||||
<!-- durations: the list of possible durations of the warning -->
|
||||
<defaultDuration>45</defaultDuration>
|
||||
<durations>
|
||||
<duration>30</duration>
|
||||
<duration>45</duration>
|
||||
<duration>60</duration>
|
||||
<duration>90</duration>
|
||||
<duration>120</duration>
|
||||
<duration>180</duration>
|
||||
<duration>240</duration>
|
||||
<duration>360</duration>
|
||||
<duration>480</duration>
|
||||
</durations>
|
||||
|
||||
<lockedGroupsOnFollowup>ic</lockedGroupsOnFollowup>
|
||||
<bulletActionGroups>
|
||||
<bulletActionGroup action="NEW" phen="FF" sig="W">
|
||||
<bullets>
|
||||
<bullet bulletName="ffwEmergency" bulletText="**SELECT FOR FLASH FLOOD EMERGENCY**" parseString="FLASH FLOOD EMERGENCY"/>
|
||||
<bullet bulletName="icrs" bulletText="Also snow melt" parseString=".RS."/>
|
||||
<bullet bulletText="*********** SOURCE (CHOOSE 1) **********" bulletType="title"/>
|
||||
<bullet bulletName="doppler" bulletText="Doppler radar indicated" bulletGroup="source" bulletDefault="true" parseString="DOPPLER RADAR INDICATED"/>
|
||||
<!--
|
||||
<bullet bulletName="dopplerGauge" bulletText="Doppler radar and automated gauges" bulletGroup="source" parseString="DOPPLER RADAR AND AUTOMATED RAIN GAUGES"/>
|
||||
<bullet bulletName="trainedSpotters" bulletText="Trained spotters reported" bulletGroup="source" parseString="TRAINED WEATHER SPOTTERS REPORTED"/>
|
||||
<bullet bulletName="public" bulletText="Public reported" bulletGroup="source" parseString="THE PUBLIC REPORTED"/>
|
||||
<bullet bulletName="lawEnforcement" bulletText="Local law enforcement reported" bulletGroup="source" parseString="LOCAL LAW ENFORCEMENT REPORTED"/>
|
||||
<bullet bulletName="emergencyManagement" bulletText="Emergency management reported" bulletGroup="source" parseString="EMERGENCY MANAGEMENT REPORTED"/>
|
||||
-->
|
||||
<!-- The following bullets will add satellite and gauges as a source. If you would like to use this
|
||||
in your template uncomment the next few lines. -->
|
||||
<!-- <bullet bulletName="satellite" bulletText="satellite estimates" bulletGroup="source" parseString="SATELLITE ESTIMATES"/>
|
||||
<bullet bulletName="satelliteGauge" bulletText="satellite estimates and automated gauges" bulletGroup="source" parseString="SATELLITE AND "/> -->
|
||||
<bullet bulletText="*********** (OPTIONAL) DEBRIS FLOW INFO **********" bulletType="title"/>
|
||||
<bullet bulletName="burnScar" bulletText="Burn scar area with debris flow" bulletGroup="addevent" parseString="BURN SCAR"/>
|
||||
<bullet bulletName="mudSlide" bulletText="Mud Slides" bulletGroup="addevent" parseString="MUD SLIDE"/>
|
||||
<bullet bulletText="*********** RAIN SO FAR (OPTIONAL) **********" bulletType="title"/>
|
||||
<!--
|
||||
<bullet bulletName="rain1" bulletText="One inch so far" bulletGroup="rainAmt" parseString="ONE INCH"/>
|
||||
<bullet bulletName="rain2" bulletText="Two inches so far" bulletGroup="rainAmt" parseString="TWO INCHES"/>
|
||||
<bullet bulletName="rain3" bulletText="Three inches so far" bulletGroup="rainAmt" parseString="THREE INCHES"/>
|
||||
-->
|
||||
<bullet bulletName="rainEdit" bulletText="User defined amount" bulletGroup="rainAmt" parseString="INCHES OF RAIN HAVE FALLEN"/>
|
||||
<bullet bulletText="*********** ADDITIONAL INFO ***********" bulletType="title"/>
|
||||
<bullet bulletName="listofcities" bulletDefault="true" bulletText="Select for a list of cities" bulletGroup="pcast"/>
|
||||
<!--
|
||||
<bullet bulletName="addRainfall" bulletText="Additional rainfall of XX inches expected" parseString="ADDITIONAL RAINFALL"/>
|
||||
<bullet bulletName="particularStream" bulletText="Flooding is occurring in a particular stream/river" parseString="FLOOD WATERS ARE MOVING DOWN"/>
|
||||
<bullet bulletName="drainages" bulletText="Automated list of drainages" parseString="THIS INCLUDES THE FOLLOWING STREAMS AND DRAINAGES" loadMap="River Drainage Basins"/>
|
||||
-->
|
||||
<bullet bulletText="**** CALL TO ACTIONS (CHOOSE 1 OR MORE) ****" bulletType="title"/>
|
||||
<!-- end all call to action bullets with "CTA" ex: "obviousNameCTA" -->
|
||||
<bullet bulletName="ffwEmergencyCTA" bulletText="**FLASH FLOOD EMERGENCY CTA**" parseString="FLASH FLOOD EMERGENCY"/>
|
||||
<bullet bulletName="actQuicklyCTA" bulletText="Act Quickly..." bulletDefault="true" parseString="HIGHER GROUND NOW. ACT QUICKLY TO PROTECT YOUR LIFE."/>
|
||||
<bullet bulletName="childSafetyCTA" bulletText="Child Safety..." parseString="KEEP CHILDREN AWAY FROM STORM DRAINS"/>
|
||||
<bullet bulletName="nighttimeCTA" bulletText="Nighttime flooding..." parseString="BE ESPECIALLY CAUTIOUS AT NIGHT WHEN"/>
|
||||
<bullet bulletName="safetyCTA" bulletText="Safety...by foot or motorist" parseString="DO NOT ENTER OR CROSS FLOWING WATER"/>
|
||||
<bullet bulletName="turnAroundCTA" bulletText="Turn around...dont drown" parseString="TURN AROUND...DONT DROWN"/>
|
||||
<bullet bulletName="stayAwayCTA" bulletText="Stay away or be swept away" parseString="STAY AWAY OR BE SWEPT AWAY"/>
|
||||
<bullet bulletName="arroyosCTA" bulletText="Arroyos..." parseString="ARROYOS...STREAMS AND RIVERS CAN BECOME RAGING KILLER CURRENTS"/>
|
||||
<bullet bulletName="burnAreasCTA" bulletText="Burn Areas..." parseString="MOVE AWAY FROM RECENTLY BURNED AREAS"/>
|
||||
<bullet bulletName="reportFloodingCTA" bulletText="Report flooding to local law enforcement" parseString="PLEASE REPORT TO YOUR LOCAL LAW ENFORCEMENT AGENCY WHEN YOU CAN"/>
|
||||
<bullet bulletText="************************************************************" bulletType="title"/>
|
||||
<bullet bulletText="* The next section is for sites to load pre-configured *"/>
|
||||
<bullet bulletText="* polygons for burn scars and other scenarios needing *"/>
|
||||
<bullet bulletText="* a flash flood warning. *"/>
|
||||
<bullet bulletText="****** BURN SCAR AREA (Choose BurnArea and Scenario) ******" bulletType="title"/>
|
||||
</bullets>
|
||||
<!-- The following are examples on how to include site specific burn scars in your template
|
||||
You can choose to do this by editing the template and listing each burn scar in the
|
||||
template or listing the burn scars in a separate file and using the include command
|
||||
This can also be done for other flash flood areas that need a pre-defined polygon -->
|
||||
<include file="burnScarInfoBullet.xml"/>
|
||||
<!-- include file="burnScarInfoBullet.xml"/> -->
|
||||
</bulletActionGroup>
|
||||
<bulletActionGroup action="EXT" phen="FF" sig="W">
|
||||
<bullets>
|
||||
<bullet bulletName="ffwEmergency" bulletText="**SELECT FOR FLASH FLOOD EMERGENCY**" parseString="FLASH FLOOD EMERGENCY"/>
|
||||
<bullet bulletName="icrs" bulletText="Also snow melt" parseString=".RS."/>
|
||||
<bullet bulletText="*********** SOURCE (CHOOSE 1) **********" bulletType="title"/>
|
||||
<bullet bulletName="doppler" bulletText="Doppler radar indicated" bulletGroup="source" bulletDefault="true" parseString="DOPPLER RADAR INDICATED"/>
|
||||
<bullet bulletName="dopplerGauge" bulletText="Doppler radar and automated gauges" bulletGroup="source" parseString="DOPPLER RADAR AND AUTOMATED RAIN GAUGES"/>
|
||||
<bullet bulletName="trainedSpotters" bulletText="Trained spotters reported" bulletGroup="source" parseString="TRAINED WEATHER SPOTTERS REPORTED"/>
|
||||
<bullet bulletName="public" bulletText="Public reported" bulletGroup="source" parseString="THE PUBLIC REPORTED"/>
|
||||
<bullet bulletName="lawEnforcement" bulletText="Local law enforcement reported" bulletGroup="source" parseString="LOCAL LAW ENFORCEMENT REPORTED"/>
|
||||
<bullet bulletName="emergencyManagement" bulletText="Emergency management reported" bulletGroup="source" parseString="EMERGENCY MANAGEMENT REPORTED"/>
|
||||
<!-- The following bullets will add satellite and gauges as a source. If you would like to use this
|
||||
in your template uncomment the next few lines. -->
|
||||
<!-- <bullet bulletName="satellite" bulletText="satellite estimates" bulletGroup="source" parseString="SATELLITE ESTIMATES"/>
|
||||
<bullet bulletName="satelliteGauge" bulletText="satellite estimates and automated gauges" bulletGroup="source" parseString="SATELLITE AND "/> -->
|
||||
<bullet bulletText="*********** (OPTIONAL) DEBRIS FLOW INFO **********" bulletType="title"/>
|
||||
<bullet bulletName="burnScar" bulletText="Burn scar area with debris flow" bulletGroup="addevent" parseString="BURN SCAR"/>
|
||||
<bullet bulletName="mudSlide" bulletText="Mud Slides" bulletGroup="addevent" parseString="MUD SLIDE"/>
|
||||
<bullet bulletText="*********** RAIN SO FAR (OPTIONAL) **********" bulletType="title"/>
|
||||
<bullet bulletName="rain1" bulletText="One inch so far" bulletGroup="rainAmt" parseString="ONE INCH"/>
|
||||
<bullet bulletName="rain2" bulletText="Two inches so far" bulletGroup="rainAmt" parseString="TWO INCHES"/>
|
||||
<bullet bulletName="rain3" bulletText="Three inches so far" bulletGroup="rainAmt" parseString="THREE INCHES"/>
|
||||
<bullet bulletName="rainEdit" bulletText="User defined amount" bulletGroup="rainAmt" parseString="INCHES OF RAIN HAVE FALLEN"/>
|
||||
<bullet bulletText="*********** ADDITIONAL INFO ***********" bulletType="title"/>
|
||||
<bullet bulletName="listofcities" bulletText="Select for a list of cities" bulletGroup="pcast" parseString="LOCATIONS IMPACTED INCLUDE" showString="LOCATIONS IMPACTED INCLUDE"/>
|
||||
<bullet bulletName="listofcities" bulletText="Select for a list of cities" bulletGroup="pcast" parseString="LOCATIONS THAT WILL EXPERIENCE FLOODING INCLUDE" showString="LOCATIONS THAT WILL EXPERIENCE FLOODING INCLUDE"/>
|
||||
<bullet bulletName="listofcities" bulletText="Select for a list of cities" bulletGroup="pcast" parseString="LOCATIONS IN THE WARNING INCLUDE" showString="LOCATIONS IN THE WARNING INCLUDE"/>
|
||||
<bullet bulletName="listofcities" bulletText="Select for a list of cities" bulletGroup="pcast" parseString="WILL REMAIN OVER" showString="WILL REMAIN OVER"/>
|
||||
<bullet bulletName="addRainfall" bulletText="Additional rainfall of XX inches expected" parseString="ADDITIONAL RAINFALL"/>
|
||||
<bullet bulletName="particularStream" bulletText="Flooding is occurring in a particular stream/river" parseString="FLOOD WATERS ARE MOVING DOWN"/>
|
||||
<bullet bulletName="drainages" bulletText="Automated list of drainages" parseString="THIS INCLUDES THE FOLLOWING STREAMS AND DRAINAGES" loadMap="River Drainage Basins"/>
|
||||
<bullet bulletText="**** CALL TO ACTIONS (CHOOSE 1 OR MORE) ****" bulletType="title"/>
|
||||
<!-- end all call to action bullets with "CTA" ex: "obviousNameCTA" -->
|
||||
<bullet bulletName="ffwEmergencyCTA" bulletText="**FLASH FLOOD EMERGENCY CTA**" parseString="FLASH FLOOD EMERGENCY"/>
|
||||
<bullet bulletName="actQuicklyCTA" bulletText="Act Quickly..." bulletDefault="true" parseString="HIGHER GROUND NOW. ACT QUICKLY TO PROTECT YOUR LIFE."/>
|
||||
<bullet bulletName="childSafetyCTA" bulletText="Child Safety..." parseString="KEEP CHILDREN AWAY FROM STORM DRAINS"/>
|
||||
<bullet bulletName="nighttimeCTA" bulletText="Nighttime flooding..." parseString="BE ESPECIALLY CAUTIOUS AT NIGHT WHEN"/>
|
||||
<bullet bulletName="safetyCTA" bulletText="Safety...by foot or motorist" parseString="DO NOT ENTER OR CROSS FLOWING WATER"/>
|
||||
<bullet bulletName="turnAroundCTA" bulletText="Turn around...dont drown" parseString="TURN AROUND...DONT DROWN"/>
|
||||
<bullet bulletName="stayAwayCTA" bulletText="Stay away or be swept away" parseString="STAY AWAY OR BE SWEPT AWAY"/>
|
||||
<bullet bulletName="arroyosCTA" bulletText="Arroyos..." parseString="ARROYOS...STREAMS AND RIVERS CAN BECOME RAGING KILLER CURRENTS"/>
|
||||
<bullet bulletName="burnAreasCTA" bulletText="Burn Areas..." parseString="MOVE AWAY FROM RECENTLY BURNED AREAS"/>
|
||||
<bullet bulletName="reportFloodingCTA" bulletText="Report flooding to local law enforcement" parseString="PLEASE REPORT TO YOUR LOCAL LAW ENFORCEMENT AGENCY WHEN YOU CAN"/>
|
||||
<bullet bulletText="************************************************************" bulletType="title"/>
|
||||
<bullet bulletText="* The next section is for sites to load pre-configured *"/>
|
||||
<bullet bulletText="* polygons for burn scars and other scenarios needing *"/>
|
||||
<bullet bulletText="* a flash flood warning. *"/>
|
||||
<bullet bulletText="****** BURN SCAR AREA (Choose 1) ******" bulletType="title"/>
|
||||
</bullets>
|
||||
<!-- The following are examples on how to include site specific burn scars in your template
|
||||
You can choose to do this by editing the template and listing each burn scar in the
|
||||
template or listing the burn scars in a separate file and using the include command
|
||||
This can also be done for other flash flood areas that need a pre-defined polygon -->
|
||||
<include file="burnScarInfoBullet.xml"/>
|
||||
<!-- include file="burnScarInfoBullet.xml"/> -->
|
||||
</bulletActionGroup>
|
||||
<bulletActionGroup action="COR" phen="FF" sig="W">
|
||||
<bullets>
|
||||
<bullet bulletName="ffwEmergency" bulletText="**SELECT FOR FLASH FLOOD EMERGENCY**" parseString="FLASH FLOOD EMERGENCY"/>
|
||||
<bullet bulletName="icrs" bulletText="Also snow melt" parseString=".RS."/>
|
||||
<bullet bulletText="*********** SOURCE (CHOOSE 1) **********" bulletType="title"/>
|
||||
<bullet bulletName="doppler" bulletText="Doppler radar indicated" bulletGroup="source" bulletDefault="true" parseString="DOPPLER RADAR INDICATED"/>
|
||||
<!--
|
||||
<bullet bulletName="dopplerGauge" bulletText="Doppler radar and automated gauges" bulletGroup="source" parseString="DOPPLER RADAR AND AUTOMATED RAIN GAUGES"/>
|
||||
<bullet bulletName="trainedSpotters" bulletText="Trained spotters reported" bulletGroup="source" parseString="TRAINED WEATHER SPOTTERS REPORTED"/>
|
||||
<bullet bulletName="public" bulletText="Public reported" bulletGroup="source" parseString="THE PUBLIC REPORTED"/>
|
||||
<bullet bulletName="lawEnforcement" bulletText="Local law enforcement reported" bulletGroup="source" parseString="LOCAL LAW ENFORCEMENT REPORTED"/>
|
||||
<bullet bulletName="emergencyManagement" bulletText="Emergency management reported" bulletGroup="source" parseString="EMERGENCY MANAGEMENT REPORTED"/>
|
||||
-->
|
||||
<!-- The following bullets will add satellite and gauges as a source. If you would like to use this
|
||||
in your template uncomment the next few lines. -->
|
||||
<!-- <bullet bulletName="satellite" bulletText="satellite estimates" bulletGroup="source" parseString="SATELLITE ESTIMATES"/>
|
||||
<bullet bulletName="satelliteGauge" bulletText="satellite estimates and automated gauges" bulletGroup="source" parseString="SATELLITE AND "/> -->
|
||||
<bullet bulletText="*********** (OPTIONAL) DEBRIS FLOW INFO **********" bulletType="title"/>
|
||||
<bullet bulletName="burnScar" bulletText="Burn scar area with debris flow" bulletGroup="addevent" parseString="BURN SCAR"/>
|
||||
<bullet bulletName="mudSlide" bulletText="Mud Slides" bulletGroup="addevent" parseString="MUD SLIDE"/>
|
||||
<bullet bulletText="*********** RAIN SO FAR (OPTIONAL) **********" bulletType="title"/>
|
||||
<!--
|
||||
<bullet bulletName="rain1" bulletText="One inch so far" bulletGroup="rainAmt" parseString="ONE INCH"/>
|
||||
<bullet bulletName="rain2" bulletText="Two inches so far" bulletGroup="rainAmt" parseString="TWO INCHES"/>
|
||||
<bullet bulletName="rain3" bulletText="Three inches so far" bulletGroup="rainAmt" parseString="THREE INCHES"/>
|
||||
-->
|
||||
<bullet bulletName="rainEdit" bulletText="User defined amount" bulletGroup="rainAmt" parseString="INCHES OF RAIN HAVE FALLEN"/>
|
||||
<bullet bulletText="*********** ADDITIONAL INFO ***********" bulletType="title"/>
|
||||
<bullet bulletName="listofcities" bulletText="Select for a list of cities" bulletGroup="pcast" parseString="LOCATIONS IMPACTED INCLUDE" showString="LOCATIONS IMPACTED INCLUDE"/>
|
||||
<bullet bulletName="listofcities" bulletText="Select for a list of cities" bulletGroup="pcast" parseString="LOCATIONS THAT WILL EXPERIENCE FLOODING INCLUDE" showString="LOCATIONS THAT WILL EXPERIENCE FLOODING INCLUDE"/>
|
||||
<bullet bulletName="listofcities" bulletText="Select for a list of cities" bulletGroup="pcast" parseString="LOCATIONS IN THE WARNING INCLUDE" showString="LOCATIONS IN THE WARNING INCLUDE"/>
|
||||
<bullet bulletName="listofcities" bulletText="Select for a list of cities" bulletGroup="pcast" parseString="WILL REMAIN OVER" showString="WILL REMAIN OVER"/>
|
||||
<bullet bulletName="addRainfall" bulletText="Additional rainfall of XX inches expected" parseString="ADDITIONAL RAINFALL"/>
|
||||
<bullet bulletName="particularStream" bulletText="Flooding is occurring in a particular stream/river" parseString="FLOOD WATERS ARE MOVING DOWN"/>
|
||||
<bullet bulletName="drainages" bulletText="Automated list of drainages" parseString="THIS INCLUDES THE FOLLOWING STREAMS AND DRAINAGES" loadMap="River Drainage Basins"/>
|
||||
|
||||
<bullet bulletText="**** CALL TO ACTIONS (CHOOSE 1 OR MORE) ****" bulletType="title"/>
|
||||
<!-- end all call to action bullets with "CTA" ex: "obviousNameCTA" -->
|
||||
<bullet bulletName="ffwEmergencyCTA" bulletText="**FLASH FLOOD EMERGENCY CTA**" parseString="FLASH FLOOD EMERGENCY"/>
|
||||
<bullet bulletName="actQuicklyCTA" bulletText="Act Quickly..." bulletDefault="true" parseString="HIGHER GROUND NOW. ACT QUICKLY TO PROTECT YOUR LIFE."/>
|
||||
<bullet bulletName="childSafetyCTA" bulletText="Child Safety..." parseString="KEEP CHILDREN AWAY FROM STORM DRAINS"/>
|
||||
<bullet bulletName="nighttimeCTA" bulletText="Nighttime flooding..." parseString="BE ESPECIALLY CAUTIOUS AT NIGHT WHEN"/>
|
||||
<bullet bulletName="safetyCTA" bulletText="Safety...by foot or motorist" parseString="DO NOT ENTER OR CROSS FLOWING WATER"/>
|
||||
<bullet bulletName="turnAroundCTA" bulletText="Turn around...dont drown" parseString="TURN AROUND...DONT DROWN"/>
|
||||
<bullet bulletName="stayAwayCTA" bulletText="Stay away or be swept away" parseString="STAY AWAY OR BE SWEPT AWAY"/>
|
||||
<bullet bulletName="arroyosCTA" bulletText="Arroyos..." parseString="ARROYOS...STREAMS AND RIVERS CAN BECOME RAGING KILLER CURRENTS"/>
|
||||
<bullet bulletName="burnAreasCTA" bulletText="Burn Areas..." parseString="MOVE AWAY FROM RECENTLY BURNED AREAS"/>
|
||||
<bullet bulletName="reportFloodingCTA" bulletText="Report flooding to local law enforcement" parseString="PLEASE REPORT TO YOUR LOCAL LAW ENFORCEMENT AGENCY WHEN YOU CAN"/>
|
||||
<bullet bulletText="************************************************************" bulletType="title"/>
|
||||
<bullet bulletText="* The next section is for sites to load pre-configured *"/>
|
||||
<bullet bulletText="* polygons for burn scars and other scenarios needing *"/>
|
||||
<bullet bulletText="* a flash flood warning. *"/>
|
||||
<bullet bulletText="****** BURN SCAR AREA (Choose 1) ******" bulletType="title"/>
|
||||
</bullets>
|
||||
<!-- The following are examples on how to include site specific burn scars in your template
|
||||
You can choose to do this by editing the template and listing each burn scar in the
|
||||
template or listing the burn scars in a separate file and using the include command
|
||||
This can also be done for other flash flood areas that need a pre-defined polygon -->
|
||||
<include file="burnScarInfoBullet.xml"/>
|
||||
<!-- include file="burnScarInfoBullet.xml"/> -->
|
||||
</bulletActionGroup>
|
||||
</bulletActionGroups>
|
||||
|
||||
<!-- The following are examples on how to include site burnscar locations in your template
|
||||
You can choose to do this by editing the template and listing each dam in the
|
||||
template or listing the dams in a separate file and using the include command -->
|
||||
<include file="burnScarInfoBullet.xml"/>
|
||||
|
||||
|
||||
|
||||
<areaSource variable="areas">
|
||||
<areaSource>County</areaSource>
|
||||
<inclusionPercent>0</inclusionPercent>
|
||||
<inclusionAndOr>AND</inclusionAndOr>
|
||||
<inclusionArea>0</inclusionArea>
|
||||
<areaField>COUNTYNAME</areaField>
|
||||
<!-- <areaField>NAME</areaField> -->
|
||||
<parentAreaField>NAME</parentAreaField>
|
||||
<areaNotationField>STATE</areaNotationField>
|
||||
<feAreaField>FE_AREA</feAreaField>
|
||||
<timeZoneField>TIME_ZONE</timeZoneField>
|
||||
<areaNotationTranslationFile>countyTypes.txt</areaNotationTranslationFile>
|
||||
<fipsField>FIPS</fipsField>
|
||||
<!-- <fipsField>STATE_ZONE</fipsField> -->
|
||||
<pointField>NAME</pointField>
|
||||
<sortBy>
|
||||
<sort>parent</sort>
|
||||
</sortBy>
|
||||
<pointFilter>
|
||||
<mapping key="WARNGENLEV">
|
||||
<constraint constraintValue="1" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</pointFilter>
|
||||
<includedWatchAreaBuffer>25</includedWatchAreaBuffer>
|
||||
</areaSource>
|
||||
|
||||
<!-- Required, but unused in this template -->
|
||||
<pathcastConfig>
|
||||
<withinPolygon>true</withinPolygon>
|
||||
<distanceThreshold>8.0</distanceThreshold>
|
||||
<interval>5</interval>
|
||||
<delta>5</delta>
|
||||
<maxResults>4</maxResults>
|
||||
<maxGroup>8</maxGroup>
|
||||
<pointField>Name</pointField>
|
||||
<type>AREA</type>
|
||||
<areaField>COUNTYNAME</areaField>
|
||||
<!-- <areaField>NAME</areaField> -->
|
||||
<parentAreaField>STATE</parentAreaField>
|
||||
<areaNotationField>STATE</areaNotationField>
|
||||
<areaNotationTranslationFile>countyTypes.txt</areaNotationTranslationFile>
|
||||
<sortBy>
|
||||
<sort>distance</sort>
|
||||
</sortBy>
|
||||
<filter>
|
||||
<mapping key="WARNGENLEV">
|
||||
<constraint constraintValue="1,2" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="LANDWATER">
|
||||
<constraint constraintValue="L" constraintType="IN" />
|
||||
</mapping>
|
||||
</filter>
|
||||
</pathcastConfig>
|
||||
|
||||
<pointSource variable="cityList">
|
||||
<pointField>NAME</pointField>
|
||||
<inclusionPercent>1</inclusionPercent>
|
||||
<type>AREA</type>
|
||||
<searchMethod>POINTS</searchMethod>
|
||||
<withinPolygon>true</withinPolygon>
|
||||
<maxResults>30</maxResults>
|
||||
<distanceThreshold>200</distanceThreshold>
|
||||
<filter>
|
||||
<mapping key="WARNGENLEV">
|
||||
<constraint constraintValue="1,2,3,4" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="LANDWATER">
|
||||
<constraint constraintValue="L,LW,LC" constraintType="IN" />
|
||||
</mapping>
|
||||
</filter>
|
||||
<sortBy>
|
||||
<sort>warngenlev</sort>
|
||||
<sort>population</sort>
|
||||
<sort>distance</sort>
|
||||
</sortBy>
|
||||
</pointSource>
|
||||
|
||||
<!-- Required, but unused in this template -->
|
||||
<pointSource variable="otherPoints">
|
||||
<pointField>NAME</pointField>
|
||||
<type>AREA</type>
|
||||
<searchMethod>POINTS</searchMethod>
|
||||
<withinPolygon>true</withinPolygon>
|
||||
<maxResults>50</maxResults>
|
||||
<distanceThreshold>10</distanceThreshold>
|
||||
<sortBy>
|
||||
<sort>distance</sort>
|
||||
</sortBy>
|
||||
<filter>
|
||||
<mapping key="WARNGENLEV">
|
||||
<constraint constraintValue="3,4" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="LANDWATER">
|
||||
<constraint constraintValue="L" constraintType="IN" />
|
||||
</mapping>
|
||||
</filter>
|
||||
</pointSource>
|
||||
|
||||
<!-- this "include file" tag will grab the Mile Marker XML pointSource tags,
|
||||
and place into this template -->
|
||||
<include file="mileMarkers.xml"/>
|
||||
|
||||
<trackEnabled>false</trackEnabled>
|
||||
|
||||
<geospatialConfig>
|
||||
<pointSource>WarnGenLoc</pointSource>
|
||||
<areaSource>County</areaSource>
|
||||
<!-- <areaSource>Zone</areaSource> -->
|
||||
<parentAreaSource>States</parentAreaSource>
|
||||
<timezoneSource>TIMEZONES</timezoneSource>
|
||||
<timezoneField>TIME_ZONE</timezoneField>
|
||||
</geospatialConfig>
|
||||
|
||||
<pointSource variable="riverdrainages">
|
||||
<pointSource>ffmp_basins</pointSource>
|
||||
<geometryDecimationTolerance>0.064</geometryDecimationTolerance>
|
||||
<pointField>streamname</pointField>
|
||||
<filter>
|
||||
<mapping key="cwa">
|
||||
<constraint constraintValue="$warngenCWAFilter" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</filter>
|
||||
<withinPolygon>true</withinPolygon>
|
||||
</pointSource>
|
||||
|
||||
</warngenConfig>
|
|
@ -0,0 +1,475 @@
|
|||
####################################################
|
||||
## BURN SCAR FLASH FLOOD STATEMENT ##
|
||||
####################################################
|
||||
## CREATED BY Phil Kurimski 2-07-2013 OB13.2.1-5
|
||||
####################################################
|
||||
## This template can be used for any pre-defined polygon that a site
|
||||
## needs to issue a FFW for outside of a dam break.
|
||||
#################################### SET SOME VARs ###################################
|
||||
#set($hycType = "")
|
||||
#set($snowMelt = "")
|
||||
#set($floodReason = "")
|
||||
#set($floodType = "FLASH FLOODING")
|
||||
#set($burnDrainage = "")
|
||||
#set($burnScar = "")
|
||||
#set($burnCTA = "")
|
||||
#set($burnScarEnd = "")
|
||||
###OVERRIDE DEFAULT EXECESSIVE RAINFALL IF NECESSARY
|
||||
#if(${ic} == "RS")
|
||||
#set($hycType = "RAIN AND SNOW MELT")
|
||||
#set($snowMelt = "RAPID SNOW MELT IS ALSO OCCURRING AND WILL ADD TO THE ${floodType}.")
|
||||
#end
|
||||
##
|
||||
#########################################################################
|
||||
## Parse command to include a burnScarInfo.vm file with site specific dam
|
||||
## information. Sites can include this information in a separate file or
|
||||
## include in the template per the coding below.
|
||||
#########################################################################
|
||||
#parse ("burnScarInfo.vm")
|
||||
#set($endwarning = "THE HEAVY RAIN HAS ENDED...AND FLOODING IS NO LONGER EXPECTED TO POSE A THREAT${burnScarEnd}. PLEASE CONTINUE TO HEED ALL ROAD CLOSURES.")
|
||||
#if(${list.contains(${bullets}, "rainEnded")})
|
||||
#set($endwarning = "THE HEAVY RAIN HAS ENDED...AND FLOODING IS NO LONGER EXPECTED TO POSE A THREAT${burnScarEnd}.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "recedingWater")})
|
||||
#set($endwarning = "FLOOD WATERS HAVE RECEDED...AND ARE NO LONGER EXPECTED TO POSE A THREAT TO LIFE OR PROPERTY${burnScarEnd}. PLEASE CONTINUE TO HEED ANY ROAD CLOSURES.")
|
||||
#end
|
||||
######################################################################################
|
||||
${WMOId} ${vtecOffice} 000000 ${BBBId}
|
||||
FFS${siteId}
|
||||
#if(${productClass}=="T")
|
||||
TEST...FLASH FLOOD STATEMENT...TEST
|
||||
#else
|
||||
FLASH FLOOD STATEMENT
|
||||
#end
|
||||
NATIONAL WEATHER SERVICE ${officeShort}
|
||||
#backupText(${backupSite})
|
||||
${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})}
|
||||
|
||||
#if(${action}=="COR" && ${cancelareas})
|
||||
#set($CORCAN = "true")
|
||||
#else
|
||||
#set($CORCAN = "false")
|
||||
#end
|
||||
#if(${action}=="CANCON")
|
||||
${ugclinecan}
|
||||
################### VTEC/COUNTY LINE ##################
|
||||
/${productClass}.CAN.${vtecOffice}.${phenomena}.W.${etn}.000000T0000Z-${dateUtil.format(${expire},${timeFormat.ymdthmz})}/
|
||||
/00000.0.${ic}.000000T0000Z.000000T0000Z.000000T0000Z.OO/
|
||||
#foreach (${area} in ${cancelareas})
|
||||
${area.name} ${area.stateabbr}-##
|
||||
#end
|
||||
#elseif(${CORCAN}=="true")
|
||||
${ugclinecan}
|
||||
################### VTEC/COUNTY LINE ##################
|
||||
/${productClass}.COR.${vtecOffice}.${phenomena}.W.${etn}.000000T0000Z-${dateUtil.format(${expire},${timeFormat.ymdthmz})}/
|
||||
/00000.0.${ic}.000000T0000Z.000000T0000Z.000000T0000Z.OO/
|
||||
#foreach (${area} in ${cancelareas})
|
||||
${area.name} ${area.stateabbr}-##
|
||||
#end
|
||||
#else
|
||||
${ugcline}
|
||||
################### VTEC/COUNTY LINE ##################
|
||||
/${productClass}.${action}.${vtecOffice}.${phenomena}.W.${etn}.000000T0000Z-${dateUtil.format(${expire}, ${timeFormat.ymdthmz}, 15)}/
|
||||
/00000.0.${ic}.000000T0000Z.000000T0000Z.000000T0000Z.OO/
|
||||
#foreach (${area} in ${areas})
|
||||
${area.name} ${area.stateabbr}-##
|
||||
#end
|
||||
#end
|
||||
|
||||
${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})}
|
||||
|
||||
#if(${productClass}=="T")
|
||||
...THIS MESSAGE IS FOR TEST PURPOSES ONLY...
|
||||
|
||||
#end
|
||||
#################################################################
|
||||
#################################################################
|
||||
## LETS START WITH EXPIRATION AND CANCELLATION SEGMENTS #####
|
||||
#################################################################
|
||||
#################################################################
|
||||
### CREATE PHRASING DEPENDING ON WHETHER WE ISSUE EXP PRIOR TO EXPIRATION TIME OR NOT
|
||||
#if(${now.compareTo(${expire})} >= 0 && ${action}=="EXP" )
|
||||
#set($expcanHLTag = "HAS EXPIRED")
|
||||
#set($expcanBODYTag = "HAS BEEN ALLOWED TO EXPIRE")
|
||||
#elseif(${action}=="EXP")
|
||||
#set($expcanHLTag = "WILL EXPIRE AT ${dateUtil.format(${expire}, ${timeFormat.clock}, 15, ${localtimezone})}")
|
||||
#set($expcanBODYTag = "WILL BE ALLOWED TO EXPIRE")
|
||||
#elseif(${action}=="CAN" || ${action}=="CANCON" || ${CORCAN}=="true")
|
||||
#set($expcanHLTag = "IS CANCELLED")
|
||||
#set($expcanBODYTag = "HAS BEEN CANCELLED")
|
||||
#end
|
||||
################################
|
||||
#### CREATE HEADLINES ##########
|
||||
################################
|
||||
##
|
||||
#if(${action}=="EXP" || ${action}=="CAN")
|
||||
...THE FLASH FLOOD WARNING FOR ##
|
||||
#if(${hycType} != "")
|
||||
<L>${hycType}</L> IN ##
|
||||
#end
|
||||
#headlineLocList(${areas} true true true false) ${expcanHLTag}...
|
||||
## SLIGHTLY DIFFERENT VARIABLE FOR PARTIAL CANCELLATION HEADLINE
|
||||
#elseif(${action}=="CANCON" || ${CORCAN}=="true")
|
||||
...THE FLASH FLOOD WARNING FOR ##
|
||||
#if(${hycType} != "")
|
||||
<L>${hycType}</L> IN ##
|
||||
#end
|
||||
#headlineLocList(${cancelareas} true true true false) ${expcanHLTag}...
|
||||
#end
|
||||
############################
|
||||
## END CAN/EXP HEADLINE ####
|
||||
############################
|
||||
#######################################
|
||||
## EXPIRATION/CANCELLATION STATEMENT ##
|
||||
#######################################
|
||||
|
||||
#if(${action}=="EXP" || ${action} == "CAN" || ${action}=="CANCON" || ${CORCAN}=="true")
|
||||
|
||||
${endwarning}
|
||||
|
||||
#printcoords(${areaPoly}, ${list})
|
||||
########### KEEP TWO BLANK LINES BELOW
|
||||
|
||||
|
||||
#end
|
||||
#################################### END OF CAN STUFF ###################################
|
||||
#### IF PARTIAL CANCELLATION, INSERT $$ AND 2ND UGC/MND SECTION PRIOR TO CON PORTION
|
||||
#########################################################################################
|
||||
#if(${action}=="CANCON")
|
||||
|
||||
|
||||
${ugcline}
|
||||
/${productClass}.CON.${vtecOffice}.${phenomena}.W.${etn}.000000T0000Z-${dateUtil.format(${expire}, ${timeFormat.ymdthmz})}/
|
||||
/00000.0.${ic}.000000T0000Z.000000T0000Z.000000T0000Z.OO/
|
||||
#foreach (${area} in ${areas})
|
||||
${area.name} ${area.stateabbr}-##
|
||||
#end
|
||||
|
||||
${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})}
|
||||
|
||||
#if(${productClass}=="T")
|
||||
...THIS MESSAGE IS FOR TEST PURPOSES ONLY...
|
||||
|
||||
#end
|
||||
#elseif(${CORCAN}=="true")
|
||||
|
||||
|
||||
${ugcline}
|
||||
/${productClass}.COR.${vtecOffice}.${phenomena}.W.${etn}.000000T0000Z-${dateUtil.format(${expire}, ${timeFormat.ymdthmz})}/
|
||||
/00000.0.${ic}.000000T0000Z.000000T0000Z.000000T0000Z.OO/
|
||||
#foreach (${area} in ${areas})
|
||||
${area.name} ${area.stateabbr}-##
|
||||
#end
|
||||
|
||||
${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})}
|
||||
|
||||
#if(${productClass}=="T")
|
||||
...THIS MESSAGE IS FOR TEST PURPOSES ONLY...
|
||||
|
||||
#end
|
||||
#end
|
||||
############################
|
||||
## CONTINUATION STATEMENT ##
|
||||
############################
|
||||
#if(${action}=="CANCON" || ${action}=="CON" || ${action}=="COR" || ${CORCAN}=="true")
|
||||
#if(${productClass}=="T")
|
||||
THIS IS A TEST MESSAGE.##
|
||||
#end
|
||||
...THE FLASH FLOOD WARNING ##
|
||||
#if(${hycType} != "")
|
||||
FOR <L>${hycType}</L> ##
|
||||
#end
|
||||
REMAINS IN EFFECT #secondBullet(${dateUtil},${expire},${timeFormat},${localtimezone},${secondtimezone}) FOR ##
|
||||
#headlineLocList(${areas} true true true false)...
|
||||
###############################################################################
|
||||
## Flash Flood Emergency per NWS 10-922 Directive goes after initial headline #
|
||||
###############################################################################
|
||||
#if(${list.contains(${bullets}, "ffwEmergency")})
|
||||
#set($ctaSelected = "YES")
|
||||
|
||||
...THIS IS A FLASH FLOOD EMERGENCY FOR !**ENTER LOCATION**!...
|
||||
|
||||
#end
|
||||
|
||||
################################################
|
||||
#################################
|
||||
######## THIRD BULLET ###########
|
||||
#################################
|
||||
#set($reportType = "HEAVY RAIN")
|
||||
#set($rainAmount = "")
|
||||
#set($report = "HEAVY RAIN IS OCCURRING. !** ADD MORE DETAIL HERE **!")
|
||||
#if(${list.contains(${bullets}, "flash")} )
|
||||
#set($isExpected = "FLASH FLOODING IS ALREADY OCCURRING.")
|
||||
#else
|
||||
#set($isExpected = "FLASH FLOODING IS EXPECTED TO BEGIN SHORTLY.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "burnScar")} )
|
||||
#set($burnScar = "EXCESSIVE RAINFALL OVER THE BURN SCAR WILL RESULT IN DEBRIS FLOW MOVING THROUGH THE !** DRAINAGE **!. THE DEBRIS FLOW CAN CONSIST OF ROCK...MUD...VEGETATION AND OTHER LOOSE MATERIALS.")
|
||||
## #set($burnCTA = "PERSONS IN THE VICINITY OF !** DRAINAGE **! SHOULD EVACUATE IMMEDIATELY.")
|
||||
## #set($ctaSelected = "YES")
|
||||
#elseif(${list.contains(${bullets}, "mudSlide")} )
|
||||
#set($burnScar = "EXCESSIVE RAINFALL OVER THE WARNING AREA WILL CAUSE MUD SLIDES NEAR STEEP TERRAIN. THE MUD SLIDE CAN CONSIST OF ROCK...MUD...VEGETATION AND OTHER LOOSE MATERIALS.")
|
||||
## #set($burnCTA = "PERSONS IN THE VICINITY OF !** DRAINAGE **! SHOULD EVACUATE IMMEDIATELY.")
|
||||
## #set($ctaSelected = "YES")
|
||||
#else
|
||||
#set($burnScar = "")
|
||||
#set($burnCTA = "")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "rain1")} )
|
||||
#set($rainAmount = "UP TO ONE INCH OF RAIN HAS ALREADY FALLEN.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "rain2")} )
|
||||
#set($rainAmount = "UP TO TWO INCHES OF RAIN HAVE ALREADY FALLEN.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "rain3")} )
|
||||
#set($rainAmount = "UP TO THREE INCHES OF RAIN HAVE ALREADY FALLEN.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "rainEdit")} )
|
||||
#set($rainAmount = "!** AMOUNT **! INCHES OF RAIN HAVE FALLEN.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "doppler")})
|
||||
#set($report = "DOPPLER RADAR INDICATED HEAVY RAIN ACROSS THE WARNED AREA.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "doppler")} && ${list.contains(${bullets}, "thunder")})
|
||||
#set($report = "DOPPLER RADAR INDICATED THUNDERSTORMS PRODUCING HEAVY RAIN ACROSS THE WARNED AREA.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "dopplerGauge")})
|
||||
#set($report = "DOPPLER RADAR AND AUTOMATED RAIN GAUGES INDICATED THAT HEAVY RAIN WAS FALLING OVER THE AREA.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "dopplerGauge")} && ${list.contains(${bullets}, "thunder")})
|
||||
#set($report = "DOPPLER RADAR AND AUTOMATED RAIN GAUGES INDICATED THUNDERSTORMS PRODUCING HEAVY RAIN OVER THE WARNED AREA.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "trainedSpotters")})
|
||||
#set($report = "TRAINED WEATHER SPOTTERS REPORTED HEAVY RAIN IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "trainedSpotters")} && ${list.contains(${bullets}, "thunder")})
|
||||
#set($report = "TRAINED WEATHER SPOTTERS REPORTED THUNDERSTORMS PRODUCING HEAVY RAIN IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "trainedSpotters")} && ${list.contains(${bullets}, "flash")})
|
||||
#set($report = "TRAINED WEATHER SPOTTERS REPORTED FLASH FLOODING IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "trainedSpotters")} && ${list.contains(${bullets}, "plainRain")})
|
||||
#set($report = "TRAINED WEATHER SPOTTERS REPORTED HEAVY RAIN IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "lawEnforcement")})
|
||||
#set($report = "LOCAL LAW ENFORCEMENT REPORTED HEAVY RAIN OVER !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "lawEnforcement")} && ${list.contains(${bullets}, "thunder")})
|
||||
#set($report = "LOCAL LAW ENFORCEMENT REPORTED HEAVY RAIN DUE TO A THUNDERSTORM OVER !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "lawEnforcement")} && ${list.contains(${bullets}, "flash")})
|
||||
#set($report = "LOCAL LAW ENFORCEMENT REPORTED FLASH FLOODING IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "lawEnforcement")} && ${list.contains(${bullets}, "plainRain")})
|
||||
#set($report = "LOCAL LAW ENFORCEMENT REPORTED HEAVY RAIN IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "emergencyManagement")})
|
||||
#set($report = "EMERGENCY MANAGEMENT REPORTED HEAVY RAIN OVER !** LOCATION **! ")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "emergencyManagement")} && ${list.contains(${bullets}, "thunder")})
|
||||
#set($report = "EMERGENCY MANAGEMENT REPORTED HEAVY RAIN DUE TO THUNDERSTORMS OVER !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "emergencyManagement")} && ${list.contains(${bullets}, "flash")})
|
||||
#set($report = "EMERGENCY MANAGEMENT REPORTED FLASH FLOODING IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "emergencyManagement")} && ${list.contains(${bullets}, "plainRain")})
|
||||
#set($report = "EMERGENCY MANAGEMENT REPORTED HEAVY RAIN IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "public")})
|
||||
#set($report = "THE PUBLIC REPORTED HEAVY RAIN IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "public")} && ${list.contains(${bullets}, "thunder")})
|
||||
#set($report = "THE PUBLIC REPORTED HEAVY RAIN FROM THUNDERSTORMS IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "public")} && ${list.contains(${bullets}, "flash")})
|
||||
#set($report = "THE PUBLIC REPORTED FLASH FLOODING OCCURRING IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "public")} && ${list.contains(${bullets}, "plainRain")})
|
||||
#set($report = "THE PUBLIC REPORTED HEAVY RAIN IN !** LOCATION **!.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "satellite")})
|
||||
#set($report = "SATELLITE ESTIMATES INDICATED HEAVY RAIN OVER THE WARNED AREA.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "satellite")} && ${list.contains(${bullets}, "thunder")})
|
||||
#set($report = "SATELLITE ESTIMATES INDICATED HEAVY RAIN DUE TO THUNDERSTORMS OVER THE WARNED AREA.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "satelliteGauge")})
|
||||
#set($report = "SATELLITE ESTIMATES AND AUTOMATED RAIN GAUGES INDICATED THAT HEAVY RAIN WAS FALLING OVER THE WARNED AREA.")
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "satelliteGauge")} && ${list.contains(${bullets}, "thunder")})
|
||||
#set($report = "SATELLITE ESTIMATES AND AUTOMATED RAIN GAUGES INDICATED THAT THUNDERSTORMS WERE PRODUCING HEAVY RAIN OVER THE WARNED AREA.")
|
||||
#end
|
||||
#########################################################################
|
||||
## Parse command to include a burnscarInfo.vm file with site specific dam
|
||||
## information. Sites can include this information in a separate file or
|
||||
## include in the template per the coding below.
|
||||
#########################################################################
|
||||
#parse ("burnScarInfo.vm")
|
||||
|
||||
#if(${productClass}=="T")
|
||||
THIS IS A TEST MESSAGE. ##
|
||||
#end
|
||||
#thirdBullet(${dateUtil},${event},${timeFormat},${localtimezone},${secondtimezone})
|
||||
...${report} ${rainAmount} ${isExpected} ${snowMelt}
|
||||
|
||||
${burnScar}
|
||||
|
||||
############################################
|
||||
######## (CITY LIST) #########
|
||||
############################################
|
||||
#if(${list.contains(${bullets}, "listofcities")})
|
||||
#if(${productClass}=="T")
|
||||
THIS IS A TEST MESSAGE. ##
|
||||
#end
|
||||
#### THE THIRD ARGUMENT IS A NUMBER SPECIFYING THE NUMBER OF COLUMNS TO OUTPUT THE CITIES LIST IN
|
||||
#### 0 IS A ... SEPARATED LIST, 1 IS ONE PER LINE, >1 IS A COLUMN FORMAT
|
||||
#### IF YOU USE SOMETHING OTHER THAN "LOCATIONS IMPACTED INCLUDE" LEAD IN BELOW, MAKE SURE THE
|
||||
#### ACCOMPANYING XML FILE PARSE STRING IS CHANGED TO MATCH!
|
||||
#locationsList("SOME LOCATIONS THAT WILL EXPERIENCE FLOODING INCLUDE..." ${floodType} 0 ${cityList} ${otherPoints} ${areas} ${dateUtil} ${timeFormat} 0)
|
||||
|
||||
#end
|
||||
########### KEEP TWO BLANK LINES BELOW
|
||||
|
||||
|
||||
########################################## END OF OPTIONAL FOURTH BULLET ##############################
|
||||
######################################
|
||||
###### WHERE ADDITIONAL INFO GOES ####
|
||||
######################################
|
||||
#if(${list.contains(${bullets}, "addRainfall")})
|
||||
ADDITIONAL RAINFALL AMOUNTS OF !** EDIT AMOUNT **! ARE POSSIBLE IN THE WARNED AREA.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "particularStream")})
|
||||
FLOOD WATERS ARE MOVING DOWN !**name of channel**! FROM !**location**! TO !**location**!. THE FLOOD CREST IS EXPECTED TO REACH !**location(s)**! BY !**time(s)**!.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "drainages")})
|
||||
#drainages(${riverdrainages})
|
||||
|
||||
#end
|
||||
|
||||
${burnDrainage}
|
||||
|
||||
## parse file command here is to pull in mile marker info
|
||||
## #parse("mileMarkers.vm")
|
||||
|
||||
#################################### END OF ADDITIONAL STUFF ###################################
|
||||
######################################
|
||||
####### CALL TO ACTIONS ##############
|
||||
######################################
|
||||
##Check to see if we've selected any calls to action.
|
||||
#foreach (${bullet} in ${bullets})
|
||||
#if(${bullet.endsWith("CTA")})
|
||||
#set($ctaSelected = "YES")
|
||||
#end
|
||||
#end
|
||||
##
|
||||
#if(${ctaSelected} == "YES")
|
||||
PRECAUTIONARY/PREPAREDNESS ACTIONS...
|
||||
|
||||
#end
|
||||
|
||||
${burnCTA}
|
||||
|
||||
#if(${list.contains(${bullets}, "ffwEmergencyCTA")} || ${list.contains(${bullets}, "ffwEmergency")})
|
||||
#if(${list.contains(${bullets}, "ffwEmergency")})
|
||||
MOVE TO HIGHER GROUND NOW. THIS IS AN EXTREMELY DANGEROUS AND LIFE THREATENING SITUATION. DO NOT ATTEMPT TO TRAVEL UNLESS YOU ARE FLEEING AN AREA SUBJECT TO FLOODING OR UNDER AN EVACUATION ORDER.
|
||||
|
||||
#else
|
||||
!** YOU SELECTED THE FLASH FLOOD EMERGENCY CTA WITHOUT SELECTING THE FLASH FLOOD EMERGENCY HEADER. PLEASE CLOSE THIS WINDOW AND RE-GENERATE THIS WARNING **!
|
||||
|
||||
#end
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "actQuicklyCTA")})
|
||||
MOVE TO HIGHER GROUND NOW. ACT QUICKLY TO PROTECT YOUR LIFE.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "childSafetyCTA")})
|
||||
KEEP CHILDREN AWAY FROM STORM DRAINS...CULVERTS...CREEKS AND STREAMS. WATER LEVELS CAN RISE RAPIDLY AND SWEEP CHILDREN AWAY.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "urbanFloodingCTA")})
|
||||
EXCESSIVE RUNOFF FROM HEAVY RAINFALL WILL CAUSE FLOODING OF SMALL CREEKS AND STREAMS...URBAN AREAS...HIGHWAYS...STREETS AND UNDERPASSES AS WELL AS OTHER DRAINAGE AREAS AND LOW LYING SPOTS.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "ruralFloodingCTA")})
|
||||
EXCESSIVE RUNOFF FROM HEAVY RAINFALL WILL CAUSE FLOODING OF SMALL CREEKS AND STREAMS...COUNTRY ROADS...AS WELL AS FARMLAND AS WELL AS OTHER DRAINAGE AREAS AND LOW LYING SPOTS.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "ruralUrbanCTA")})
|
||||
EXCESSIVE RUNOFF FROM HEAVY RAINFALL WILL CAUSE FLOODING OF SMALL CREEKS AND STREAMS...HIGHWAYS AND UNDERPASSES. ADDITIONALLY...COUNTRY ROADS AND FARMLANDS ALONG THE BANKS OF CREEKS...STREAMS AND OTHER LOW LYING AREAS ARE SUBJECT TO FLOODING.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "nighttimeCTA")})
|
||||
BE ESPECIALLY CAUTIOUS AT NIGHT WHEN IT IS HARDER TO RECOGNIZE THE DANGERS OF FLOODING.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "safetyCTA")})
|
||||
DO NOT ENTER OR CROSS FLOWING WATER OR WATER OF UNKNOWN DEPTH.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "stayAwayCTA")})
|
||||
STAY AWAY OR BE SWEPT AWAY. RIVER BANKS AND CULVERTS CAN BECOME UNSTABLE AND UNSAFE.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "dontDriveCTA")})
|
||||
DO NOT DRIVE YOUR VEHICLE INTO AREAS WHERE THE WATER COVERS THE ROADWAY. THE WATER DEPTH MAY BE TOO GREAT TO ALLOW YOUR CAR TO CROSS SAFELY. MOVE TO HIGHER GROUND.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "turnAroundCTA")})
|
||||
TURN AROUND...DONT DROWN WHEN ENCOUNTERING FLOODED ROADS. MOST FLOOD DEATHS OCCUR IN VEHICLES.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "arroyosCTA")})
|
||||
REMAIN ALERT FOR FLOODING EVEN IN LOCATIONS NOT RECEIVING RAIN. ARROYOS...STREAMS AND RIVERS CAN BECOME RAGING KILLER CURRENTS IN A MATTER OF MINUTES...EVEN FROM DISTANT RAINFALL.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "burnAreasCTA")})
|
||||
MOVE AWAY FROM RECENTLY BURNED AREAS. LIFE THREATENING FLOODING OF CREEKS...ROADS AND NORMALLY DRY ARROYOS IS LIKELY. THE HEAVY RAINS WILL LIKELY TRIGGER ROCKSLIDES...MUDSLIDES AND DEBRIS FLOWS IN STEEP TERRAIN...ESPECIALLY IN AND AROUND THESE AREAS.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "autoSafetyCTA")})
|
||||
FLOODING IS OCCURRING OR IS IMMINENT. MOST FLOOD RELATED DEATHS OCCUR IN AUTOMOBILES. DO NOT ATTEMPT TO CROSS WATER COVERED BRIDGES...DIPS...OR LOW WATER CROSSINGS. NEVER TRY TO CROSS A FLOWING STREAM...EVEN A SMALL ONE...ON FOOT. TO ESCAPE RISING WATER FIND ANOTHER ROUTE OVER HIGHER GROUND.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "camperSafetyCTA")})
|
||||
FLOODING IS OCCURRING OR IS IMMINENT. IT IS IMPORTANT TO KNOW WHERE YOU ARE RELATIVE TO STREAMS...RIVERS...OR CREEKS WHICH CAN BECOME KILLERS IN HEAVY RAINS. CAMPERS AND HIKERS SHOULD AVOID STREAMS OR CREEKS.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "lowSpotsCTA")})
|
||||
IN HILLY TERRAIN THERE ARE HUNDREDS OF LOW WATER CROSSINGS WHICH ARE POTENTIALLY DANGEROUS IN HEAVY RAIN. DO NOT ATTEMPT TO TRAVEL ACROSS FLOODED ROADS. FIND AN ALTERNATE ROUTE. IT TAKES ONLY A FEW INCHES OF SWIFTLY FLOWING WATER TO CARRY VEHICLES AWAY.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "ffwMeansCTA")})
|
||||
A FLASH FLOOD WARNING MEANS THAT FLOODING IS IMMINENT OR OCCURRING. IF YOU ARE IN THE WARNING AREA MOVE TO HIGHER GROUND IMMEDIATELY. RESIDENTS LIVING ALONG STREAMS AND CREEKS SHOULD TAKE IMMEDIATE PRECAUTIONS TO PROTECT LIFE AND PROPERTY. DO NOT ATTEMPT TO CROSS SWIFTLY FLOWING WATERS OR WATERS OF UNKNOWN DEPTH BY FOOT OR BY AUTOMOBILE.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "powerFloodCTA")})
|
||||
DO NOT UNDERESTIMATE THE POWER OF FLOOD WATERS. ONLY A FEW INCHES OF RAPIDLY FLOWING WATER CAN QUICKLY CARRY AWAY YOUR VEHICLE.
|
||||
|
||||
#end
|
||||
#if(${list.contains(${bullets}, "reportFloodingCTA")})
|
||||
PLEASE REPORT TO YOUR LOCAL LAW ENFORCEMENT AGENCY WHEN YOU CAN DO SO SAFELY.
|
||||
|
||||
#end
|
||||
#if(${ctaSelected} == "YES")
|
||||
&&
|
||||
|
||||
#end
|
||||
#################################### END OF CTA STUFF ###################################
|
||||
|
||||
##########################################
|
||||
########BOTTOM OF THE PRODUCT#############
|
||||
##########################################
|
||||
#if(${productClass}=="T")
|
||||
THIS IS A TEST MESSAGE. DO NOT TAKE ACTION BASED ON THIS MESSAGE.
|
||||
|
||||
#end
|
||||
#printcoords(${areaPoly}, ${list})
|
||||
########### KEEP TWO BLANK LINES BELOW
|
||||
|
||||
|
||||
#end
|
||||
$$
|
||||
|
||||
#parse("forecasterName.vm")
|
|
@ -0,0 +1,331 @@
|
|||
<!-- Burn Scar Flash Flood Statement configuration for County-based products-->
|
||||
<!-- This template can be used for any pre-defined polygon that a site needs
|
||||
to issue a FFW for outside of a dam break. -->
|
||||
<!-- Created by Phil Kurimski 02-07-2013 for OB13.2.1-5
|
||||
-->
|
||||
|
||||
<warngenConfig>
|
||||
|
||||
<!-- Config distance/speed units -->
|
||||
<unitDistance>mi</unitDistance>
|
||||
<unitSpeed>mph</unitSpeed>
|
||||
|
||||
<!-- Maps to load on template selection. Refer to 'Maps' menu in CAVE.
|
||||
The various menu items are also the different maps
|
||||
that can be loaded with each template. -->
|
||||
<maps>
|
||||
<map>County Names</map>
|
||||
<map>County Warning Areas</map>
|
||||
<!-- <map>FFMP Small Stream Basin Links</map> -->
|
||||
<!-- <map>Major Rivers</map> -->
|
||||
</maps>
|
||||
|
||||
<!-- Followups: VTEC actions of allowable followups when this template is selected
|
||||
Each followup will become available when the appropriate time range permits.
|
||||
-->
|
||||
<followups>
|
||||
<followup>COR</followup>
|
||||
<followup>CON</followup>
|
||||
<followup>CAN</followup>
|
||||
<followup>EXP</followup>
|
||||
</followups>
|
||||
|
||||
<!-- Phensigs: The list of phenomena and significance combinations that this template applies to -->
|
||||
<phensigs>
|
||||
<phensig>FF.W</phensig>
|
||||
</phensigs>
|
||||
|
||||
<!-- Enables/disables user from selecting the Restart button the GUI -->
|
||||
<enableRestart>false</enableRestart>
|
||||
|
||||
<!-- Enable/disables the system to lock text based on various patterns -->
|
||||
<autoLockText>true</autoLockText>
|
||||
|
||||
<!-- durations: the list of possible durations of the warning -->
|
||||
<!-- THE DURATIONS REALLY SERVE NO PURPOSE IN A FOLLOWUP BUT WILL CRASH WARNGEN IF REMVOED -->
|
||||
<defaultDuration>30</defaultDuration>
|
||||
<durations>
|
||||
<duration>30</duration>
|
||||
</durations>
|
||||
|
||||
<lockedGroupsOnFollowup>ic,dam</lockedGroupsOnFollowup>
|
||||
<bulletActionGroups>
|
||||
<bulletActionGroup>
|
||||
<bullets>
|
||||
<bullet bulletText="*********** SELECT A FOLLOWUP **********" bulletType="title"/>
|
||||
</bullets>
|
||||
</bulletActionGroup>
|
||||
<bulletActionGroup action="CAN" phen="FF" sig="W">
|
||||
<bullets>
|
||||
<bullet bulletName="recedingWater" bulletText="Water is receding" />
|
||||
<bullet bulletName="rainEnded" bulletText="Heavy rain ended" />
|
||||
<bullet bulletText="************************************************************" bulletType="title"/>
|
||||
<bullet bulletText="* The next section is for sites to load pre-configured *"/>
|
||||
<bullet bulletText="* polygons for burn scars and other scenarios needing *"/>
|
||||
<bullet bulletText="* a flash flood warning. *"/>
|
||||
<bullet bulletText="****** BURN SCAR AREA (Choose 1) ******" bulletType="title"/>
|
||||
</bullets>
|
||||
<!-- The following are examples on how to include site specific burn scars in your template
|
||||
You can choose to do this by editing the template and listing each burn scar in the
|
||||
template or listing the burn scars in a separate file and using the include command
|
||||
This can also be done for other flash flood areas that need a pre-defined polygon -->
|
||||
<!-- Note that Burn Scar Names NEED to be in the CAN section to produce correct headline wording in the vm file -->
|
||||
<include file="burnScarInfoBulletName.xml"/>
|
||||
<!-- include file="burnScarInfoBullet.xml"/>-->
|
||||
</bulletActionGroup>
|
||||
<bulletActionGroup action="EXP" phen="FF" sig="W">
|
||||
<bullets>
|
||||
<bullet bulletName="recedingWater" bulletText="Water is receding" />
|
||||
<bullet bulletName="rainEnded" bulletText="Heavy rain ended" />
|
||||
<bullet bulletText="************************************************************" bulletType="title"/>
|
||||
<bullet bulletText="* The next section is for sites to load pre-configured *"/>
|
||||
<bullet bulletText="* polygons for burn scars and other scenarios needing *"/>
|
||||
<bullet bulletText="* a flash flood warning. *"/>
|
||||
<bullet bulletText="****** BURN SCAR AREA (Choose 1) ******" bulletType="title"/>
|
||||
</bullets>
|
||||
<!-- The following are examples on how to include site specific burn scars in your template
|
||||
You can choose to do this by editing the template and listing each burn scar in the
|
||||
template or listing the burn scars in a separate file and using the include command
|
||||
This can also be done for other flash flood areas that need a pre-defined polygon -->
|
||||
<!-- Note that Burn Scar Names NEED to be in the CAN section to produce correct headline wording in the vm file -->
|
||||
<include file="burnScarInfoBulletName.xml"/>
|
||||
<!-- include file="burnScarInfoBullet.xml"/>-->
|
||||
</bulletActionGroup>
|
||||
<bulletActionGroup action="CON" phen="FF" sig="W">
|
||||
<bullets>
|
||||
<bullet bulletName="ffwEmergency" bulletText="**SELECT FOR FLASH FLOOD EMERGENCY**" parseString="FLASH FLOOD EMERGENCY"/>
|
||||
<bullet bulletName="icrs" bulletText="Also snow melt" parseString=".RS."/>
|
||||
<bullet bulletText="*********** SOURCE (CHOOSE 1) **********" bulletType="title"/>
|
||||
<bullet bulletName="doppler" bulletText="Doppler radar indicated" bulletGroup="source" bulletDefault="true" parseString="DOPPLER RADAR INDICATED"/>
|
||||
<bullet bulletName="dopplerGauge" bulletText="Doppler radar and automated gauges" bulletGroup="source" parseString="DOPPLER RADAR AND AUTOMATED RAIN GAUGES"/>
|
||||
<bullet bulletName="trainedSpotters" bulletText="Trained spotters reported" bulletGroup="source" parseString="TRAINED WEATHER SPOTTERS REPORTED"/>
|
||||
<bullet bulletName="public" bulletText="Public reported" bulletGroup="source" parseString="THE PUBLIC REPORTED"/>
|
||||
<bullet bulletName="lawEnforcement" bulletText="Local law enforcement reported" bulletGroup="source" parseString="LOCAL LAW ENFORCEMENT REPORTED"/>
|
||||
<bullet bulletName="emergencyManagement" bulletText="Emergency management reported" bulletGroup="source" parseString="EMERGENCY MANAGEMENT REPORTED"/>
|
||||
<!-- The following bullets will add satellite and gauges as a source. If you would like to use this
|
||||
in your template uncomment the next few lines. -->
|
||||
<!-- <bullet bulletName="satellite" bulletText="satellite estimates" bulletGroup="source" parseString="SATELLITE ESTIMATES"/>
|
||||
<bullet bulletName="satelliteGauge" bulletText="satellite estimates and automated gauges" bulletGroup="source" parseString="SATELLITE AND "/> -->
|
||||
<bullet bulletText="*********** (OPTIONAL) DEBRIS FLOW INFO **********" bulletType="title"/>
|
||||
<bullet bulletName="burnScar" bulletText="Burn scar area with debris flow" bulletGroup="addevent" parseString="BURN SCAR"/>
|
||||
<bullet bulletName="mudSlide" bulletText="Mud Slides" bulletGroup="addevent" parseString="MUD SLIDE"/>
|
||||
<bullet bulletText="*********** RAIN SO FAR (OPTIONAL) **********" bulletType="title"/>
|
||||
<bullet bulletName="rain1" bulletText="One inch so far" bulletGroup="rainAmt" parseString="ONE INCH"/>
|
||||
<bullet bulletName="rain2" bulletText="Two inches so far" bulletGroup="rainAmt" parseString="TWO INCHES"/>
|
||||
<bullet bulletName="rain3" bulletText="Three inches so far" bulletGroup="rainAmt" parseString="THREE INCHES"/>
|
||||
<bullet bulletName="rainEdit" bulletText="User defined amount" bulletGroup="rainAmt" parseString="INCHES OF RAIN HAVE FALLEN"/>
|
||||
<bullet bulletText="*********** ADDITIONAL INFO ***********" bulletType="title"/>
|
||||
<bullet bulletName="listofcities" bulletText="Select for a list of cities" bulletGroup="pcast" parseString="LOCATIONS IMPACTED INCLUDE" showString="LOCATIONS IMPACTED INCLUDE"/>
|
||||
<bullet bulletName="listofcities" bulletText="Select for a list of cities" bulletGroup="pcast" parseString="LOCATIONS THAT WILL EXPERIENCE FLOODING INCLUDE" showString="LOCATIONS THAT WILL EXPERIENCE FLOODING INCLUDE"/>
|
||||
<bullet bulletName="listofcities" bulletText="Select for a list of cities" bulletGroup="pcast" parseString="LOCATIONS IN THE WARNING INCLUDE" showString="LOCATIONS IN THE WARNING INCLUDE"/>
|
||||
<bullet bulletName="listofcities" bulletText="Select for a list of cities" bulletGroup="pcast" parseString="WILL REMAIN OVER" showString="WILL REMAIN OVER"/>
|
||||
<bullet bulletName="addRainfall" bulletText="Additional rainfall of XX inches expected" parseString="ADDITIONAL RAINFALL"/>
|
||||
<bullet bulletName="particularStream" bulletText="Flooding is occurring in a particular stream/river" parseString="FLOOD WATERS ARE MOVING DOWN"/>
|
||||
<bullet bulletName="drainages" bulletText="Automated list of drainages" parseString="THIS INCLUDES THE FOLLOWING STREAMS AND DRAINAGES" loadMap="River Drainage Basins"/>
|
||||
<bullet bulletText="**** CALL TO ACTIONS (CHOOSE 1 OR MORE) ****" bulletType="title"/>
|
||||
<!-- end all call to action bullets with "CTA" ex: "obviousNameCTA" -->
|
||||
<bullet bulletName="ffwEmergencyCTA" bulletText="**FLASH FLOOD EMERGENCY CTA**" parseString="FLASH FLOOD EMERGENCY"/>
|
||||
<bullet bulletName="actQuicklyCTA" bulletText="Act Quickly..." parseString="HIGHER GROUND NOW. ACT QUICKLY TO PROTECT YOUR LIFE."/>
|
||||
<bullet bulletName="childSafetyCTA" bulletText="Child Safety..." parseString="KEEP CHILDREN AWAY FROM STORM DRAINS"/>
|
||||
<bullet bulletName="nighttimeCTA" bulletText="Nighttime flooding..." parseString="BE ESPECIALLY CAUTIOUS AT NIGHT WHEN"/>
|
||||
<bullet bulletName="safetyCTA" bulletText="Safety...by foot or motorist" parseString="DO NOT ENTER OR CROSS FLOWING WATER"/>
|
||||
<bullet bulletName="turnAroundCTA" bulletText="Turn around...dont drown" parseString="TURN AROUND...DONT DROWN"/>
|
||||
<bullet bulletName="stayAwayCTA" bulletText="Stay away or be swept away" parseString="STAY AWAY OR BE SWEPT AWAY"/>
|
||||
<bullet bulletName="arroyosCTA" bulletText="Arroyos..." parseString="ARROYOS...STREAMS AND RIVERS CAN BECOME RAGING KILLER CURRENTS"/>
|
||||
<bullet bulletName="burnAreasCTA" bulletText="Burn Areas..." parseString="MOVE AWAY FROM RECENTLY BURNED AREAS"/>
|
||||
<bullet bulletName="reportFloodingCTA" bulletText="Report flooding to local law enforcement" parseString="PLEASE REPORT TO YOUR LOCAL LAW ENFORCEMENT AGENCY WHEN YOU CAN"/>
|
||||
<bullet bulletText="************************************************************" bulletType="title"/>
|
||||
<bullet bulletText="* The next section is for sites to load pre-configured *"/>
|
||||
<bullet bulletText="* polygons for burn scars and other scenarios needing *"/>
|
||||
<bullet bulletText="* a flash flood warning. *"/>
|
||||
<bullet bulletText="****** BURN SCAR AREA (Choose 1) ******" bulletType="title"/>
|
||||
</bullets>
|
||||
<!-- The following are examples on how to include site specific burn scars in your template
|
||||
You can choose to do this by editing the template and listing each burn scar in the
|
||||
template or listing the burn scars in a separate file and using the include command
|
||||
This can also be done for other flash flood areas that need a pre-defined polygon -->
|
||||
<include file="burnScarInfoBullet.xml"/>
|
||||
</bulletActionGroup>
|
||||
<bulletActionGroup action="COR" phen="FF" sig="W">
|
||||
<bullets>
|
||||
<bullet bulletText="**** CORRECTED PRODUCT. CLICK CREATE TEXT ****" bulletType="title"/>
|
||||
<bullet bulletName="ffwEmergency" bulletText="**SELECT FOR FLASH FLOOD EMERGENCY**" parseString="FLASH FLOOD EMERGENCY"/>
|
||||
<bullet bulletName="icrs" bulletText="Also snow melt" parseString=".RS."/>
|
||||
<bullet bulletText="*********** SOURCE (CHOOSE 1) **********" bulletType="title"/>
|
||||
<bullet bulletName="doppler" bulletText="Doppler radar indicated" bulletGroup="source" bulletDefault="true" parseString="DOPPLER RADAR INDICATED"/>
|
||||
<bullet bulletName="dopplerGauge" bulletText="Doppler radar and automated gauges" bulletGroup="source" parseString="DOPPLER RADAR AND AUTOMATED RAIN GAUGES"/>
|
||||
<bullet bulletName="trainedSpotters" bulletText="Trained spotters reported" bulletGroup="source" parseString="TRAINED WEATHER SPOTTERS REPORTED"/>
|
||||
<bullet bulletName="public" bulletText="Public reported" bulletGroup="source" parseString="THE PUBLIC REPORTED"/>
|
||||
<bullet bulletName="lawEnforcement" bulletText="Local law enforcement reported" bulletGroup="source" parseString="LOCAL LAW ENFORCEMENT REPORTED"/>
|
||||
<bullet bulletName="emergencyManagement" bulletText="Emergency management reported" bulletGroup="source" parseString="EMERGENCY MANAGEMENT REPORTED"/>
|
||||
<!-- The following bullets will add satellite and gauges as a source. If you would like to use this
|
||||
in your template uncomment the next few lines. -->
|
||||
<!-- <bullet bulletName="satellite" bulletText="satellite estimates" bulletGroup="source" parseString="SATELLITE ESTIMATES"/>
|
||||
<bullet bulletName="satelliteGauge" bulletText="satellite estimates and automated gauges" bulletGroup="source" parseString="SATELLITE AND "/> -->
|
||||
<bullet bulletText="*********** (OPTIONAL) DEBRIS FLOW INFO **********" bulletType="title"/>
|
||||
<bullet bulletName="burnScar" bulletText="Burn scar area with debris flow" bulletGroup="addevent" parseString="BURN SCAR"/>
|
||||
<bullet bulletName="mudSlide" bulletText="Mud Slides" bulletGroup="addevent" parseString="MUD SLIDE"/>
|
||||
<bullet bulletText="*********** RAIN SO FAR (OPTIONAL) **********" bulletType="title"/>
|
||||
<bullet bulletName="rain1" bulletText="One inch so far" bulletGroup="rainAmt" parseString="ONE INCH"/>
|
||||
<bullet bulletName="rain2" bulletText="Two inches so far" bulletGroup="rainAmt" parseString="TWO INCHES"/>
|
||||
<bullet bulletName="rain3" bulletText="Three inches so far" bulletGroup="rainAmt" parseString="THREE INCHES"/>
|
||||
<bullet bulletName="rainEdit" bulletText="User defined amount" bulletGroup="rainAmt" parseString="INCHES OF RAIN HAVE FALLEN"/>
|
||||
<bullet bulletText="*********** ADDITIONAL INFO ***********" bulletType="title"/>
|
||||
<bullet bulletName="listofcities" bulletText="Select for a list of cities" bulletGroup="pcast" parseString="LOCATIONS IMPACTED INCLUDE" showString="LOCATIONS IMPACTED INCLUDE"/>
|
||||
<bullet bulletName="listofcities" bulletText="Select for a list of cities" bulletGroup="pcast" parseString="LOCATIONS THAT WILL EXPERIENCE FLOODING INCLUDE" showString="LOCATIONS THAT WILL EXPERIENCE FLOODING INCLUDE"/>
|
||||
<bullet bulletName="listofcities" bulletText="Select for a list of cities" bulletGroup="pcast" parseString="LOCATIONS IN THE WARNING INCLUDE" showString="LOCATIONS IN THE WARNING INCLUDE"/>
|
||||
<bullet bulletName="listofcities" bulletText="Select for a list of cities" bulletGroup="pcast" parseString="WILL REMAIN OVER" showString="WILL REMAIN OVER"/>
|
||||
<bullet bulletName="addRainfall" bulletText="Additional rainfall of XX inches expected" parseString="ADDITIONAL RAINFALL"/>
|
||||
<bullet bulletName="particularStream" bulletText="Flooding is occurring in a particular stream/river" parseString="FLOOD WATERS ARE MOVING DOWN"/>
|
||||
<bullet bulletName="drainages" bulletText="Automated list of drainages" parseString="THIS INCLUDES THE FOLLOWING STREAMS AND DRAINAGES" loadMap="River Drainage Basins"/>
|
||||
<bullet bulletText="**** CALL TO ACTIONS (CHOOSE 1 OR MORE) ****" bulletType="title"/>
|
||||
<!-- end all call to action bullets with "CTA" ex: "obviousNameCTA" -->
|
||||
<bullet bulletName="ffwEmergencyCTA" bulletText="**FLASH FLOOD EMERGENCY CTA**" parseString="FLASH FLOOD EMERGENCY"/>
|
||||
<bullet bulletName="actQuicklyCTA" bulletText="Act Quickly..." parseString="HIGHER GROUND NOW. ACT QUICKLY TO PROTECT YOUR LIFE."/>
|
||||
<bullet bulletName="childSafetyCTA" bulletText="Child Safety..." parseString="KEEP CHILDREN AWAY FROM STORM DRAINS"/>
|
||||
<bullet bulletName="nighttimeCTA" bulletText="Nighttime flooding..." parseString="BE ESPECIALLY CAUTIOUS AT NIGHT WHEN"/>
|
||||
<bullet bulletName="safetyCTA" bulletText="Safety...by foot or motorist" parseString="DO NOT ENTER OR CROSS FLOWING WATER"/>
|
||||
<bullet bulletName="turnAroundCTA" bulletText="Turn around...dont drown" parseString="TURN AROUND...DONT DROWN"/>
|
||||
<bullet bulletName="stayAwayCTA" bulletText="Stay away or be swept away" parseString="STAY AWAY OR BE SWEPT AWAY"/>
|
||||
<bullet bulletName="arroyosCTA" bulletText="Arroyos..." parseString="ARROYOS...STREAMS AND RIVERS CAN BECOME RAGING KILLER CURRENTS"/>
|
||||
<bullet bulletName="burnAreasCTA" bulletText="Burn Areas..." parseString="MOVE AWAY FROM RECENTLY BURNED AREAS"/>
|
||||
<bullet bulletName="reportFloodingCTA" bulletText="Report flooding to local law enforcement" parseString="PLEASE REPORT TO YOUR LOCAL LAW ENFORCEMENT AGENCY WHEN YOU CAN"/>
|
||||
<bullet bulletText="************************************************************" bulletType="title"/>
|
||||
<bullet bulletText="* The next section is for sites to load pre-configured *"/>
|
||||
<bullet bulletText="* polygons for burn scars and other scenarios needing *"/>
|
||||
<bullet bulletText="* a flash flood warning. *"/>
|
||||
<bullet bulletText="****** BURN SCAR AREA (Choose 1) ******" bulletType="title"/>
|
||||
</bullets>
|
||||
<!-- The following are examples on how to include site specific burn scars in your template
|
||||
You can choose to do this by editing the template and listing each burn scar in the
|
||||
template or listing the burn scars in a separate file and using the include command
|
||||
This can also be done for other flash flood areas that need a pre-defined polygon -->
|
||||
<include file="burnScarInfoBullet.xml"/>
|
||||
</bulletActionGroup>
|
||||
</bulletActionGroups>
|
||||
|
||||
<trackEnabled>false</trackEnabled>
|
||||
|
||||
<!-- areaSource object to generate county-based information -->
|
||||
<areaSource variable="areas">
|
||||
<areaSource>County</areaSource>
|
||||
<inclusionPercent>0</inclusionPercent>
|
||||
<inclusionAndOr>AND</inclusionAndOr>
|
||||
<inclusionArea>0</inclusionArea>
|
||||
<areaField>COUNTYNAME</areaField>
|
||||
<parentAreaField>NAME</parentAreaField>
|
||||
<areaNotationField>STATE</areaNotationField>
|
||||
<feAreaField>FE_AREA</feAreaField>
|
||||
<timeZoneField>TIME_ZONE</timeZoneField>
|
||||
<areaNotationTranslationFile>countyTypes.txt</areaNotationTranslationFile>
|
||||
<fipsField>FIPS</fipsField>
|
||||
<pointField>NAME</pointField>
|
||||
<sortBy>
|
||||
<sort>parent</sort>
|
||||
</sortBy>
|
||||
<pointFilter>
|
||||
<mapping key="WARNGENLEV">
|
||||
<constraint constraintValue="1" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</pointFilter>
|
||||
<includedWatchAreaBuffer>25</includedWatchAreaBuffer>
|
||||
</areaSource>
|
||||
|
||||
<!-- Required, but unused by this template -->
|
||||
<pathcastConfig>
|
||||
<withinPolygon>true</withinPolygon>
|
||||
<distanceThreshold>8.0</distanceThreshold>
|
||||
<interval>5</interval>
|
||||
<delta>5</delta>
|
||||
<maxResults>4</maxResults>
|
||||
<maxGroup>8</maxGroup>
|
||||
<pointField>Name</pointField>
|
||||
<type>AREA</type>
|
||||
<areaField>COUNTYNAME</areaField>
|
||||
<!-- <areaField>NAME</areaField> -->
|
||||
<parentAreaField>STATE</parentAreaField>
|
||||
<areaNotationField>STATE</areaNotationField>
|
||||
<areaNotationTranslationFile>countyTypes.txt</areaNotationTranslationFile>
|
||||
<sortBy>
|
||||
<sort>distance</sort>
|
||||
</sortBy>
|
||||
<filter>
|
||||
<mapping key="WARNGENLEV">
|
||||
<constraint constraintValue="1,2" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="LANDWATER">
|
||||
<constraint constraintValue="L" constraintType="IN" />
|
||||
</mapping>
|
||||
</filter>
|
||||
</pathcastConfig>
|
||||
|
||||
<pointSource variable="cityList">
|
||||
<pointField>NAME</pointField>
|
||||
<inclusionPercent>1</inclusionPercent>
|
||||
<type>AREA</type>
|
||||
<searchMethod>POINTS</searchMethod>
|
||||
<withinPolygon>true</withinPolygon>
|
||||
<maxResults>30</maxResults>
|
||||
<distanceThreshold>200</distanceThreshold>
|
||||
<filter>
|
||||
<mapping key="WARNGENLEV">
|
||||
<constraint constraintValue="1,2,3,4" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="LANDWATER">
|
||||
<constraint constraintValue="L,LW,LC" constraintType="IN" />
|
||||
</mapping>
|
||||
</filter>
|
||||
<sortBy>
|
||||
<sort>warngenlev</sort>
|
||||
<sort>population</sort>
|
||||
<sort>distance</sort>
|
||||
</sortBy>
|
||||
</pointSource>
|
||||
|
||||
<!-- Required, but unused by this template -->
|
||||
<pointSource variable="otherPoints">
|
||||
<pointField>NAME</pointField>
|
||||
<type>AREA</type>
|
||||
<searchMethod>POINTS</searchMethod>
|
||||
<withinPolygon>true</withinPolygon>
|
||||
<maxResults>10</maxResults>
|
||||
<distanceThreshold>200</distanceThreshold>
|
||||
<sortBy>
|
||||
<sort>name</sort>
|
||||
</sortBy>
|
||||
<filter>
|
||||
<mapping key="WARNGENLEV">
|
||||
<constraint constraintValue="3,4" constraintType="IN" />
|
||||
</mapping>
|
||||
<mapping key="LANDWATER">
|
||||
<constraint constraintValue="L" constraintType="IN" />
|
||||
</mapping>
|
||||
</filter>
|
||||
</pointSource>
|
||||
|
||||
<!-- this "include file" tag will grab the Mile Marker XML pointSource tags,
|
||||
and place into this template -->
|
||||
<include file="mileMarkers.xml"/>
|
||||
|
||||
<geospatialConfig>
|
||||
<pointSource>WarnGenLoc</pointSource>
|
||||
<areaSource>County</areaSource>
|
||||
<!-- <areaSource>Zone</areaSource> -->
|
||||
<parentAreaSource>States</parentAreaSource>
|
||||
<timezoneSource>TIMEZONES</timezoneSource>
|
||||
<timezoneField>TIME_ZONE</timezoneField>
|
||||
</geospatialConfig>
|
||||
|
||||
<pointSource variable="riverdrainages">
|
||||
<pointSource>ffmp_basins</pointSource>
|
||||
<geometryDecimationTolerance>0.064</geometryDecimationTolerance>
|
||||
<pointField>streamname</pointField>
|
||||
<filter>
|
||||
<mapping key="cwa">
|
||||
<constraint constraintValue="$warngenCWAFilter" constraintType="EQUALS" />
|
||||
</mapping>
|
||||
</filter>
|
||||
<withinPolygon>true</withinPolygon>
|
||||
</pointSource>
|
||||
|
||||
</warngenConfig>
|
|
@ -0,0 +1,34 @@
|
|||
#########################################################################
|
||||
## The next section is for site specific burn scars and other areas that
|
||||
## need a pre-defined polygon for a FFW. Each site should take the
|
||||
## example below and customize it with the information they used in
|
||||
## AWIPS 1. The following is an example of a burn scar area for a
|
||||
## pre-defined polygon in Boulders (BOU) cwa.
|
||||
## If you have any questions please contact Phil Kurimski - WFO DTX
|
||||
#########################################################################
|
||||
#*
|
||||
#if(${list.contains($bullets, "FourMileBurnArea")})
|
||||
#set($burnScarName = "FOUR MILE BURN AREA")
|
||||
#set($burnScarEnd = " OVER THE FOUR MILE BURN AREA")
|
||||
#end
|
||||
#if(${list.contains($bullets, "fourmilelowimpact")})
|
||||
#set($ctaSelected = "YES")
|
||||
#set($burnScar = "THIS IS A LIFE THREATENING SITUATION. HEAVY RAINFALL WILL CAUSE EXTENSIVE AND SEVERE FLASH FLOODING OF CREEKS...STREAMS...AND DITCHES IN THE FOURMILE BURN AREA.")
|
||||
#set($burnDrainage = "SOME DRAINAGE BASINS IMPACTED INCLUDE FOURMILE CREEK...GOLD RUN...AND FOURMILE CANYON CREEK.")
|
||||
#set($burnCTA = "THIS IS A LIFE THREATENING SITUATION. HEAVY RAINFALL WILL CAUSE EXTENSIVE AND SEVERE FLASH FLOODING OF CREEKS...STREAMS...AND DITCHES IN THE FOURMILE BURN AREA. SOME DRAINAGE BASINS IMPACTED INCLUDE FOURMILE CREEK...GOLD RUN...AND FOURMILE CANYON CREEK. SEVERE DEBRIS FLOWS CAN ALSO BE ANTICIPATED ACROSS ROADS. ROADS AND DRIVEWAYS MAY BE WASHED AWAY IN PLACES. IF YOU ENCOUNTER FLOOD WATERS...CLIMB TO SAFETY.")
|
||||
#end
|
||||
#if(${list.contains($bullets, "fourmilehighimpact")})
|
||||
#set($ctaSelected = "YES")
|
||||
#set($burnScar = "THIS IS A LIFE THREATENING SITUATION FOR PEOPLE ALONG BOULDER CREEK IN THE CITY OF BOULDER...IN THE FOURMILE BURN AREA...AND IN BOULDER CANYON. HEAVY RAINFALL WILL CAUSE EXTENSIVE AND SEVERE FLASH FLOODING OF CREEKS AND STREAMS FROM THE FOURMILE BURN AREA DOWNSTREAM THROUGH THE CITY OF BOULDER.")
|
||||
#set($burnDrainage = "SOME DRAINAGE BASINS IMPACTED INCLUDE BOULDER CREEK...FOURMILE CREEK...GOLD RUN...FOURMILE CANYON CREEK...AND WONDERLAND CREEK.")
|
||||
#set($burnCTA = "THIS IS A LIFE THREATENING SITUATION FOR PEOPLE ALONG BOULDER CREEK IN THE CITY OF BOULDER...IN THE FOURMILE BURN AREA...AND IN BOULDER CANYON. HEAVY RAINFALL WILL CAUSE EXTENSIVE AND SEVERE FLASH FLOODING OF CREEKS AND STREAMS FROM THE FOURMILE BURN AREA DOWNSTREAM THROUGH THE CITY OF BOULDER. SOME DRAINAGE BASINS IMPACTED INCLUDE BOULDER CREEK...FOURMILE CREEK...GOLD RUN...FOURMILE CANYON CREEK...AND WONDERLAND CREEK. SEVERE DEBRIS FLOWS CAN ALSO BE ANTICIPATED ACROSS ROADS. ROADWAYS AND BRIDGES MAY BE WASHED AWAY IN PLACES. IF YOU ENCOUNTER FLOOD WATERS...CLIMB TO SAFETY.")
|
||||
#end
|
||||
*#
|
||||
#########################################################
|
||||
## End of example
|
||||
#########################################################
|
||||
|
||||
#######################################################################
|
||||
## End of Site Specific Burn Scar Information
|
||||
#######################################################################
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
<!-- The following is an example on how to set up the bullets for a site
|
||||
specific burnscar location -->
|
||||
<!-- Notice we use many of the same bullet names as the dam break template.
|
||||
This is done in order to get WarnGen to read in the lat/lon box.
|
||||
This process can be done for any pre-configured FFW box. -->
|
||||
<!--
|
||||
<damInfoBullets>
|
||||
<damInfoBullet bulletGroup="dam" bulletText="FourMile Burn Area" bulletName="FourMileBurnArea" parseString="FOURMILE BURN AREA" showString="FOURMILE BURN AREA" coords="LAT...LON 4006 10542 4008 10537 4005 10535 4002 10540"/>
|
||||
<damInfoBullet bulletGroup="burnscenario" bulletName="fourmilelowimpact" bulletText="scenario - low impact" parseString="RAINFALL WILL CAUSE FLASH" showString="FOURMILE BURN AREA"/>
|
||||
<damInfoBullet bulletGroup="burnscenario" bulletName="fourmilehighimpact" bulletText="scenario - high impact" parseString="SEVERE FLASH FLOODING OF CREEKS...STREAMS" showString="FOURMILE BURN AREA"/>
|
||||
</damInfoBullets>
|
||||
-->
|
||||
<!-- End of example. Begin your site specific information here. -->
|
|
@ -0,0 +1,12 @@
|
|||
<!-- The following is an example on how to set up the bullets for a site
|
||||
specific burnscar location for CAN/EXP sections where you only want
|
||||
the name of the burn scar and not the scenarios -->
|
||||
<!-- Notice we use many of the same bullet names as the dam break template.
|
||||
This is done in order to get WarnGen to read in the lat/lon box.
|
||||
This process can be done for any pre-configured FFW box. -->
|
||||
<!--
|
||||
<damInfoBullets>
|
||||
<damInfoBullet bulletGroup="dam" bulletText="FourMile Burn Area" bulletName="FourMileBurnArea" parseString="FOURMILE BURN AREA" showString="FOURMILE BURN AREA" coords="LAT...LON 4006 10542 4008 10537 4005 10535 4002 10540"/>
|
||||
</damInfoBullets>
|
||||
-->
|
||||
<!-- End of example. Begin your site specific information here. -->
|
|
@ -0,0 +1,115 @@
|
|||
################################################################
|
||||
## IBW IMPACT STATEMENTS ##
|
||||
## FOR CR IMPACT BASED TOR/SVR INITIATIVE ##
|
||||
## CREATED BY PHIL KURIMSKI - WFO DTX ##
|
||||
## VERSION AWIPS II 1.0 -- 2-06-2013 OB13.2.1-5 ##
|
||||
## EDITED EVAN BOOKBINDER 2-25-13 FOR IBW 2013 ##
|
||||
## EDITED PHIL KURIMSKI 5-20-13 FOR UPDATED IMPACT STATEMENTS ##
|
||||
################################################################
|
||||
##
|
||||
################################################################
|
||||
## This file is meant to be parsed into the IBW templates
|
||||
## Changes to the IBW Impact Statements can be made to this
|
||||
## file without making changes to the main template
|
||||
################################################################
|
||||
##SET SOME INITIAL VARIABLES
|
||||
#set ($svrimpact = "")
|
||||
#set ($torimpact = "")
|
||||
################################################################
|
||||
## First create the Impact Statements for the SVR template
|
||||
################################################################
|
||||
###################################################
|
||||
## HANDLE WIND POSSIBILITIES ######################
|
||||
###################################################
|
||||
#set ($windImpact = "")
|
||||
#if(${windSpeed} == 60)
|
||||
#set ($windImpact = "EXPECT DAMAGE TO ROOFS...SIDING AND TREES.")
|
||||
#set ($windImpactComb = "EXPECT WIND DAMAGE TO ROOFS...SIDING AND TREES.")
|
||||
#end
|
||||
#if(${windSpeed} == 70)
|
||||
#set ($windImpact = "EXPECT CONSIDERABLE TREE DAMAGE. DAMAGE IS LIKELY TO MOBILE HOMES...ROOFS AND OUTBUILDINGS.")
|
||||
#set ($windImpactComb = "EXPECT CONSIDERABLE TREE DAMAGE. WIND DAMAGE IS ALSO LIKELY TO MOBILE HOMES...ROOFS AND OUTBUILDINGS.")
|
||||
#end
|
||||
#if(${windSpeed} == 80)
|
||||
#set ($windImpact = "MOBILE HOMES WILL BE HEAVILY DAMAGED. FLYING DEBRIS WILL BE DANGEROUS TO PEOPLE AND ANIMALS. EXPECT CONSIDERABLE DAMAGE TO ROOFS...WINDOWS AND VEHICLES. EXTENSIVE TREE DAMAGE AND POWER OUTAGES ARE LIKELY.")
|
||||
#end
|
||||
#if(${windSpeed} == 90)
|
||||
#set ($windImpact ="YOU ARE IN A LIFE-THREATENING SITUATION. MOBILE HOMES WILL BE HEAVILY DAMAGED OR DESTROYED. HOMES AND BUSINESSES WILL HAVE SUBSTANTIAL ROOF AND WINDOW DAMAGE. FLYING DEBRIS WILL BE DEADLY TO PEOPLE AND ANIMALS. EXPECT EXTENSIVE TREE DAMAGE AND POWER OUTAGES.")
|
||||
#end
|
||||
#if(${windSpeed} == 100)
|
||||
#set ($windImpact ="YOU ARE IN A LIFE-THREATENING SITUATION. MOBILE HOMES WILL BE DESTROYED. EXPECT CONSIDERABLE DAMAGE TO HOMES AND BUSINESSES. FLYING DEBRIS WILL BE DEADLY TO PEOPLE AND ANIMALS. EXPECT EXTENSIVE TREE DAMAGE AND POWER OUTAGES.")
|
||||
#end
|
||||
###################################################
|
||||
## HANDLE HAIL POSSIBILITIES ######################
|
||||
###################################################
|
||||
#set ($hailImpact = "")
|
||||
#if(${hailSize} < 1.50 && ${hailSize} >= 1)
|
||||
#set ($hailImpact = "DAMAGE TO VEHICLES IS EXPECTED.")
|
||||
#set ($hailImpactComb = "HAIL DAMAGE TO VEHICLES IS EXPECTED.")
|
||||
#end
|
||||
#if(${hailSize} >= 1.50 && ${hailSize} < 2.75)
|
||||
#set ($hailImpact = "PEOPLE AND ANIMALS OUTDOORS WILL BE INJURED. EXPECT DAMAGE TO ROOFS...SIDING...WINDOWS AND VEHICLES.")
|
||||
#set ($hailImpactComb = "PEOPLE AND ANIMALS OUTDOORS WILL BE INJURED. EXPECT HAIL DAMAGE TO ROOFS...SIDING...WINDOWS AND VEHICLES.")
|
||||
#end
|
||||
#if(${hailSize} >= 2.75)
|
||||
#set ($hailImpact = "PEOPLE AND ANIMALS OUTDOORS WILL BE SEVERELY INJURED. EXPECT SHATTERED WINDOWS...EXTENSIVE DAMAGE TO ROOFS...SIDING AND VEHICLES.")
|
||||
#end
|
||||
######################################################################
|
||||
## Setup wind/hail impact statement based on wind speed and hail size
|
||||
######################################################################
|
||||
#if (${hailSize} < 1 && ${windSpeed} < 58)
|
||||
#set ($svrimpact = "!**YOU DID NOT SELECT ANY SEVERE WIND OR HAIL THREATS. PLEASE CLOSE THIS WINDOW AND RE-GENERATE THIS WARNING!**!")
|
||||
#elseif(${hailSize} >= 1 && ${windSpeed} < 58)
|
||||
#set ($svrimpact = "${hailImpact}")
|
||||
#elseif(${hailSize} < 1 && ${windSpeed} >= 58)
|
||||
#set ($svrimpact = "${windImpact}")
|
||||
#elseif(${hailSize} >= 1 && ${windSpeed} < 80 && ${hailSize} < 2.75)
|
||||
#set ($svrimpact = "${hailImpactComb} ${windImpactComb}")
|
||||
#elseif(${hailSize} > 2.50 && ${windSpeed} < 80)
|
||||
#set ($svrimpact = "${hailImpact}")
|
||||
#elseif(${windSpeed} >= 80)
|
||||
#set ($svrimpact = "${windImpact}")
|
||||
#end
|
||||
################################################################
|
||||
## Now create the Impact Statements for the TOR template
|
||||
################################################################
|
||||
## The following is the base Tornado Impact Statement
|
||||
################################################################
|
||||
#set ($torimpact = "MOBILE HOMES WILL BE DAMAGED OR DESTROYED. DAMAGE TO ROOFS...WINDOWS AND VEHICLES WILL OCCUR. FLYING DEBRIS WILL BE DEADLY TO PEOPLE AND ANIMALS. TREE DAMAGE IS LIKELY.")
|
||||
################################################################
|
||||
## IF A LANDSPOUT/VERY WEAK TORNADO IS SELECTED THE FOLLOWING
|
||||
## IMPACT STATEMENT WILL BE USED WITH TONED DOWN WORDING
|
||||
################################################################
|
||||
#if(${list.contains($bullets, "landspoutTornado")})
|
||||
#set ($torimpact = "SPORADIC DAMAGE TO MOBILE HOMES...ROOFS AND VEHICLES.")
|
||||
#end
|
||||
############################################################################
|
||||
## IF A SIGNIFICANT TORNADO IS SELECTED THE FOLLOWING IMPACT STATEMENT
|
||||
## WILL BE USED FOR HEIGHTENED AWARENESS OF THIS DANGEROUS SITUATION
|
||||
############################################################################
|
||||
#if(${list.contains($bullets, "significantTornado")})
|
||||
#set ($torimpact = "YOU ARE IN A LIFE THREATENING SITUATION. MOBILE HOMES WILL BE DESTROYED. CONSIDERABLE DAMAGE TO HOMES...BUSINESSES AND VEHICLES IS LIKELY AND COMPLETE DESTRUCTION IS POSSIBLE. FLYING DEBRIS WILL BE DEADLY TO PEOPLE AND ANIMALS. EXPECT TREES TO BE UPROOTED OR SNAPPED.")
|
||||
#end
|
||||
############################################################################
|
||||
## IF A TORNADO EMERGENCY IS SELECTED THE FOLLOWING IMPACT STATEMENT
|
||||
## WILL BE USED FOR HEIGHTED AWARENESS OF THIS DANGEROUS SITUATION
|
||||
############################################################################
|
||||
#if(${list.contains($bullets, "torEmergency")})
|
||||
#set ($torimpact = "YOU COULD BE KILLED IF NOT UNDERGROUND OR IN A TORNADO SHELTER. COMPLETE DESTRUCTION OF NEIGHBORHOODS...BUSINESSES AND VEHICLES WILL OCCUR. FLYING DEBRIS WILL DEADLY TO PEOPLE AND ANIMALS.")
|
||||
#end
|
||||
############################################################################
|
||||
## Since the SVS template uses both the torimpact and svrimpact variables
|
||||
## we need to set the variable to null depending on which statement
|
||||
## you are updating determined by the phenomena variable
|
||||
############################################################################
|
||||
#if(${phenomena}=="SV")
|
||||
#set ($torimpact = "")
|
||||
#elseif(${phenomena}=="TO")
|
||||
#set ($svrimpact = "")
|
||||
#end
|
||||
############################################################################
|
||||
## End of File
|
||||
############################################################################
|
||||
## Make sure this file is parsed into the main IBW template in order to
|
||||
## generate the proper Impact Statements
|
||||
############################################################################
|
|
@ -0,0 +1,91 @@
|
|||
#*
|
||||
pointMarkers.vm
|
||||
CODE FROM mileMarkers 2-6-2013 BY MIKE DANGELO, EVAN BOOKBINDER AND DAVE TOMALAK.
|
||||
|
||||
To get point locations output: Use this call to #pmarkers() from any vm template/file.
|
||||
(The macro #pmarkers resides in VM_global_library.vm).
|
||||
|
||||
#pmarkers($markers, $id, $preamble, $type, $column)
|
||||
|
||||
Arguments passed to #pmarkers:
|
||||
$markers = a string, and must be the exact <pointSource variable> set in the XML for this road
|
||||
example: ${stadiumName} corresponds to a <pointSource variable="stadiumName"> in XML
|
||||
$id = the sequential-numeric IDs from the database used to determine if/where there are any logical
|
||||
breaks in the mile markers. This field is also set in the XML <pointSource variable="stadiumGid">
|
||||
example: ${stadiumGid} corresponds to a <pointSource variable="stadiumGid"> in XML
|
||||
$preamble = a string "OUTPUT TEXT" which is a lead in to the list $type ("THE FOLLOWING")
|
||||
$type = a string "OUTPUT TEXT" describing the place(s) in the database(s) - do not make plural (pmarkers macro will append an "S" to this field)
|
||||
examples: "STADIUM" or "VENUE" (may be left blank "")
|
||||
$column = a boolean expression (true or false)
|
||||
- true makes output in one column,
|
||||
- false makes output a sentence ("COORS FIELD...BIG CHURCH...AND BLANK STADIUM.")
|
||||
|
||||
EXAMPLE OF OUTPUT FOR ONE DATABASE ONLY:
|
||||
|
||||
where your warning box covers 3 points in the databaseName "stadiumName"
|
||||
yields:
|
||||
THIS INCLUDES THE FOLLOWING VENUES COORS FIELD...BIG CHURCH...AND BLANK STADIUM."
|
||||
#pmarkers(${universitiesName},${universitiesGid}, "", "", true)
|
||||
where your warning box covers 3 points in the databaseName "universitiesName"
|
||||
yields:
|
||||
THIS INCLUDES...
|
||||
PENN STATE UNIVERSITY...
|
||||
THE UNIVERSITY OF COLORADO...
|
||||
MICHIGAN TECH UNIVERSITY...
|
||||
UNIVERSITY OF WISCONSIN...
|
||||
AND THE COLLEGE OF CHARLESTON.
|
||||
|
||||
**************************************************************************
|
||||
YOU MAY CALL A LARGE NUMBER OF DATABASES (LISTS OF LOCATIONS) ALL AT ONCE.
|
||||
To use/call this (suggested) method, you need to fill in 3 arrays
|
||||
of the <pointSource variable> info from your
|
||||
corresponding XML file (usually pointMarkers.xml).
|
||||
The 3 arrays are:
|
||||
|
||||
$databaseName -- array of pointSource objects containing the location names. ($markers)
|
||||
Substitute all your <pointSource variable> NAMES
|
||||
example: #set($databaseName = [${stadiumNames},${universitiesNames},${eventsNames}])
|
||||
|
||||
$databaseId -- array of plain numbers which are used to order the output. ($id)
|
||||
Substitute all your <pointSource variable> GID's
|
||||
example: #set($databaseId = [${stadiumId},${universitiesId},${eventsId}])
|
||||
|
||||
$pointspecificName -- array of descriptions/plain English names for whatever the locations are. ($preamble)
|
||||
This can be as generic as 'LOCATIONS' or even blank ''.
|
||||
example: #set($pointspecificName = ['STADIUMS','UNIVERSITIES','EVENT LOCATIONS'])
|
||||
|
||||
*#
|
||||
|
||||
#set($hits = 0)
|
||||
#set($pointbigList = '')
|
||||
######### EXAMPLES
|
||||
## #set($databaseName = [${stadiumNames},${universitiesNames},${eventsNames}])
|
||||
## #set($databaseId = [${stadiumId},${universitiesId},${eventsId}])
|
||||
## #set($pointspecificName = ['STADIUMS','UNIVERSITIES','EVENT LOCATIONS'])
|
||||
###########################################################################
|
||||
#set($itemCount = 0)
|
||||
#foreach($specName in ${pointspecificName})
|
||||
#set($itemCount = ${itemCount} + 1)
|
||||
#set($itemCount2 = 0)
|
||||
#foreach($dbName in ${databaseName})
|
||||
#set($itemCount2 = ${itemCount2} + 1)
|
||||
#set($itemCount3 = 0)
|
||||
#foreach($dbId in ${databaseId})
|
||||
#set($itemCount3 = ${itemCount3} + 1)
|
||||
#if($itemCount3 == ${itemCount2} && ${itemCount2} == ${itemCount})
|
||||
#set($checker = "#pmarkers(${dbName},${dbId},${specName},'LOCATION',false)")
|
||||
#if($checker.length() > 0)
|
||||
#set($hits = ${hits} + 1)
|
||||
#set($pointbigList = "${pointbigList} ${checker}")
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
#if($hits == 1)
|
||||
THIS INCLUDES${pointbigList}
|
||||
#end
|
||||
#if($hits > 1)
|
||||
THIS INCLUDES...
|
||||
${pointbigList}
|
||||
#end
|
|
@ -0,0 +1,36 @@
|
|||
<!--
|
||||
CREATED 1-07-2013 BY EVAN BOOKBINDER
|
||||
CREATED 2-6-2013 BY DAVE TOMALAK USING MILEMARKER TEMPLATE WRITTEN BY EVAN
|
||||
BOOKBINDER AND MIKE DANGELO AS EXAMPLE
|
||||
|
||||
FOR EACH DATABASE TABLE IMPORTED USING THE importMarkersInfo.sh SCRIPT,
|
||||
THERE WILL BE TWO pointSource OBJECTS CREATED THROUGH THE CODE BELOW.
|
||||
ONLY THE pointSource variable (unique name to each object) AND
|
||||
pointSource attribute (the tablename created from importMarkersInfo.sh)
|
||||
SHOULD BE MODIFIED.
|
||||
|
||||
<pointSource variable="locpointsName">
|
||||
<pointSource>locpoints</pointSource>
|
||||
<pointField>NAME</pointField>
|
||||
<searchMethod>POINTS</searchMethod>
|
||||
<withinPolygon>true</withinPolygon>
|
||||
<maxResults>1000</maxResults>
|
||||
<distanceThreshold>100</distanceThreshold>
|
||||
<sortBy>
|
||||
<sort>gid</sort>
|
||||
</sortBy>
|
||||
</pointSource>
|
||||
|
||||
<pointSource variable="locpointsGid">
|
||||
<pointSource>locpoints</pointSource>
|
||||
<pointField>GID</pointField>
|
||||
<searchMethod>POINTS</searchMethod>
|
||||
<withinPolygon>true</withinPolygon>
|
||||
<maxResults>1000</maxResults>
|
||||
<distanceThreshold>100</distanceThreshold>
|
||||
<sortBy>
|
||||
<sort>gid</sort>
|
||||
</sortBy>
|
||||
</pointSource>
|
||||
|
||||
-->
|
|
@ -371,7 +371,7 @@
|
|||
0 20 5 0 0 5 TABLE PAST WEATHER (2)
|
||||
0 20 9 -1 -40 11 M CEILING ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
|
||||
0 20 10 0 0 7 % CLOUD COVER (TOTAL)
|
||||
0 20 11 0 0 4 TABLE CLOUD AMOUNT
|
||||
0 20 11 0 0 4 CODE TABLE CLOUD AMOUNT
|
||||
0 20 12 0 0 6 TABLE CLOUD TYPE
|
||||
0 20 13 -1 -40 11 M HEIGHT OF BASE OF CLOUD (SA/SM)
|
||||
0 20 14 -1 -40 11 M HEIGHT OF TOP OF CLOUD
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue