13.5.1-5 baseline

Former-commit-id: 82aabf1066 [formerly 492f92ef7b] [formerly 82aabf1066 [formerly 492f92ef7b] [formerly ea7ac37930 [formerly e0157ab61ca5f2a62d78993a27893778fa119c4f]]]
Former-commit-id: ea7ac37930
Former-commit-id: d899faec3d [formerly 869922cb82]
Former-commit-id: dc881f4ed8
This commit is contained in:
Greg Armendariz 2013-07-03 12:20:27 -04:00
parent c05a6c8b50
commit 13ac0b1062
206 changed files with 145523 additions and 12007 deletions

View 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 &&

View file

@ -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)

View file

@ -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],

View file

@ -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],

View file

@ -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>

View file

@ -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

View file

@ -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>

View file

@ -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

View 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>

View file

@ -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>

View file

@ -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.

View file

@ -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"

View file

@ -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 };

View file

@ -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)
*/

View file

@ -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);

View file

@ -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
*/

View file

@ -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();

View file

@ -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());

View file

@ -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;
}

View file

@ -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));
}
}

View file

@ -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

View file

@ -77,6 +77,7 @@ 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
* </pre>
*
* @author randerso
@ -670,8 +671,6 @@ public class MPEDataManager {
private ArrayList<String> badGages = new ArrayList<String>();
private boolean radarEditFlag = false;
private Map<Date, MPEDateInfo> dateMap;
private Date latestAvailableDate = null;
@ -1484,21 +1483,6 @@ public class MPEDataManager {
}
}
/**
* @param radarEditFlag
* the radarEditFlag to set
*/
public void setRadarEditFlag(boolean radarEditFlag) {
this.radarEditFlag = radarEditFlag;
}
/**
* @return the radarEditFlag
*/
public boolean isRadarEditFlag() {
return radarEditFlag;
}
/**
* @return the rFC
*/

View file

@ -55,6 +55,7 @@ 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
* </pre>
*
* @author snaples
@ -181,9 +182,7 @@ 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;
for (MPEGageData gData : gages.values()) {
@ -270,7 +269,6 @@ public class RegenHrFlds {
}
}
MPEDataManager.getInstance().setRadarEditFlag(false);
/*-------------------------------------------------------------------------*/
/* Read Gage Data and store in structure */
/*-------------------------------------------------------------------------*/
@ -299,7 +297,6 @@ public class RegenHrFlds {
MPEDataManager.getInstance().clearEditGages();
shell.setCursor(null);
}
}
/**

View file

@ -92,9 +92,10 @@ 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.
*
* </pre>
*
* @author brockwoo
@ -383,6 +384,17 @@ public class PlotResource2 extends
if (existingStation.plotImage != null) {
existingStation.plotImage.getImage().dispose();
existingStation.plotImage = null;
// DR14966
rawMessageMap.remove(existingStation.info[0].dataURI);
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 (int i = 0; i < existingStation.info.length; i++) {
@ -394,9 +406,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) {

View file

@ -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 ");
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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();
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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;

View file

@ -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);
}
}

View file

@ -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" />

View file

@ -178,6 +178,7 @@ 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/25/2013 DR 16013 Qinglu Lin Added setUniqueFip() and code for re-hatching polygon.
* </pre>
*
* @author mschenke
@ -188,6 +189,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";
@ -2621,6 +2624,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 +3137,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();
}
}
}
}

View file

@ -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;
}

View file

@ -1,221 +1,236 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<FFMPSourceConfig xmlns:ns2="group">
<source>
<SourceName>DHR</SourceName>
<DisplayName>DHR</DisplayName>
<DurationHour>0</DurationHour>
<dataPath>/radar/%/%/32/0.0/0.0</dataPath>
<plugin>radar</plugin>
<dataType>RADAR</dataType>
<sourceType>QPE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>10</expirationMinutes>
</source>
<source>
<SourceName>DPR</SourceName>
<DisplayName>DPR</DisplayName>
<DurationHour>0</DurationHour>
<dataPath>/radar/%/%/176/0.0/0.0</dataPath>
<plugin>radar</plugin>
<dataType>RADAR</dataType>
<sourceType>QPE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
</source>
<source>
<SourceName>DHRMOSAIC</SourceName>
<DisplayName>HPE DHR MOSAIC</DisplayName>
<DurationHour>0</DurationHour>
<dataPath>hpe_dhrmosaic_dir</dataPath>
<dataType>XMRG</dataType>
<sourceType>QPE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<conversion>0.0003937</conversion>
<dateFormat>yyyyMMddHHmm</dateFormat>
<hrapGridFactor>4</hrapGridFactor>
</source>
<source>
<SourceName>BDHRMOSAIC</SourceName>
<DisplayName>HPE Bias DHR MOSAIC</DisplayName>
<DurationHour>1</DurationHour>
<dataPath>hpe_bdhrmosaic_dir</dataPath>
<dataType>XMRG</dataType>
<sourceType>QPE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<conversion>0.0003937</conversion>
<dateFormat>yyyyMMddHHmm</dateFormat>
<hrapGridFactor>4</hrapGridFactor>
</source>
<source>
<SourceName>QPFSCAN</SourceName>
<DisplayName>QPFSCAN</DisplayName>
<DurationHour>1</DurationHour>
<dataPath>/qpf/%/%/PRECIP_AMT</dataPath>
<plugin>qpf</plugin>
<pluginClass>com.raytheon.uf.common.dataplugin.qpf.QPFRecord</pluginClass>
<pluginDAOClass>com.raytheon.uf.common.dataplugin.qpf.dao.QPFDao</pluginDAOClass>
<dataType>PDO</dataType>
<sourceType>QPF</sourceType>
<rateOrAccum>accum</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<mosaic>true</mosaic>
</source>
<source>
<SourceName>PRTM</SourceName>
<DisplayName>HPE Nowcast</DisplayName>
<DurationHour>1</DurationHour>
<dataPath>hpe_nowcast_dir</dataPath>
<dataType>XMRG</dataType>
<sourceType>QPF</sourceType>
<rateOrAccum>accum</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<conversion>0.0003937</conversion>
<mosaic>true</mosaic>
<dateFormat>yyyyMMddHHmm</dateFormat>
<hrapGridFactor>4</hrapGridFactor>
</source>
<source>
<SourceName>BPRTM</SourceName>
<DisplayName>HPE Bias Nowcast</DisplayName>
<DurationHour>1</DurationHour>
<dataPath>hpe_nowcast_dir</dataPath>
<dataType>XMRG</dataType>
<sourceType>QPF</sourceType>
<rateOrAccum>accum</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<conversion>0.0003937</conversion>
<mosaic>true</mosaic>
<dateFormat>yyyyMMddHHmm</dateFormat>
<hrapGridFactor>4</hrapGridFactor>
</source>
<source>
<SourceName>FFG0124hr</SourceName>
<DisplayName>RFCFFG</DisplayName>
<DurationHour>1</DurationHour>
<dataPath>/grid/%/%/.*/.*/.*/FFG0124hr/SFC/0.0/-999999.0/</dataPath>
<plugin>grid</plugin>
<dataType>GRID</dataType>
<sourceType>GUIDANCE</sourceType>
<rateOrAccum>accum</rateOrAccum>
<expirationMinutes>2080</expirationMinutes>
<interpolatedGuidanceDelay>true</interpolatedGuidanceDelay>
<interpolatedGuidanceTransition>true</interpolatedGuidanceTransition>
<conversion>0.03937</conversion>
<mosaic>true</mosaic>
<guidanceType>RFC</guidanceType>
</source>
<source>
<SourceName>FFG0324hr</SourceName>
<DisplayName>RFCFFG</DisplayName>
<DurationHour>3</DurationHour>
<dataPath>/grid/%/%/.*/.*/.*/FFG0324hr/SFC/0.0/-999999.0/</dataPath>
<plugin>grid</plugin>
<dataType>GRID</dataType>
<sourceType>GUIDANCE</sourceType>
<rateOrAccum>accum</rateOrAccum>
<expirationMinutes>2080</expirationMinutes>
<interpolatedGuidanceDelay>true</interpolatedGuidanceDelay>
<interpolatedGuidanceTransition>true</interpolatedGuidanceTransition>
<conversion>0.03937</conversion>
<mosaic>true</mosaic>
<guidanceType>RFC</guidanceType>
</source>
<source>
<SourceName>FFG0624hr</SourceName>
<DisplayName>RFCFFG</DisplayName>
<DurationHour>6</DurationHour>
<dataPath>/grid/%/%/.*/.*/.*/FFG0624hr/SFC/0.0/-999999.0/</dataPath>
<plugin>grid</plugin>
<dataType>GRID</dataType>
<sourceType>GUIDANCE</sourceType>
<rateOrAccum>accum</rateOrAccum>
<expirationMinutes>2080</expirationMinutes>
<interpolatedGuidanceDelay>true</interpolatedGuidanceDelay>
<interpolatedGuidanceTransition>true</interpolatedGuidanceTransition>
<conversion>0.03937</conversion>
<mosaic>true</mosaic>
<guidanceType>RFC</guidanceType>
</source>
<source>
<SourceName>VGBBIASHPE</SourceName>
<DisplayName>Virtual Gage Basins HPE</DisplayName>
<DurationHour>0</DurationHour>
<dataPath>hd_ob92oax</dataPath>
<dataType>XMRG</dataType>
<sourceType>GAGE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>30</expirationMinutes>
<conversion>0.0003937</conversion>
<hrapGridFactor>4</hrapGridFactor>
</source>
<source>
<SourceName>VGBHPE</SourceName>
<DisplayName>Virtual Gage Basins HPE</DisplayName>
<DurationHour>0</DurationHour>
<dataPath>hd_ob92oax</dataPath>
<dataType>XMRG</dataType>
<sourceType>GAGE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>30</expirationMinutes>
<conversion>0.0003937</conversion>
<hrapGridFactor>4</hrapGridFactor>
</source>
<source>
<SourceName>VGBDHR</SourceName>
<DisplayName>Virtual Gage Basins DHR</DisplayName>
<DurationHour>1</DurationHour>
<dataPath>hd_ob92oax</dataPath>
<dataType>RADAR</dataType>
<sourceType>GAGE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
</source>
<source>
<SourceName>VGBDPR</SourceName>
<DisplayName>Virtual Gage Basins DPR</DisplayName>
<DurationHour>1</DurationHour>
<dataPath>hd_ob92oax</dataPath>
<dataType>RADAR</dataType>
<sourceType>GAGE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
</source>
<product primarySource="DHRMOSAIC">
<rate>DHRMOSAIC</rate>
<qpe>DHRMOSAIC</qpe>
<qpf>PRTM</qpf>
<qpf>BPRTM</qpf>
<qpf>QPFSCAN</qpf>
<guidance>FFG0124hr, FFG0324hr, FFG0624hr</guidance>
<virtual>VGBHPE</virtual>
</product>
<product primarySource="BDHRMOSAIC">
<rate>BDHRMOSAIC</rate>
<qpe>BDHRMOSAIC</qpe>
<qpf>BPRTM</qpf>
<qpf>PRTM</qpf>
<qpf>QPFSCAN</qpf>
<guidance>FFG0124hr, FFG0324hr, FFG0624hr</guidance>
<virtual>VGBBIASHPE</virtual>
</product>
<product primarySource="DHR">
<rate>DHR</rate>
<qpe>DHR</qpe>
<qpf>QPFSCAN</qpf>
<qpf>PRTM</qpf>
<qpf>BPRTM</qpf>
<guidance>FFG0124hr, FFG0324hr, FFG0624hr</guidance>
<virtual>VGBDHR</virtual>
</product>
<product primarySource="DPR">
<rate>DPR</rate>
<qpe>DPR</qpe>
<qpf>QPFSCAN</qpf>
<qpf>BPRTM</qpf>
<qpf>PRTM</qpf>
<guidance>FFG0124hr, FFG0324hr, FFG0624hr</guidance>
<virtual>VGBDPR</virtual>
</product>
</FFMPSourceConfig>
<source>
<SourceName>DHR</SourceName>
<DisplayName>DHR</DisplayName>
<DurationHour>0.0</DurationHour>
<dataPath>/radar/%/%/32/0.0/0.0</dataPath>
<plugin>radar</plugin>
<dataType>RADAR</dataType>
<sourceType>QPE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>10</expirationMinutes>
<conversion>1.0</conversion>
<mosaic>false</mosaic>
</source>
<source>
<SourceName>DPR</SourceName>
<DisplayName>DPR</DisplayName>
<DurationHour>0.0</DurationHour>
<dataPath>/radar/%/%/176/0.0/0.0</dataPath>
<plugin>radar</plugin>
<dataType>RADAR</dataType>
<sourceType>QPE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<conversion>1.0</conversion>
<mosaic>false</mosaic>
</source>
<source>
<SourceName>DHRMOSAIC</SourceName>
<DisplayName>HPE DHR MOSAIC</DisplayName>
<DurationHour>0.0</DurationHour>
<dataPath>hpe_dhrmosaic_dir</dataPath>
<dataType>XMRG</dataType>
<sourceType>QPE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<conversion>3.937E-4</conversion>
<mosaic>false</mosaic>
<dateFormat>yyyyMMddHHmm</dateFormat>
<hrapGridFactor>4</hrapGridFactor>
</source>
<source>
<SourceName>BDHRMOSAIC</SourceName>
<DisplayName>HPE Bias DHR MOSAIC</DisplayName>
<DurationHour>1.0</DurationHour>
<dataPath>hpe_bdhrmosaic_dir</dataPath>
<dataType>XMRG</dataType>
<sourceType>QPE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<interpolatedGuidanceDelay>false</interpolatedGuidanceDelay>
<interpolatedGuidanceTransition>false</interpolatedGuidanceTransition>
<conversion>3.937E-4</conversion>
<mosaic>false</mosaic>
<dateFormat>yyyyMMddHHmm</dateFormat>
<hrapGridFactor>4</hrapGridFactor>
</source>
<source>
<SourceName>QPFSCAN</SourceName>
<DisplayName>QPFSCAN</DisplayName>
<DurationHour>1.0</DurationHour>
<dataPath>/qpf/%/%/PRECIP_AMT</dataPath>
<plugin>qpf</plugin>
<pluginClass>com.raytheon.uf.common.dataplugin.qpf.QPFRecord</pluginClass>
<pluginDAOClass>com.raytheon.uf.common.dataplugin.qpf.dao.QPFDao</pluginDAOClass>
<dataType>PDO</dataType>
<sourceType>QPF</sourceType>
<rateOrAccum>accum</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<conversion>1.0</conversion>
<mosaic>true</mosaic>
</source>
<source>
<SourceName>PRTM</SourceName>
<DisplayName>HPE Nowcast</DisplayName>
<DurationHour>1.0</DurationHour>
<dataPath>hpe_nowcast_dir</dataPath>
<dataType>XMRG</dataType>
<sourceType>QPF</sourceType>
<rateOrAccum>accum</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<conversion>3.937E-4</conversion>
<mosaic>true</mosaic>
<dateFormat>yyyyMMddHHmm</dateFormat>
<hrapGridFactor>4</hrapGridFactor>
</source>
<source>
<SourceName>BPRTM</SourceName>
<DisplayName>HPE Bias Nowcast</DisplayName>
<DurationHour>1.0</DurationHour>
<dataPath>hpe_nowcast_dir</dataPath>
<dataType>XMRG</dataType>
<sourceType>QPF</sourceType>
<rateOrAccum>accum</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<conversion>3.937E-4</conversion>
<mosaic>true</mosaic>
<dateFormat>yyyyMMddHHmm</dateFormat>
<hrapGridFactor>4</hrapGridFactor>
</source>
<source>
<SourceName>FFG0124hr</SourceName>
<DisplayName>RFCFFG</DisplayName>
<DurationHour>1.0</DurationHour>
<dataPath>/grid/%/%/.*/.*/.*/FFG0124hr/SFC/0.0/-999999.0/</dataPath>
<plugin>grid</plugin>
<dataType>GRID</dataType>
<sourceType>GUIDANCE</sourceType>
<rateOrAccum>accum</rateOrAccum>
<expirationMinutes>2080</expirationMinutes>
<interpolatedGuidanceDelay>true</interpolatedGuidanceDelay>
<interpolatedGuidanceTransition>true</interpolatedGuidanceTransition>
<conversion>0.03937</conversion>
<mosaic>true</mosaic>
<guidanceType>RFC</guidanceType>
</source>
<source>
<SourceName>FFG0324hr</SourceName>
<DisplayName>RFCFFG</DisplayName>
<DurationHour>3.0</DurationHour>
<dataPath>/grid/%/%/.*/.*/.*/FFG0324hr/SFC/0.0/-999999.0/</dataPath>
<plugin>grid</plugin>
<dataType>GRID</dataType>
<sourceType>GUIDANCE</sourceType>
<rateOrAccum>accum</rateOrAccum>
<expirationMinutes>2080</expirationMinutes>
<interpolatedGuidanceDelay>true</interpolatedGuidanceDelay>
<interpolatedGuidanceTransition>true</interpolatedGuidanceTransition>
<conversion>0.03937</conversion>
<mosaic>true</mosaic>
<guidanceType>RFC</guidanceType>
</source>
<source>
<SourceName>FFG0624hr</SourceName>
<DisplayName>RFCFFG</DisplayName>
<DurationHour>6.0</DurationHour>
<dataPath>/grid/%/%/.*/.*/.*/FFG0624hr/SFC/0.0/-999999.0/</dataPath>
<plugin>grid</plugin>
<dataType>GRID</dataType>
<sourceType>GUIDANCE</sourceType>
<rateOrAccum>accum</rateOrAccum>
<expirationMinutes>2080</expirationMinutes>
<interpolatedGuidanceDelay>true</interpolatedGuidanceDelay>
<interpolatedGuidanceTransition>true</interpolatedGuidanceTransition>
<conversion>0.03937</conversion>
<mosaic>true</mosaic>
<guidanceType>RFC</guidanceType>
</source>
<source>
<SourceName>VGBBIASHPE</SourceName>
<DisplayName>Virtual Gage Basins HPE</DisplayName>
<DurationHour>0.0</DurationHour>
<dataPath>hd_ob92oax</dataPath>
<dataType>XMRG</dataType>
<sourceType>GAGE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>30</expirationMinutes>
<conversion>3.937E-4</conversion>
<mosaic>false</mosaic>
<hrapGridFactor>4</hrapGridFactor>
</source>
<source>
<SourceName>VGBHPE</SourceName>
<DisplayName>Virtual Gage Basins HPE</DisplayName>
<DurationHour>0.0</DurationHour>
<dataPath>hd_ob92oax</dataPath>
<dataType>XMRG</dataType>
<sourceType>GAGE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>30</expirationMinutes>
<conversion>3.937E-4</conversion>
<mosaic>false</mosaic>
<hrapGridFactor>4</hrapGridFactor>
</source>
<source>
<SourceName>VGBDHR</SourceName>
<DisplayName>Virtual Gage Basins DHR</DisplayName>
<DurationHour>1.0</DurationHour>
<dataPath>hd_ob92oax</dataPath>
<dataType>RADAR</dataType>
<sourceType>GAGE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<conversion>1.0</conversion>
<mosaic>false</mosaic>
</source>
<source>
<SourceName>VGBDPR</SourceName>
<DisplayName>Virtual Gage Basins DPR</DisplayName>
<DurationHour>1.0</DurationHour>
<dataPath>hd_ob92oax</dataPath>
<dataType>RADAR</dataType>
<sourceType>GAGE</sourceType>
<rateOrAccum>rate</rateOrAccum>
<expirationMinutes>15</expirationMinutes>
<conversion>1.0</conversion>
<mosaic>false</mosaic>
</source>
<product primarySource="DHRMOSAIC">
<rate>DHRMOSAIC</rate>
<qpe>DHRMOSAIC</qpe>
<qpf>PRTM</qpf>
<qpf>BPRTM</qpf>
<qpf>QPFSCAN</qpf>
<guidance>FFG0124hr, FFG0324hr, FFG0624hr</guidance>
<virtual>VGBHPE</virtual>
</product>
<product primarySource="BDHRMOSAIC">
<rate>BDHRMOSAIC</rate>
<qpe>BDHRMOSAIC</qpe>
<qpf>BPRTM</qpf>
<qpf>PRTM</qpf>
<qpf>QPFSCAN</qpf>
<guidance>FFG0124hr, FFG0324hr, FFG0624hr</guidance>
<virtual>VGBBIASHPE</virtual>
</product>
<product primarySource="DHR">
<rate>DHR</rate>
<qpe>DHR</qpe>
<qpf>QPFSCAN</qpf>
<qpf>PRTM</qpf>
<qpf>BPRTM</qpf>
<guidance>FFG0124hr, FFG0324hr, FFG0624hr</guidance>
<virtual>VGBDHR</virtual>
</product>
<product primarySource="DPR">
<rate>DPR</rate>
<qpe>DPR</qpe>
<qpf>QPFSCAN</qpf>
<qpf>BPRTM</qpf>
<qpf>PRTM</qpf>
<guidance>FFG0124hr, FFG0324hr, FFG0624hr</guidance>
<virtual>VGBDPR</virtual>
</product>
</FFMPSourceConfig>

View file

@ -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

View file

@ -147,7 +147,7 @@
0 60 65 1 0 12 METERS/SECOND CLIMATIC WIND SPEED
0 60 66 1 0 12 DEGREES KELVIN CLIMATIC(NORMAL) DAY MAX TEMP
0 60 67 1 0 12 DEGREES KELVIN CLIMATIC(NORMAL) NIGHT MIN TEMP
0 60 90 0 0 4 CODE TABLE UANT PCP FCST (CATEGORIES)
0 60 90 0 0 4 CODE TABLE QUANT PCP FCST (CATEGORIES)
0 60 91 0 0 3 CODE TABLE COND PCP TYPE FCST (CATS)
0 60 92 0 0 3 CODE TABLE COND PCP CHARACTER FCST (CATS)
0 60 93 0 0 3 CODE TABLE QUANT SNOW AMT FCST (CATS)

View file

@ -19,77 +19,77 @@
further_licensing_information.
-->
<pointDataDescription>
<parameter name="invTime" numDims="1" type="INT" />
<parameter name="QPF6hr_cat3" numDims="1" type="INT" />
<parameter name="QPF6hr_cat2" numDims="1" type="INT" />
<parameter name="QPF6hr_cat1" numDims="1" type="INT" />
<parameter name="QPF6hr_cat4" numDims="1" type="INT" />
<parameter name="POP_rain" numDims="1" type="INT" />
<parameter name="POP_showers" numDims="1" type="INT" />
<parameter name="invTime" numDims="1" type="INT" unit="s"/>
<parameter name="QPF6hr_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="QPF6hr_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="QPF6hr_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="QPF6hr_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="POP_rain" numDims="1" type="INT" unit="%"/>
<parameter name="POP_showers" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_bestCat" numDims="1" type="INT" />
<parameter name="windSpeedInflated" numDims="1" type="FLOAT" />
<parameter name="severe24hr" numDims="1" type="INT" />
<parameter name="precipFreezing" numDims="1" type="INT" />
<parameter name="windSpeedInflated" numDims="1" type="FLOAT" unit="m/s"/>
<parameter name="severe24hr" numDims="1" type="INT" unit="%"/>
<parameter name="precipFreezing" numDims="1" type="INT" unit="%"/>
<parameter name="Cig_Vis" numDims="1" type="INT" />
<parameter name="QPF12hr_bestCat" numDims="1" type="INT" />
<parameter name="POP_drizzle" numDims="1" type="INT" />
<parameter name="clouds_OV" numDims="1" type="INT" />
<parameter name="ceiling_cat1" numDims="1" type="INT" />
<parameter name="ceiling_cat2" numDims="1" type="INT" />
<parameter name="ceiling_cat3" numDims="1" type="INT" />
<parameter name="ceiling_cat4" numDims="1" type="INT" />
<parameter name="ceiling_cat5" numDims="1" type="INT" />
<parameter name="ceiling_cat6" numDims="1" type="INT" />
<parameter name="ceiling_cat7" numDims="1" type="INT" />
<parameter name="vis_cat5" numDims="1" type="INT" />
<parameter name="vis_cat4" numDims="1" type="INT" />
<parameter name="PQPF_6hr" numDims="1" type="INT" />
<parameter name="vis_cat6" numDims="1" type="INT" />
<parameter name="vis_cat1" numDims="1" type="INT" />
<parameter name="vis_cat3" numDims="1" type="INT" />
<parameter name="vis_cat2" numDims="1" type="INT" />
<parameter name="severe12hr" numDims="1" type="INT" />
<parameter name="POP_drizzle" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_OV" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat6" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat7" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="PQPF_6hr" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat6" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="severe12hr" numDims="1" type="INT" unit="%"/>
<parameter name="QPF6hr_bestCat" numDims="1" type="INT" />
<parameter name="tstorm24hr" numDims="1" type="INT" />
<parameter name="POP_hour" numDims="1" type="INT" />
<parameter name="tstorm24hr" numDims="1" type="INT" unit="%"/>
<parameter name="POP_hour" numDims="1" type="INT" unit="%"/>
<parameter name="POP_bestCat" numDims="1" type="INT" />
<parameter name="dewpoint" numDims="1" type="FLOAT" />
<parameter name="dewpoint" numDims="1" type="FLOAT" unit="K"/>
<parameter name="vis_bestCat" numDims="1" type="INT" />
<parameter name="precipSnow" numDims="1" type="INT" />
<parameter name="obVis_cat4" numDims="1" type="INT" />
<parameter name="obVis_cat5" numDims="1" type="INT" />
<parameter name="minTemp24Hour" numDims="1" type="FLOAT" />
<parameter name="obVis_cat1" numDims="1" type="INT" />
<parameter name="obVis_cat2" numDims="1" type="INT" />
<parameter name="obVis_cat3" numDims="1" type="INT" />
<parameter name="QPF24hr_cat2" numDims="1" type="INT" />
<parameter name="QPF24hr_cat3" numDims="1" type="INT" />
<parameter name="QPF24hr_cat1" numDims="1" type="INT" />
<parameter name="QPF24hr_cat7" numDims="1" type="INT" />
<parameter name="QPF24hr_cat4" numDims="1" type="INT" />
<parameter name="precipRain" numDims="1" type="INT" />
<parameter name="clouds_SC" numDims="1" type="INT" />
<parameter name="temperature" numDims="1" type="FLOAT" />
<parameter name="uwind" numDims="1" type="FLOAT" />
<parameter name="clouds_BK" numDims="1" type="INT" />
<parameter name="PQPF_12hr" numDims="1" type="INT" />
<parameter name="precipSnow" numDims="1" type="INT" unit="%"/>
<parameter name="obVis_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="obVis_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="minTemp24Hour" numDims="1" type="FLOAT" unit="K"/>
<parameter name="obVis_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="obVis_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="obVis_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="QPF24hr_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="QPF24hr_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="QPF24hr_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="QPF24hr_cat7" numDims="1" type="INT" unit="%"/>
<parameter name="QPF24hr_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="precipRain" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_SC" numDims="1" type="INT" unit="%"/>
<parameter name="temperature" numDims="1" type="FLOAT" unit="K"/>
<parameter name="uwind" numDims="1" type="FLOAT" unit="m/s"/>
<parameter name="clouds_BK" numDims="1" type="INT" unit="%"/>
<parameter name="PQPF_12hr" numDims="1" type="INT" unit="%"/>
<parameter name="proj_hour" numDims="1" type="INT" />
<parameter name="maxTemp24Hour" numDims="1" type="FLOAT" unit="degree" />
<parameter name="tstorm12hr" numDims="1" type="INT" />
<parameter name="clouds_CL" numDims="1" type="INT" />
<parameter name="maxTemp24Hour" numDims="1" type="FLOAT" unit="K" />
<parameter name="tstorm12hr" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_CL" numDims="1" type="INT" unit="%"/>
<parameter name="precipType" numDims="1" type="INT" />
<parameter name="obVis_bestCat" numDims="1" type="INT" />
<parameter name="POP_3hour" numDims="1" type="INT" />
<parameter name="tstorm6hr" numDims="1" type="INT" />
<parameter name="QPF12hr_cat7" numDims="1" type="INT" />
<parameter name="QPF12hr_cat4" numDims="1" type="INT" />
<parameter name="QPF12hr_cat3" numDims="1" type="INT" />
<parameter name="QPF12hr_cat2" numDims="1" type="INT" />
<parameter name="QPF12hr_cat1" numDims="1" type="INT" />
<parameter name="PQPF_24hr" numDims="1" type="INT" />
<parameter name="POP_3hour" numDims="1" type="INT" unit="%"/>
<parameter name="tstorm6hr" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat7" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="PQPF_24hr" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_bestCat" numDims="1" type="INT" />
<parameter name="vwind" numDims="1" type="FLOAT" />
<parameter name="vwind" numDims="1" type="FLOAT" unit="m/s"/>
<parameter name="QPF24hr_bestCat" numDims="1" type="INT" />
<parameter name="windDir" numDims="1" type="INT" />
<parameter name="severe6hr" numDims="1" type="INT" />
<parameter name="windDir" numDims="1" type="INT" unit="°"/>
<parameter name="severe6hr" numDims="1" type="INT" unit="%"/>
</pointDataDescription>

View file

@ -19,86 +19,86 @@
further_licensing_information.
-->
<pointDataDescription>
<parameter name="csevere6hr" numDims="1" type="INT" />
<parameter name="QPF6hr_cat3" numDims="1" type="INT" />
<parameter name="QPF6hr_cat2" numDims="1" type="INT" />
<parameter name="QPF6hr_cat1" numDims="1" type="INT" />
<parameter name="csevere12hr" numDims="1" type="INT" />
<parameter name="QPF6hr_cat4" numDims="1" type="INT" />
<parameter name="POP_rain" numDims="1" type="INT" />
<parameter name="POP_showers" numDims="1" type="INT" />
<parameter name="csevere6hr" numDims="1" type="INT" unit="%"/>
<parameter name="QPF6hr_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="QPF6hr_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="QPF6hr_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="csevere12hr" numDims="1" type="INT" unit="%"/>
<parameter name="QPF6hr_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="POP_rain" numDims="1" type="INT" unit="%"/>
<parameter name="POP_showers" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_bestCat" numDims="1" type="INT" />
<parameter name="windSpeedInflated" numDims="1" type="FLOAT" unit="m/s"/>
<parameter name="severe24hr" numDims="1" type="INT" />
<parameter name="precipFreezing" numDims="1" type="INT" />
<parameter name="severe24hr" numDims="1" type="INT" unit="%"/>
<parameter name="precipFreezing" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_bestCat" numDims="1" type="INT" />
<parameter name="POP_drizzle" numDims="1" type="INT" />
<parameter name="clouds_OV" numDims="1" type="INT" />
<parameter name="ceiling_cat8" numDims="1" type="INT" />
<parameter name="ceiling_cat1" numDims="1" type="INT" />
<parameter name="ceiling_cat2" numDims="1" type="INT" />
<parameter name="ceiling_cat3" numDims="1" type="INT" />
<parameter name="ceiling_cat4" numDims="1" type="INT" />
<parameter name="ceiling_cat5" numDims="1" type="INT" />
<parameter name="ceiling_cat6" numDims="1" type="INT" />
<parameter name="ceiling_cat7" numDims="1" type="INT" />
<parameter name="vis_cat5" numDims="1" type="INT" />
<parameter name="vis_cat4" numDims="1" type="INT" />
<parameter name="PQPF_6hr" numDims="1" type="INT" />
<parameter name="vis_cat6" numDims="1" type="INT" />
<parameter name="vis_cat1" numDims="1" type="INT" />
<parameter name="vis_cat3" numDims="1" type="INT" />
<parameter name="vis_cat2" numDims="1" type="INT" />
<parameter name="severe12hr" numDims="1" type="INT" />
<parameter name="POP_drizzle" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_OV" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat8" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat6" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat7" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="PQPF_6hr" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat6" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="severe12hr" numDims="1" type="INT" unit="%"/>
<parameter name="QPF6hr_bestCat" numDims="1" type="INT" />
<parameter name="tstorm24hr" numDims="1" type="INT" />
<parameter name="POP_hour" numDims="1" type="INT" />
<parameter name="POP_bestCat" numDims="1" type="INT" />
<parameter name="dewpoint" numDims="1" type="FLOAT" />
<parameter name="POP_3hour" numDims="1" type="INT" />
<parameter name="tstorm24hr" numDims="1" type="INT" unit="%"/>
<parameter name="POP_hour" numDims="1" type="INT" unit="%"/>
<parameter name="POP_bestCat" numDims="1" type="INT" unit="%"/>
<parameter name="dewpoint" numDims="1" type="FLOAT" unit="K"/>
<parameter name="POP_3hour" numDims="1" type="INT" unit="%"/>
<parameter name="vis_bestCat" numDims="1" type="INT" />
<parameter name="clouds_FW" numDims="1" type="INT" />
<parameter name="precipSnow" numDims="1" type="INT" />
<parameter name="obVis_cat4" numDims="1" type="INT" />
<parameter name="obVis_cat5" numDims="1" type="INT" />
<parameter name="clouds_FW" numDims="1" type="INT" unit="%"/>
<parameter name="precipSnow" numDims="1" type="INT" unit="%"/>
<parameter name="obVis_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="obVis_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="minTemp24Hour" numDims="1" type="FLOAT" unit="K"/>
<parameter name="obVis_cat1" numDims="1" type="INT" />
<parameter name="obVis_cat2" numDims="1" type="INT" />
<parameter name="obVis_cat3" numDims="1" type="INT" />
<parameter name="QPF24hr_cat2" numDims="1" type="INT" />
<parameter name="QPF24hr_cat3" numDims="1" type="INT" />
<parameter name="QPF24hr_cat1" numDims="1" type="INT" />
<parameter name="QPF24hr_cat7" numDims="1" type="INT" />
<parameter name="QPF24hr_cat4" numDims="1" type="INT" />
<parameter name="precipRain" numDims="1" type="INT" />
<parameter name="clouds_SC" numDims="1" type="INT" />
<parameter name="obVis_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="obVis_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="obVis_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="QPF24hr_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="QPF24hr_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="QPF24hr_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="QPF24hr_cat7" numDims="1" type="INT" unit="%"/>
<parameter name="QPF24hr_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="precipRain" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_SC" numDims="1" type="INT" unit="%"/>
<parameter name="temperature" numDims="1" type="FLOAT" unit="K" />
<parameter name="uwind" numDims="1" type="FLOAT" />
<parameter name="clouds_BK" numDims="1" type="INT" />
<parameter name="PQPF_12hr" numDims="1" type="INT" />
<parameter name="uwind" numDims="1" type="FLOAT" unit="m/s"/>
<parameter name="clouds_BK" numDims="1" type="INT" unit="%"/>
<parameter name="PQPF_12hr" numDims="1" type="INT" unit="%"/>
<parameter name="proj_hour" numDims="1" type="INT" />
<parameter name="maxTemp24Hour" numDims="1" type="FLOAT" unit="K" />
<parameter name="tstorm12hr" numDims="1" type="INT" />
<parameter name="clouds_CL" numDims="1" type="INT" />
<parameter name="tstorm12hr" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_CL" numDims="1" type="INT" unit="%"/>
<parameter name="precipType" numDims="1" type="INT" />
<parameter name="obVis_bestCat" numDims="1" type="INT" />
<parameter name="csevere24hr" numDims="1" type="INT" />
<parameter name="windDir" numDims="1" type="INT" />
<parameter name="tstorm6hr" numDims="1" type="INT" />
<parameter name="csevere24hr" numDims="1" type="INT" unit="%"/>
<parameter name="windDir" numDims="1" type="INT" unit="°"/>
<parameter name="tstorm6hr" numDims="1" type="INT" unit="%"/>
<parameter name="snow24hr_bestCat" numDims="1" type="INT" />
<parameter name="QPF12hr_cat7" numDims="1" type="INT" />
<parameter name="QPF12hr_cat4" numDims="1" type="INT" />
<parameter name="QPF12hr_cat3" numDims="1" type="INT" />
<parameter name="QPF12hr_cat2" numDims="1" type="INT" />
<parameter name="QPF12hr_cat1" numDims="1" type="INT" />
<parameter name="PQPF_24hr" numDims="1" type="INT" />
<parameter name="severe6hr" numDims="1" type="INT" />
<parameter name="QPF12hr_cat7" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="PQPF_24hr" numDims="1" type="INT" unit="%"/>
<parameter name="severe6hr" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_bestCat" numDims="1" type="INT" />
<parameter name="vwind" numDims="1" type="FLOAT" />
<parameter name="vwind" numDims="1" type="FLOAT" unit="m/s"/>
<parameter name="QPF24hr_bestCat" numDims="1" type="INT" />
<parameter name="snow24hr_cat1" numDims="1" type="INT" />
<parameter name="snow24hr_cat2" numDims="1" type="INT" />
<parameter name="snow24hr_cat4" numDims="1" type="INT" />
<parameter name="snow24hr_cat6" numDims="1" type="INT" />
<parameter name="snow24hr_cat8" numDims="1" type="INT" />
<parameter name="snow24hr_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="snow24hr_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="snow24hr_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="snow24hr_cat6" numDims="1" type="INT" unit="%"/>
<parameter name="snow24hr_cat8" numDims="1" type="INT" unit="%"/>
</pointDataDescription>

View file

@ -19,89 +19,89 @@
further_licensing_information.
-->
<pointDataDescription>
<parameter name="csevere6hr" numDims="1" type="INT" />
<parameter name="QPF6hr_cat3" numDims="1" type="INT" />
<parameter name="QPF6hr_cat2" numDims="1" type="INT" />
<parameter name="QPF6hr_cat1" numDims="1" type="INT" />
<parameter name="csevere12hr" numDims="1" type="INT" />
<parameter name="QPF6hr_cat4" numDims="1" type="INT" />
<parameter name="POP_rain" numDims="1" type="INT" />
<parameter name="POP_showers" numDims="1" type="INT" />
<parameter name="csevere6hr" numDims="1" type="INT" unit="%"/>
<parameter name="QPF6hr_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="QPF6hr_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="QPF6hr_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="csevere12hr" numDims="1" type="INT" unit="%"/>
<parameter name="QPF6hr_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="POP_rain" numDims="1" type="INT" unit="%"/>
<parameter name="POP_showers" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_bestCat" numDims="1" type="INT" />
<parameter name="windSpeedInflated" numDims="1" type="FLOAT"
unit="m/s" />
<parameter name="severe24hr" numDims="1" type="INT" />
<parameter name="precipFreezing" numDims="1" type="INT" />
<parameter name="severe24hr" numDims="1" type="INT" unit="%"/>
<parameter name="precipFreezing" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_bestCat" numDims="1" type="INT" />
<parameter name="POP_drizzle" numDims="1" type="INT" />
<parameter name="clouds_OV" numDims="1" type="INT" />
<parameter name="ceiling_cat8" numDims="1" type="INT" />
<parameter name="ceiling_cat1" numDims="1" type="INT" />
<parameter name="ceiling_cat2" numDims="1" type="INT" />
<parameter name="ceiling_cat3" numDims="1" type="INT" />
<parameter name="ceiling_cat4" numDims="1" type="INT" />
<parameter name="ceiling_cat5" numDims="1" type="INT" />
<parameter name="ceiling_cat6" numDims="1" type="INT" />
<parameter name="ceiling_cat7" numDims="1" type="INT" />
<parameter name="vis_cat5" numDims="1" type="INT" />
<parameter name="vis_cat4" numDims="1" type="INT" />
<parameter name="PQPF_6hr" numDims="1" type="INT" />
<parameter name="vis_cat6" numDims="1" type="INT" />
<parameter name="vis_cat1" numDims="1" type="INT" />
<parameter name="vis_cat3" numDims="1" type="INT" />
<parameter name="vis_cat2" numDims="1" type="INT" />
<parameter name="severe12hr" numDims="1" type="INT" />
<parameter name="POP_drizzle" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_OV" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat8" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat6" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat7" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="PQPF_6hr" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat6" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="severe12hr" numDims="1" type="INT" unit="%"/>
<parameter name="QPF6hr_bestCat" numDims="1" type="INT" />
<parameter name="tstorm24hr" numDims="1" type="INT" />
<parameter name="POP_hour" numDims="1" type="INT" />
<parameter name="tstorm24hr" numDims="1" type="INT" unit="%"/>
<parameter name="POP_hour" numDims="1" type="INT" unit="%"/>
<parameter name="POP_bestCat" numDims="1" type="INT" />
<parameter name="dewpoint" numDims="1" type="FLOAT" />
<parameter name="POP_3hour" numDims="1" type="INT" />
<parameter name="dewpoint" numDims="1" type="FLOAT" unit="K"/>
<parameter name="POP_3hour" numDims="1" type="INT" unit="%"/>
<parameter name="vis_bestCat" numDims="1" type="INT" />
<parameter name="clouds_FW" numDims="1" type="INT" />
<parameter name="precipSnow" numDims="1" type="INT" />
<parameter name="obVis_cat4" numDims="1" type="INT" />
<parameter name="obVis_cat5" numDims="1" type="INT" />
<parameter name="clouds_FW" numDims="1" type="INT" unit="%"/>
<parameter name="precipSnow" numDims="1" type="INT" unit="%"/>
<parameter name="obVis_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="obVis_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="minTemp24Hour" numDims="1" type="FLOAT"
unit="K" />
<parameter name="obVis_cat1" numDims="1" type="INT" />
<parameter name="obVis_cat2" numDims="1" type="INT" />
<parameter name="obVis_cat3" numDims="1" type="INT" />
<parameter name="QPF24hr_cat2" numDims="1" type="INT" />
<parameter name="QPF24hr_cat3" numDims="1" type="INT" />
<parameter name="QPF24hr_cat1" numDims="1" type="INT" />
<parameter name="QPF24hr_cat7" numDims="1" type="INT" />
<parameter name="QPF24hr_cat4" numDims="1" type="INT" />
<parameter name="precipRain" numDims="1" type="INT" />
<parameter name="clouds_SC" numDims="1" type="INT" />
<parameter name="temperature" numDims="1" type="FLOAT" />
<parameter name="uwind" numDims="1" type="FLOAT" />
<parameter name="clouds_BK" numDims="1" type="INT" />
<parameter name="PQPF_12hr" numDims="1" type="INT" />
<parameter name="obVis_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="obVis_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="obVis_cat3" numDims="1" type="INT" unit="%"/>
<parammeeter name="QPF24hr_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="QPF24hr_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="QPF24hr_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="QPF24hr_cat7" numDims="1" type="INT" unit="%"/>
<parameter name="QPF24hr_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="precipRain" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_SC" numDims="1" type="INT" unit="%"/>
<parameter name="temperature" numDims="1" type="FLOAT" unit="K"/>
<parameter name="uwind" numDims="1" type="FLOAT" unit="m/s"/>
<parameter name="clouds_BK" numDims="1" type="INT" unit="%"/>
<parameter name="PQPF_12hr" numDims="1" type="INT" unit="%"/>
<parameter name="proj_hour" numDims="1" type="INT" />
<parameter name="maxTemp24Hour" numDims="1" type="FLOAT"
unit="K" />
<parameter name="tstorm12hr" numDims="1" type="INT" />
<parameter name="clouds_CL" numDims="1" type="INT" />
<parameter name="tstorm12hr" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_CL" numDims="1" type="INT" unit="%"/>
<parameter name="precipType" numDims="1" type="INT" />
<parameter name="obVis_bestCat" numDims="1" type="INT" />
<parameter name="csevere24hr" numDims="1" type="INT" />
<parameter name="windDir" numDims="1" type="INT" />
<parameter name="tstorm6hr" numDims="1" type="INT" />
<parameter name="csevere24hr" numDims="1" type="INT" unit="%"/>
<parameter name="windDir" numDims="1" type="INT" unit="°"/>
<parameter name="tstorm6hr" numDims="1" type="INT" unit="%"/>
<parameter name="snow24hr_bestCat" numDims="1" type="INT" />
<parameter name="QPF12hr_cat7" numDims="1" type="INT" />
<parameter name="QPF12hr_cat4" numDims="1" type="INT" />
<parameter name="QPF12hr_cat3" numDims="1" type="INT" />
<parameter name="QPF12hr_cat2" numDims="1" type="INT" />
<parameter name="QPF12hr_cat1" numDims="1" type="INT" />
<parameter name="PQPF_24hr" numDims="1" type="INT" />
<parameter name="severe6hr" numDims="1" type="INT" />
<parameter name="QPF12hr_cat7" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="PQPF_24hr" numDims="1" type="INT" unit="%"/>
<parameter name="severe6hr" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_bestCat" numDims="1" type="INT" />
<parameter name="vwind" numDims="1" type="FLOAT" />
<parameter name="vwind" numDims="1" type="FLOAT" unit="m/s"/>
<parameter name="QPF24hr_bestCat" numDims="1" type="INT" />
<parameter name="snow24hr_cat1" numDims="1" type="INT" />
<parameter name="snow24hr_cat2" numDims="1" type="INT" />
<parameter name="snow24hr_cat4" numDims="1" type="INT" />
<parameter name="snow24hr_cat6" numDims="1" type="INT" />
<parameter name="snow24hr_cat8" numDims="1" type="INT" />
<parameter name="snow24hr_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="snow24hr_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="snow24hr_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="snow24hr_cat6" numDims="1" type="INT" unit="%"/>
<parameter name="snow24hr_cat8" numDims="1" type="INT" unit="%"/>
</pointDataDescription>

View file

@ -19,11 +19,11 @@
further_licensing_information.
-->
<pointDataDescription>
<parameter name="minTempClim" numDims="1" type="FLOAT" />
<parameter name="relFreqPrecip" numDims="1" type="INT" />
<parameter name="minTempClim" numDims="1" type="FLOAT" unit="K"/>
<parameter name="relFreqPrecip" numDims="1" type="INT" unit="%"/>
<parameter name="proj_hour" numDims="1" type="INT" />
<parameter name="maxTempClim" numDims="1" type="FLOAT" />
<parameter name="maxTempClim" numDims="1" type="FLOAT" unit="K"/>
<parameter name="minTemp24Hour" numDims="1" type="FLOAT" unit="K"/>
<parameter name="POP24hr" numDims="1" type="INT"/>
<parameter name="POP24hr" numDims="1" type="INT" unit="%"/>
<parameter name="maxTemp24Hour" numDims="1" type="FLOAT" unit="K" />
</pointDataDescription>

View file

@ -21,69 +21,69 @@
<pointDataDescription>
<parameter name="MaxWindSpeed" numDims="1" type="FLOAT" unit="m/s"/>
<parameter name="POP_bestCat" numDims="1" type="INT" />
<parameter name="POP_drizzle" numDims="1" type="INT" />
<parameter name="POP_hour" numDims="1" type="INT" />
<parameter name="POP_drizzle" numDims="1" type="INT" unit="%"/>
<parameter name="POP_hour" numDims="1" type="INT" unit="%"/>
<parameter name="POP_hour_bestCat" numDims="1" type="INT" />
<parameter name="POP_rain" numDims="1" type="INT" />
<parameter name="POP_showers" numDims="1" type="INT" />
<parameter name="PQPF_12hr" numDims="1" type="INT" />
<parameter name="PQPF_6hr" numDims="1" type="INT" />
<parameter name="POP_rain" numDims="1" type="INT" unit="%"/>
<parameter name="POP_showers" numDims="1" type="INT" unit="%"/>
<parameter name="PQPF_12hr" numDims="1" type="INT" unit="%"/>
<parameter name="PQPF_6hr" numDims="1" type="INT" unit="%"/>
<parameter name="c_ceiling_bestCat" numDims="1" type="INT" />
<parameter name="c_ceiling_cat1" numDims="1" type="INT" />
<parameter name="c_ceiling_cat2" numDims="1" type="INT" />
<parameter name="c_ceiling_cat3" numDims="1" type="INT" />
<parameter name="c_ceiling_cat4" numDims="1" type="INT" />
<parameter name="c_ceiling_cat5" numDims="1" type="INT" />
<parameter name="c_ceiling_cat6" numDims="1" type="INT" />
<parameter name="c_ceiling_cat7" numDims="1" type="INT" />
<parameter name="c_ceiling_cat8" numDims="1" type="INT" />
<parameter name="c_ceiling_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="c_ceiling_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="c_ceiling_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="c_ceiling_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="c_ceiling_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="c_ceiling_cat6" numDims="1" type="INT" unit="%"/>
<parameter name="c_ceiling_cat7" numDims="1" type="INT" unit="%"/>
<parameter name="c_ceiling_cat8" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_bestCat" numDims="1" type="INT" />
<parameter name="ceiling_cat1" numDims="1" type="INT" />
<parameter name="ceiling_cat2" numDims="1" type="INT" />
<parameter name="ceiling_cat3" numDims="1" type="INT" />
<parameter name="ceiling_cat4" numDims="1" type="INT" />
<parameter name="ceiling_cat5" numDims="1" type="INT" />
<parameter name="ceiling_cat6" numDims="1" type="INT" />
<parameter name="ceiling_cat7" numDims="1" type="INT" />
<parameter name="ceiling_cat8" numDims="1" type="INT" />
<parameter name="clouds_BK" numDims="1" type="INT" />
<parameter name="clouds_CL" numDims="1" type="INT" />
<parameter name="clouds_FW" numDims="1" type="INT" />
<parameter name="clouds_OV" numDims="1" type="INT" />
<parameter name="clouds_SC" numDims="1" type="INT" />
<parameter name="ceiling_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat6" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat7" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat8" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_BK" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_CL" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_FW" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_OV" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_SC" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_bestCat" numDims="1" type="INT" />
<parameter name="cvis_bestCat" numDims="1" type="INT" />
<parameter name="cvis_cat1" numDims="1" type="INT" />
<parameter name="cvis_cat2" numDims="1" type="INT" />
<parameter name="cvis_cat3" numDims="1" type="INT" />
<parameter name="cvis_cat4" numDims="1" type="INT" />
<parameter name="cvis_cat5" numDims="1" type="INT" />
<parameter name="cvis_cat6" numDims="1" type="INT" />
<parameter name="cvis_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="cvis_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="cvis_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="cvis_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="cvis_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="cvis_cat6" numDims="1" type="INT" unit="%"/>
<parameter name="dewpoint" numDims="1" type="FLOAT" unit="K"/>
<parameter name="forecastHr" numDims="1" type="INT" />
<parameter name="obVis_bestCat" numDims="1" type="INT" />
<parameter name="obVis_cat1" numDims="1" type="INT" />
<parameter name="obVis_cat2" numDims="1" type="INT" />
<parameter name="obVis_cat3" numDims="1" type="INT" />
<parameter name="obVis_cat4" numDims="1" type="INT" />
<parameter name="obVis_cat5" numDims="1" type="INT" />
<parameter name="precipFreezing" numDims="1" type="INT" />
<parameter name="precipRain" numDims="1" type="INT" />
<parameter name="precipSnow" numDims="1" type="INT" />
<parameter name="obVis_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="obVis_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="obVis_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="obVis_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="obVis_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="precipFreezing" numDims="1" type="INT" unit="%"/>
<parameter name="precipRain" numDims="1" type="INT" unit="%" />
<parameter name="precipSnow" numDims="1" type="INT" unit="%"/>
<parameter name="precipType" numDims="1" type="INT" />
<parameter name="refTime" numDims="1" type="LONG" unit="ms"/>
<parameter name="refTime" numDims="1" type="LONG" unit="s"/>
<parameter name="temperature" numDims="1" type="FLOAT" unit="K" />
<parameter name="tstorm2hr" numDims="1" type="INT" />
<parameter name="tstorm2hr" numDims="1" type="INT" unit="%"/>
<parameter name="tstorm_bestCat" numDims="1" type="INT" />
<parameter name="uwind" numDims="1" type="FLOAT" />
<parameter name="uwind" numDims="1" type="FLOAT" unit="m/s" />
<parameter name="vis_bestCat" numDims="1" type="INT" />
<parameter name="vis_cat1" numDims="1" type="INT" />
<parameter name="vis_cat2" numDims="1" type="INT" />
<parameter name="vis_cat3" numDims="1" type="INT" />
<parameter name="vis_cat4" numDims="1" type="INT" />
<parameter name="vis_cat5" numDims="1" type="INT" />
<parameter name="vis_cat6" numDims="1" type="INT" />
<parameter name="vwind" numDims="1" type="FLOAT" />
<parameter name="windDir" numDims="1" type="INT" />
<parameter name="vis_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat6" numDims="1" type="INT" unit="%"/>
<parameter name="vwind" numDims="1" type="FLOAT" unit="m/s" />
<parameter name="windDir" numDims="1" type="INT" unit="°"/>
<parameter name="windSpeedInflated" numDims="1" type="FLOAT" unit="m/s"/>
</pointDataDescription>

View file

@ -19,49 +19,49 @@
further_licensing_information.
-->
<pointDataDescription>
<parameter name="QPF24hr_cat2" numDims="1" type="INT" />
<parameter name="QPF24hr_cat3" numDims="1" type="INT" />
<parameter name="QPF24hr_cat1" numDims="1" type="INT" />
<parameter name="QPF24hr_cat4" numDims="1" type="INT" />
<parameter name="QPF24hr_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="QPF24hr_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="QPF24hr_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="QPF24hr_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="precipType" numDims="1" type="INT" />
<parameter name="skyCover_MC" numDims="1" type="INT" />
<parameter name="skyCover_CL" numDims="1" type="INT" />
<parameter name="QPF24hr_cat6" numDims="1" type="INT" />
<parameter name="skyCover_MC" numDims="1" type="INT" unit="%"/>
<parameter name="skyCover_CL" numDims="1" type="INT" unit="%"/>
<parameter name="QPF24hr_cat6" numDims="1" type="INT" unit="%"/>
<parameter name="totalSkyCover" numDims="1" type="INT" />
<parameter name="snow24hr_bestCat" numDims="1" type="INT" />
<parameter name="tstorm24hr" numDims="1" type="INT" />
<parameter name="maxWind_cat4" numDims="1" type="INT" />
<parameter name="maxWind_cat3" numDims="1" type="INT" />
<parameter name="maxWind_cat2" numDims="1" type="INT" />
<parameter name="maxWind_cat1" numDims="1" type="INT" />
<parameter name="precipSnow" numDims="1" type="INT" />
<parameter name="tstorm12hr" numDims="1" type="INT" />
<parameter name="MRF_temp" numDims="1" type="FLOAT" unit="degrees K" />
<parameter name="tstorm24hr" numDims="1" type="INT" unit="%"/>
<parameter name="maxWind_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="maxWind_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="maxWind_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="maxWind_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="precipSnow" numDims="1" type="INT" unit="%"/>
<parameter name="tstorm12hr" numDims="1" type="INT" unit="%"/>
<parameter name="MRF_temp" numDims="1" type="FLOAT" unit="K" />
<parameter name="maxTempDay" numDims="1" type="FLOAT" unit="K" />
<parameter name="condPrecipAmt_24hr" numDims="1" type="FLOAT" unit="Kg/m**2" />
<parameter name="QPF12hr_cat5" numDims="1" type="INT" />
<parameter name="QPF12hr_cat4" numDims="1" type="INT" />
<parameter name="QPF12hr_cat3" numDims="1" type="INT" />
<parameter name="POP12hr" numDims="1" type="INT" />
<parameter name="QPF12hr_cat1" numDims="1" type="INT" />
<parameter name="windSpeedInflated" numDims="1" type="FLOAT" />
<parameter name="QPF12hr_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="POP12hr" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="windSpeedInflated" numDims="1" type="FLOAT" unit="m/s" />
<parameter name="proj_hour" numDims="1" type="INT" />
<parameter name="POP24hr" numDims="1" type="INT" />
<parameter name="precipFreezing" numDims="1" type="INT" />
<parameter name="maxWindExpected" numDims="1" type="FLOAT" />
<parameter name="MRF_dewpoint" numDims="1" type="FLOAT" unit="degrees K" />
<parameter name="QPF24hr_cat5" numDims="1" type="INT" />
<parameter name="POP24hr" numDims="1" type="INT" unit="%"/>
<parameter name="precipFreezing" numDims="1" type="INT" unit="%"/>
<parameter name="maxWindExpected" numDims="1" type="FLOAT" unit="m/s"/>
<parameter name="MRF_dewpoint" numDims="1" type="FLOAT" unit="K" />
<parameter name="QPF24hr_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="minTempNight" numDims="1" type="FLOAT" unit="K" />
<parameter name="QPF24hr_bestCat" numDims="1" type="INT" />
<parameter name="precipMix" numDims="1" type="INT" />
<parameter name="QPF12hr_cat2" numDims="1" type="INT" />
<parameter name="snow24hr_cat1" numDims="1" type="INT" />
<parameter name="precipMix" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="snow24hr_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_bestCat" numDims="1" type="INT" />
<parameter name="snow24hr_cat2" numDims="1" type="INT" />
<parameter name="snow24hr_cat6" numDims="1" type="INT" />
<parameter name="snow24hr_cat4" numDims="1" type="INT" />
<parameter name="skyCover_PC" numDims="1" type="INT" />
<parameter name="snow24hr_cat8" numDims="1" type="INT" />
<parameter name="snow24hr_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="snow24hr_cat6" numDims="1" type="INT" unit="%"/>
<parameter name="snow24hr_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="skyCover_PC" numDims="1" type="INT" unit="%"/>
<parameter name="snow24hr_cat8" numDims="1" type="INT" unit="%"/>
<parameter name="condPrecipAmt_12hr" numDims="1" type="FLOAT" unit="Kg/m**2" />
<parameter name="precipRain" numDims="1" type="INT" />
<parameter name="precipRain" numDims="1" type="INT" unit="%"/>
</pointDataDescription>

View file

@ -19,79 +19,79 @@
further_licensing_information.
-->
<pointDataDescription>
<parameter name="snow12hr_cat2" numDims="1" type="INT" />
<parameter name="snow12hr_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="precipType" numDims="1" type="INT" />
<parameter name="ceiling_cat1" numDims="1" type="INT" />
<parameter name="ceiling_cat2" numDims="1" type="INT" />
<parameter name="snow12hr_cat3" numDims="1" type="INT" />
<parameter name="ceiling_cat4" numDims="1" type="INT" />
<parameter name="ceiling_cat5" numDims="1" type="INT" />
<parameter name="PQPF6hr" numDims="1" type="INT" />
<parameter name="ceiling_cat7" numDims="1" type="INT" />
<parameter name="ceiling_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="snow12hr_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="PQPF6hr" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat7" numDims="1" type="INT" unit="%"/>
<parameter name="vis_bestCat" numDims="1" type="INT" />
<parameter name="vis_cat4" numDims="1" type="INT" />
<parameter name="vis_cat1" numDims="1" type="INT" />
<parameter name="precipSnow" numDims="1" type="INT" />
<parameter name="vis_cat3" numDims="1" type="INT" />
<parameter name="vis_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="precipSnow" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="snow12hr_bestCat" numDims="1" type="INT" />
<parameter name="QPF6hr_cat3" numDims="1" type="INT" />
<parameter name="QPF6hr_cat2" numDims="1" type="INT" />
<parameter name="QPF6hr_cat1" numDims="1" type="INT" />
<parameter name="severe12hr" numDims="1" type="INT" />
<parameter name="QPF6hr_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="QPF6hr_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="QPF6hr_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="severe12hr" numDims="1" type="INT" unit="%"/>
<parameter name="windSpeedInflated" numDims="1" type="FLOAT" unit="m/s" />
<parameter name="obVis_bestCat" numDims="1" type="INT" />
<parameter name="obVis_cat4" numDims="1" type="INT" />
<parameter name="clouds_SC" numDims="1" type="INT" />
<parameter name="obVis_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_SC" numDims="1" type="INT" unit="%"/>
<parameter name="QPF6hr_bestCat" numDims="1" type="INT" />
<parameter name="temperature" numDims="1" type="FLOAT" unit="K" />
<parameter name="snow12hr_cat1" numDims="1" type="INT" />
<parameter name="tstorm6hr" numDims="1" type="INT" />
<parameter name="tstorm24hr" numDims="1" type="INT" />
<parameter name="POP_rain" numDims="1" type="INT" />
<parameter name="snow12hr_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="tstorm6hr" numDims="1" type="INT" unit="%"/>
<parameter name="tstorm24hr" numDims="1" type="INT" unit="%"/>
<parameter name="POP_rain" numDims="1" type="INT" unit="%"/>
<parameter name="snow6hr_bestCat" numDims="1" type="INT" />
<parameter name="POP_showers" numDims="1" type="INT" />
<parameter name="clouds_OV" numDims="1" type="INT" />
<parameter name="POP_showers" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_OV" numDims="1" type="INT" unit="%"/>
<parameter name="uwind" numDims="1" type="FLOAT" unit="m/s" />
<parameter name="clouds_BK" numDims="1" type="INT" />
<parameter name="QPF12hr_cat5" numDims="1" type="INT" />
<parameter name="QPF6hr_cat4" numDims="1" type="INT" />
<parameter name="QPF12hr_cat3" numDims="1" type="INT" />
<parameter name="POP12hr" numDims="1" type="INT" />
<parameter name="QPF12hr_cat1" numDims="1" type="INT" />
<parameter name="ceiling_cat6" numDims="1" type="INT" />
<parameter name="ceiling_cat3" numDims="1" type="INT" />
<parameter name="POP6hr" numDims="1" type="INT" />
<parameter name="clouds_BK" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="QPF6hr_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="POP12hr" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat6" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="POP6hr" numDims="1" type="INT" unit="%"/>
<parameter name="dewpoint" numDims="1" type="FLOAT" unit="K" />
<parameter name="proj_hour" numDims="1" type="INT" />
<parameter name="obVis_cat3" numDims="1" type="INT" />
<parameter name="obVis_cat3" numDims="1" type="INT" unit="%"/>
<parameter name="solarRad" numDims="1" type="FLOAT" unit="J/m**2" />
<parameter name="vis_cat2" numDims="1" type="INT" />
<parameter name="severe24hr" numDims="1" type="INT" />
<parameter name="snow12hr_cat4" numDims="1" type="INT" />
<parameter name="vis_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="severe24hr" numDims="1" type="INT" unit="%"/>
<parameter name="snow12hr_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="POP_bestCat" numDims="1" type="INT" />
<parameter name="sunPop" numDims="1" type="INT" />
<parameter name="sunPop" numDims="1" type="INT" unit="%"/>
<parameter name="maxTemp24Hour" numDims="1" type="FLOAT" unit="K" />
<parameter name="precipFreezing" numDims="1" type="INT" />
<parameter name="precipFreezing" numDims="1" type="INT" unit="%"/>
<parameter name="ceiling_bestCat" numDims="1" type="INT" />
<parameter name="snow6hr_cat2" numDims="1" type="INT" />
<parameter name="snow6hr_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="clouds_bestCat" numDims="1" type="INT" />
<parameter name="tstorm12hr" numDims="1" type="INT" />
<parameter name="vis_cat5" numDims="1" type="INT" />
<parameter name="QPF12hr_cat4" numDims="1" type="INT" />
<parameter name="PQPF12hr" numDims="1" type="INT" />
<parameter name="tstorm12hr" numDims="1" type="INT" unit="%"/>
<parameter name="vis_cat5" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_cat4" numDims="1" type="INT" unit="%"/>
<parameter name="PQPF12hr" numDims="1" type="INT" unit="%"/>
<parameter name="vwind" numDims="1" type="FLOAT" unit="m/s" />
<parameter name="snow6hr_cat1" numDims="1" type="INT" />
<parameter name="snow6hr_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="QPF12hr_bestCat" numDims="1" type="INT" />
<parameter name="POP_drizzle" numDims="1" type="INT" />
<parameter name="POP_drizzle" numDims="1" type="INT" unit="%"/>
<parameter name="Cig_Vis" numDims="1" type="INT" />
<parameter name="QPF12hr_cat2" numDims="1" type="INT" />
<parameter name="windDir" numDims="1" type="INT" />
<parameter name="QPF12hr_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="windDir" numDims="1" type="INT" unit="°"/>
<parameter name="windSpeed" numDims="1" type="FLOAT" unit="m/s" />
<parameter name="minTemp24Hour" numDims="1" type="FLOAT" unit="K" />
<parameter name="obVis_cat1" numDims="1" type="INT" />
<parameter name="obVis_cat2" numDims="1" type="INT" />
<parameter name="severe6hr" numDims="1" type="INT" />
<parameter name="sunHours" numDims="1" type="INT" />
<parameter name="clouds_CL" numDims="1" type="INT" />
<parameter name="precipRain" numDims="1" type="INT" />
<parameter name="obVis_cat1" numDims="1" type="INT" unit="%"/>
<parameter name="obVis_cat2" numDims="1" type="INT" unit="%"/>
<parameter name="severe6hr" numDims="1" type="INT" unit="%"/>
<parameter name="sunHours" numDims="1" type="INT" unit="h"/>
<parameter name="clouds_CL" numDims="1" type="INT" unit="%"/>
<parameter name="precipRain" numDims="1" type="INT" unit="%"/>
</pointDataDescription>

View file

@ -161,17 +161,6 @@ class GribDecoder():
filePointer = 0;
version = -1;
if os.path.exists(self.fileName):
try:
version = grib2.checkVersion(self.fileName)
except:
LogStream.logProblem("Error opening file [", self.fileName, "]: ", sys.exc_info()[1])
return records
else:
LogStream.logProblem("The file does not exist: [", self.fileName, "]")
return records
decodeFile = None
if version == 1:
grib1Decoder = Grib1Decoder()
@ -619,9 +608,9 @@ class GribDecoder():
elif pdsTemplateNumber == 2 or pdsTemplateNumber == 12:
derivedForecast = pdsTemplate[15]
if (derivedForecast == 1):
if (derivedForecast == 1 or derivedForecast == 0 ):
parameterAbbreviation= parameterAbbreviation+"mean"
elif (derivedForecast == 2):
elif (derivedForecast == 2 or derivedForecast == 3 or derivedForecast == 4 ):
parameterAbbreviation= parameterAbbreviation+"sprd"
pdsFields['typeEnsemble'] = Integer(pdsTemplate[15])

View file

@ -11,3 +11,4 @@ com.raytheon.edex.plugin.grib.spatial.FileData
com.raytheon.edex.plugin.grib.spatial.FileDataList
com.raytheon.edex.plugin.grib.decoderpostprocessors.PostProcessedModelSet
com.raytheon.edex.plugin.grib.decoderpostprocessors.PostProcessedModel
com.raytheon.edex.plugin.grib.filenameprocessor.NcgribModelNameMap

View file

@ -67,7 +67,7 @@
<constant>grid</constant>
</setHeader>
<to uri="ingest-grib:queue:Ingest.Grib" />
</route>
</route>
<!-- Begin Grib Decode Route -->
<route id="gribIngestRoute">

View file

@ -50,6 +50,8 @@
class="com.raytheon.edex.plugin.grib.spatial.GribSpatialCache"
factory-method="getInstance" depends-on="gridcoveragelookup"/>
<bean id="ncgribFilenameProcessor" class="com.raytheon.edex.plugin.grib.filenameprocessor.NcgribFileNameProcessor" />
<camelContext id="grib-decode" xmlns="http://camel.apache.org/schema/spring"
errorHandlerRef="errorHandler"
autoStartup="false">
@ -60,6 +62,7 @@
<route id="gribFileConsumerRoute">
<from ref="gribFileEndpoint" />
<bean ref="fileToString" />
<bean ref="ncgribFilenameProcessor" />
<setHeader headerName="pluginName">
<constant>grid</constant>
</setHeader>

View file

@ -0,0 +1,140 @@
package com.raytheon.edex.plugin.grib.filenameprocessor;
/**
* 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.
**/
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.camel.Exchange;
import org.apache.camel.Processor;
/**
*
* Processor for ncep grib files, this processor has lots of hard coded
* assumptions about file naming that need to be more generic based off ncep
* file names.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 1, 2012 bsteffen Initial creation
* May 29, 2013 995 B. Yin Get model name from NcgribModelNameMap
* June, 2013 T. Lee Added NFCENS
*
* </pre>
*
* @author bsteffen
* @version 1.0
*/
public class NcgribFileNameProcessor implements Processor {
// grab all known ensemble ids; mainly SREF
private static final Pattern ENSEMBLE_ID_PATTERN = Pattern
.compile("^(p|n|ctl)\\d{0,2}$");
// grab global wind and wave ensemble IDs
private static final Pattern ENSEMBLE_WAVE_PATTERN = Pattern
.compile("^gep(\\d{0,2}{2})$");
// grab global wind and wave ensemble IDs
private static final Pattern ENSEMBLE_NFC_PATTERN = Pattern
.compile("^HTSGW_(\\d{0,2}{2})$");
// anything that ends in nest is assumed to be a nested grid identifier
// might add alaska fire weather later...
private static final Pattern FIREWXNEST_ID_PATTERN = Pattern
.compile("^firewxnest$");
// anything that ends in nest is assumed to be a nested grid identifier
//private static final Pattern NEST_ID_PATTERN = Pattern.compile("^.*nest$");
// SREF gets special handling, does this apply to other models?
//private static final Pattern SREF_PATTERN = Pattern.compile("^sref_.*$");
// This is the least generic pattern ever, are there any constraints on
// event names, who knows?
private static final Pattern HURRICANE_PATTERN = Pattern
.compile("^([a-z]*)\\d{1,2}[lewcs]$");
private static NcgribModelNameMap modelMap = null;
@Override
public void process(Exchange exchange) throws Exception {
String flName = (String) exchange.getIn()
.getHeader("CamelFileNameOnly");
String datasetid = null;
String secondaryid = null;
String ensembleid = null;
String[] nameTokens = flName.split("\\.");
for (String token : nameTokens) {
if (ENSEMBLE_ID_PATTERN.matcher(token).find()) {
ensembleid = token;
} else if (ENSEMBLE_WAVE_PATTERN.matcher(token).find()) {
Matcher matcher = ENSEMBLE_WAVE_PATTERN.matcher(token);
matcher.find();
ensembleid = matcher.group(1);
} else if (ENSEMBLE_NFC_PATTERN.matcher(token).find()) {
Matcher matcher = ENSEMBLE_NFC_PATTERN.matcher(token);
datasetid = "nfcens";
matcher.find();
ensembleid = matcher.group(1);
} else if (FIREWXNEST_ID_PATTERN.matcher(token).find()) {
//datasetid = "NAMFIREWX";
datasetid = "fireWxNAM";
//secondaryid = token;
//} else if (NEST_ID_PATTERN.matcher(token).find()) {
// secondaryid = token;
//} else if (SREF_PATTERN.matcher(token).find()) {
// String[] tokens = token.split("_");
// datasetid = tokens[0].toUpperCase();
//secondaryid = tokens[1].toUpperCase();
} else if (HURRICANE_PATTERN.matcher(token).find()) {
Matcher matcher = HURRICANE_PATTERN.matcher(token);
matcher.find();
secondaryid = matcher.group(1);
datasetid = "GHM";
if (nameTokens[2].equalsIgnoreCase("gribn3")) {
datasetid = "GHMNEST";
} else if (nameTokens[2].equalsIgnoreCase("grib6th")) {
datasetid = "GHM6TH";
} else if (nameTokens[2].equalsIgnoreCase("hwrfprs_n")) {
datasetid = "HWRFNEST";
} else if (nameTokens[2].equalsIgnoreCase("hwrfprs_p")) {
datasetid = "HWRF";
}
}
}
if ( modelMap == null ) {
modelMap = NcgribModelNameMap.load();
}
if (datasetid == null) {
datasetid = modelMap.getModelName(flName);
}
exchange.getIn().setHeader("datasetid", datasetid);
exchange.getIn().setHeader("secondaryid", secondaryid);
exchange.getIn().setHeader("ensembleid", ensembleid);
}
}

View file

@ -0,0 +1,86 @@
/*
* com.raytheon.edex.plugin.grib.filenameprocessor.NcgribModelNameMap
*
* 29 May 2013
*
* This code has been developed by the NCEP/SIB for use in the AWIPS2 system.
*/
package com.raytheon.edex.plugin.grib.filenameprocessor;
import java.io.File;
import java.util.HashMap;
import java.util.regex.Pattern;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.LocalizationContext;
import com.raytheon.uf.common.localization.PathManagerFactory;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.SerializationUtil;
/**
* Class to hold the model name look up map for ncgrib data file
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 05/13 995 B. Yin Initial Creation.
* </pre>
*
* @author B. Yin
*/
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class NcgribModelNameMap implements ISerializableObject {
/*
* Mapping between file name templates and model names
*/
private HashMap<String, String> mapping;
/**
* Load the ncgrib model name mapping between file name templates and model names.
* @return NcgribModelNameMap
* @throws Exception
*/
public static NcgribModelNameMap load() throws Exception{
IPathManager pathMgr = PathManagerFactory.getPathManager();
LocalizationContext ctx = pathMgr.getContext(
LocalizationContext.LocalizationType.EDEX_STATIC,
LocalizationContext.LocalizationLevel.BASE);
NcgribModelNameMap map = null;
try {
File xmlFile = pathMgr.getFile(ctx, "/grib/ncgrib/ncgribModelNameMap.xml");
map = (NcgribModelNameMap) SerializationUtil
.jaxbUnmarshalFromXmlFile(NcgribModelNameMap.class, xmlFile.getAbsolutePath());
} catch (Exception e) {
throw e;
}
return map;
}
/**
* Gets the model name from the mapping table for the specified file name.
* @param fileName
* @return model name
*/
public String getModelName( String fileName ){
String model = null;
for ( String namePattern : mapping.keySet() ){
if ( Pattern.matches( namePattern, fileName)){
model = mapping.get( namePattern );
break;
}
}
return model;
}
}

View file

@ -51,24 +51,42 @@
<subcenter>0</subcenter>
<grid>2291</grid>
<process>
<id>50</id>
<id>58</id>
<id>18</id>
</process>
</model>
<model>
<name>fens</name>
<center>58</center>
<subcenter>0</subcenter>
<grid>2291</grid>
<process>
<id>50</id>
</process>
</model>
<model>
<name>nogaps</name>
<center>58</center>
<subcenter>0</subcenter>
<grid>361181002</grid>
<process>
<id>50</id>
<id>18</id>
<id>58</id>
</process>
</model>
<model>
<name>fens</name>
<center>58</center>
<subcenter>0</subcenter>
<grid>361181002</grid>
<process>
<id>50</id>
</process>
</model>
<model>
<name>fnmocWave</name>
<center>58</center>

View file

@ -11,6 +11,20 @@
<gribModelSet>
<!-- SUBCENTER 0 -->
<model>
<name>ecmwfP25</name>
<center>98</center>
<subcenter>0</subcenter>
<grid>144072101</grid>
<process>
<id>141</id>
<id>142</id>
<id>143</id>
<id>144</id>
<id>145</id>
</process>
</model>
<model>
<name>ecmwf</name>
<center>98</center>
@ -188,6 +202,9 @@
<id>110</id>
<id>111</id>
<id>112</id>
<id>113</id>
<id>114</id>
<id>115</id>
</process>
</model>
@ -202,6 +219,9 @@
<id>110</id>
<id>111</id>
<id>112</id>
<id>113</id>
<id>114</id>
<id>115</id>
</process>
</model>
@ -216,6 +236,9 @@
<id>110</id>
<id>111</id>
<id>112</id>
<id>113</id>
<id>114</id>
<id>115</id>
</process>
</model>

View file

@ -10,17 +10,6 @@
<gribModelSet>
<!-- SUBCENTER 0 -->
<model>
<name>nogapse</name>
<center>58</center>
<subcenter>0</subcenter>
<grid>360181001</grid>
<process>
<id>1</id>
</process>
</model>
<model>
<name>estofsPR</name>
<center>7</center>
@ -1701,7 +1690,6 @@
<id>77</id>
<id>81</id>
<id>225</id>
<id>255</id>
</process>
</model>
@ -1727,7 +1715,6 @@
<id>77</id>
<id>81</id>
<id>225</id>
<id>255</id>
</process>
</model>
@ -1761,6 +1748,29 @@
</process>
</model>
<model>
<name>gfs</name>
<center>7</center>
<subcenter>0</subcenter>
<grid>145073001</grid>
<process>
<id>96</id>
<id>77</id>
<id>81</id>
</process>
</model>
<model>
<name>gfs</name>
<center>7</center>
<subcenter>0</subcenter>
<grid>375</grid>
<process>
<id>96</id>
<id>81</id>
</process>
</model>
<model>
<name>gdas</name>
<center>7</center>
@ -1791,18 +1801,6 @@
</process>
</model>
<model>
<name>gfs</name>
<center>7</center>
<subcenter>0</subcenter>
<grid>145073001</grid>
<process>
<id>96</id>
<id>77</id>
<id>81</id>
</process>
</model>
<model>
<name>nam12E</name>
<center>7</center>
@ -1945,17 +1943,6 @@
</process>
</model>
<model>
<name>gfs</name>
<center>7</center>
<subcenter>0</subcenter>
<grid>375</grid>
<process>
<id>96</id>
<id>81</id>
</process>
</model>
<model>
<name>gww375</name>
<center>7</center>
@ -2402,27 +2389,7 @@
</model>
<model>
<name>naefsBC</name>
<center>7</center>
<subcenter>2</subcenter>
<grid>375</grid>
<process>
<id>114</id>
</process>
</model>
<model>
<name>naefsBC</name>
<center>7</center>
<subcenter>2</subcenter>
<grid>372</grid>
<process>
<id>114</id>
</process>
</model>
<model>
<name>naefsBC</name>
<name>naefs</name>
<center>7</center>
<subcenter>2</subcenter>
<grid>3</grid>
@ -2431,16 +2398,6 @@
</process>
</model>
<model>
<name>naefsBC</name>
<center>7</center>
<subcenter>2</subcenter>
<grid>361181001</grid>
<process>
<id>114</id>
</process>
</model>
<model>
<name>naefsUS</name>
<center>7</center>

View file

@ -0,0 +1,222 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ncgribModelNameMap>
<mapping>
<entry>
<key>cmc_geavg.*</key>
<value>cmceDerv</value>
</entry>
<entry>
<key>cmc_gespr.*</key>
<value>cmceDerv</value>
</entry>
<entry>
<key>gec00.*anl</key>
<value>gefsAnal</value>
</entry>
<entry>
<key>gep[0-9][0-9].*anl</key>
<value>gefsAnal</value>
</entry>
<entry>
<key>gec00.*bcf.*</key>
<value>gefsBC</value>
</entry>
<entry>
<key>gep[0-9][0-9].*bcf.*</key>
<value>gefsBC</value>
</entry>
<entry>
<key>geavg.*bcf.*</key>
<value>gefsBCDerv</value>
</entry>
<entry>
<key>gespr.*bcf.*</key>
<value>gefsBCDerv</value>
</entry>
<entry>
<key>geavg.*</key>
<value>gefsDerv</value>
</entry>
<entry>
<key>gespr.*</key>
<value>gefsDerv</value>
</entry>
<entry>
<key>HTSGW_mean.*</key>
<value>nfcMean</value>
</entry>
<entry>
<key>HTSGW_probab.*</key>
<value>nfcProb</value>
</entry>
<entry>
<key>HTSGW_spread.*</key>
<value>nfcSprd</value>
</entry>
<entry>
<key>mens.glo_60m.*.grib2</key>
<value>gwwEns</value>
</entry>
<entry>
<key>gep[0-9][0-9].glo_60m.*.grib2</key>
<value>gwwEns</value>
</entry>
<entry>
<key>mean.*</key>
<value>gwwMean</value>
</entry>
<entry>
<key>spread.*.grib2</key>
<value>gwwSprd</value>
</entry>
<entry>
<key>probab.*.grib2</key>
<value>gwwProb</value>
</entry>
<entry>
<key>naefs_geavg.*bcf.*</key>
<value>naefsDervBC</value>
</entry>
<entry>
<key>naefs_gespr.*bcf.*</key>
<value>naefsDervBC</value>
</entry>
<entry>
<key>naefs_gemode.*bcf.*</key>
<value>naefsModeBC</value>
</entry>
<entry>
<key>naefs_ge10pt.*bcf.*</key>
<value>naefs10ptBC</value>
</entry>
<entry>
<key>naefs_ge50pt.*bcf.*</key>
<value>naefs50ptBC</value>
</entry>
<entry>
<key>naefs_ge90pt.*bcf.*</key>
<value>naefs90ptBC</value>
</entry>
<entry>
<key>naefs_geavg.*ndgd_conusf.*grib2</key>
<value>naefsDervUS</value>
</entry>
<entry>
<key>naefs_gespr.*ndgd_conusf.*grib2</key>
<value>naefsDervUS</value>
</entry>
<entry>
<key>naefs_gemode.*ndgd_conusf.*grib2</key>
<value>naefsModeUS</value>
</entry>
<entry>
<key>naefs_ge10pt.*ndgd_conusf.*grib2</key>
<value>naefs10ptUS</value>
</entry>
<entry>
<key>naefs_ge50pt.*ndgd_conusf.*grib2</key>
<value>naefs50ptUS</value>
</entry>
<entry>
<key>naefs_ge90pt.*ndgd_conusf.*grib2</key>
<value>naefs90ptUS</value>
</entry>
<entry>
<key>naefs_geavg.*ndgd_alaskaf.*grib2</key>
<value>naefsDervAK</value>
</entry>
<entry>
<key>naefs_gespr.*ndgd_alaskaf.*grib2</key>
<value>naefsDervAK</value>
</entry>
<entry>
<key>naefs_gemode.*ndgd_alaskaf.*grib2</key>
<value>naefsModeAK</value>
</entry>
<entry>
<key>naefs_ge10pt.*ndgd_alaskaf.*grib2</key>
<value>naefs10ptAK</value>
</entry>
<entry>
<key>naefs_ge50pt.*ndgd_alaskaf.*grib2</key>
<value>naefs50ptAK</value>
</entry>
<entry>
<key>naefs_ge90pt.*ndgd_alaskaf.*grib2</key>
<value>naefs90ptAK</value>
</entry>
<entry>
<key>sref_em.*132.ctl.*</key>
<value>sref16EM</value>
</entry>
<entry>
<key>sref_em.*132.[pn][1-3].*</key>
<value>sref16EM</value>
</entry>
<entry>
<key>sref_nmb.*132.ctl.*</key>
<value>sref16NMB</value>
</entry>
<entry>
<key>sref_nmb.*132.[pn][1-3].*</key>
<value>sref16NMB</value>
</entry>
<entry>
<key>sref_nmm.*132.ctl.*</key>
<value>sref16NMM</value>
</entry>
<entry>
<key>sref_nmm.*132.[pn][1-3].*</key>
<value>sref16NMM</value>
</entry>
<entry>
<key>sref.*132.mean.*</key>
<value>sref16Derv</value>
</entry>
<entry>
<key>sref.*132.prob.*</key>
<value>sref16Derv</value>
</entry>
<entry>
<key>sref.*132.spread.*</key>
<value>sref16Derv</value>
</entry>
<entry>
<key>sref_em.*212.ctl.*</key>
<value>sref40EM</value>
</entry>
<entry>
<key>sref_em.*212.[pn][1-3].*</key>
<value>sref40EM</value>
</entry>
<entry>
<key>sref_nmb.*212.ctl.*</key>
<value>sref40NMB</value>
</entry>
<entry>
<key>sref_nmb.*212.[pn][1-3].*</key>
<value>sref40NMB</value>
</entry>
<entry>
<key>sref_nmm.*212.ctl.*</key>
<value>sref40NMM</value>
</entry>
<entry>
<key>sref_nmm.*212.[pn][1-3].*</key>
<value>sref40NMM</value>
</entry>
<entry>
<key>sref.*212.mean.*</key>
<value>sref40Derv</value>
</entry>
<entry>
<key>sref.*212.prob.*</key>
<value>sref40Derv</value>
</entry>
<entry>
<key>sref.*212.spread.*</key>
<value>sref40Derv</value>
</entry>
</mapping>
</ncgribModelNameMap>

View file

@ -1,5 +1,3 @@
# Product Discipline 10: Oceanographic products, Parameter Category 0: Waves
# 192-254 Reserved for local use
255:255:Missing

View file

@ -58,6 +58,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
* 12/xx/2010 jkorman Complete rewrite.
* 11/29/2012 lbousaidi fixed the decoding issue when the shef starts
* with :
* 6/27/2013 16225 wkwock Fixed trail with slash and space issue.
*
* </pre>
*
* @author bphillip
@ -716,7 +718,8 @@ public class ShefSeparator extends AbstractRecordSeparator {
private static boolean findTrailingSlash(String data) {
boolean trailingSlash = false;
if ((data != null) && (data.length() > 0)) {
trailingSlash = (data.charAt(data.length() - 1) == '/');
String trimData = data.trim();
trailingSlash = (trimData.charAt(trimData.length() - 1) == '/');
}
return trailingSlash;
}

View file

@ -418,6 +418,11 @@
<keyValue>MPE-Local</keyValue>
<versionsToKeep>72</versionsToKeep>
</rule>
<!-- Purge rule for the MPE (MPE-Mosaic) model -->
<rule>
<keyValue>MPE-Mosaic</keyValue>
<versionsToKeep>72</versionsToKeep>
</rule>
<!-- Purge rule for the TPCWindProb (TPCWindProb) model -->
<rule>
<keyValue>TPCWindProb</keyValue>

View file

@ -78,6 +78,24 @@ import com.raytheon.uf.edex.plugin.scan.process.V700Product;
import com.raytheon.uf.edex.plugin.scan.process.VILProduct;
import com.vividsolutions.jts.geom.Coordinate;
/**
*
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* (prior history is missing)
* Jun 21, 2013 7613 zhao Modified setGridRecords() etc.
*
* </pre>
*
* @author unknown
* @version 1.0
*/
public class ScanURIFilter extends URIFilter {
/**
*
@ -818,7 +836,7 @@ public class ScanURIFilter extends URIFilter {
} catch (Exception e) {
logger.debug("No UA record data available.....");
// e.printStackTrace();
e.printStackTrace();
}
return sounding;
@ -868,54 +886,76 @@ public class ScanURIFilter extends URIFilter {
*/
public void setGridRecords() {
try {
GridRecord[] records = { null, null, null, null, null, null, null,
null };
GridRecord[] records = { null, null, null, null, null, null, null };
records = getGridRecords();
scan.getCache()
.getModelData()
.setGridRecord(
site.getModelParameter(CAPEProduct.cape)
.getModelName(), CAPEProduct.cape,
records[0]);
scan.getCache()
.getModelData()
.setGridRecord(
site.getModelParameter(HELIProduct.heli)
.getModelName(), HELIProduct.heli,
records[1]);
scan.getCache()
.getModelData()
.setGridRecord(
site.getModelParameter(U500Product.U500)
.getModelName(), U500Product.U500,
records[2]);
scan.getCache()
.getModelData()
.setGridRecord(
site.getModelParameter(U700Product.U700)
.getModelName(), U700Product.U700,
records[3]);
scan.getCache()
.getModelData()
.setGridRecord(
site.getModelParameter(V700Product.V700)
.getModelName(), V700Product.V700,
records[4]);
scan.getCache()
.getModelData()
.setGridRecord(
site.getModelParameter(GH500Product.GH500)
.getModelName(), GH500Product.GH500,
records[5]);
scan.getCache()
.getModelData()
.setGridRecord(
site.getModelParameter(GH1000Product.GH1000)
.getModelName(), GH1000Product.GH1000,
records[6]);
} catch (Exception e) {
logger.debug("Grib record setter failed.....");
}
if (records[0] != null) {
scan.getCache()
.getModelData()
.setGridRecord(
site.getModelParameter(CAPEProduct.cape)
.getModelName(), CAPEProduct.cape,
records[0]);
}
if (records[1] != null) {
scan.getCache()
.getModelData()
.setGridRecord(
site.getModelParameter(HELIProduct.heli)
.getModelName(), HELIProduct.heli,
records[1]);
}
if (records[2] != null) {
scan.getCache()
.getModelData()
.setGridRecord(
site.getModelParameter(U500Product.U500)
.getModelName(), U500Product.U500,
records[2]);
}
if (records[3] != null) {
scan.getCache()
.getModelData()
.setGridRecord(
site.getModelParameter(U700Product.U700)
.getModelName(), U700Product.U700,
records[3]);
}
if (records[4] != null) {
scan.getCache()
.getModelData()
.setGridRecord(
site.getModelParameter(V700Product.V700)
.getModelName(), V700Product.V700,
records[4]);
}
if (records[5] != null) {
scan.getCache()
.getModelData()
.setGridRecord(
site.getModelParameter(GH500Product.GH500)
.getModelName(), GH500Product.GH500,
records[5]);
}
if (records[6] != null) {
scan.getCache()
.getModelData()
.setGridRecord(
site.getModelParameter(GH1000Product.GH1000)
.getModelName(), GH1000Product.GH1000,
records[6]);
}
} catch (Exception e) {
logger.debug("Grib record setter failed.....");
e.printStackTrace();
}
}
/**
@ -1103,25 +1143,37 @@ public class ScanURIFilter extends URIFilter {
*/
public GridRecord[] getGridRecords() throws PluginException {
GridRecord[] records = { null, null, null, null, null, null, null, null };
GridRecord[] records = { null, null, null, null, null, null, null };
try {
String[] modelUris = getModelSQL();
// CAPE
records[0] = DATUtils.getGridRecord(modelUris[0]);
// HELI
records[1] = DATUtils.getGridRecord(modelUris[1]);
// U500
records[2] = DATUtils.getGridRecord(modelUris[2]);
// U700
records[3] = DATUtils.getGridRecord(modelUris[3]);
// V700
records[4] = DATUtils.getGridRecord(modelUris[4]);
// GH500
records[5] = DATUtils.getGridRecord(modelUris[5]);
// GH1000
records[6] = DATUtils.getGridRecord(modelUris[6]);
for ( String uri : modelUris ) {
logger.info(" model uri = " + uri );
}
for ( int i = 0; i < modelUris.length; i++ ) {
if ( !modelUris[i].isEmpty() ) {
records[i] = DATUtils.getGridRecord(modelUris[i]);
} else {
logger.info(" modelUris[" + i + "] is empty");
}
}
// // CAPE
// records[0] = DATUtils.getGridRecord(modelUris[0]);
// // HELI
// records[1] = DATUtils.getGridRecord(modelUris[1]);
// // U500
// records[2] = DATUtils.getGridRecord(modelUris[2]);
// // U700
// records[3] = DATUtils.getGridRecord(modelUris[3]);
// // V700
// records[4] = DATUtils.getGridRecord(modelUris[4]);
// // GH500
// records[5] = DATUtils.getGridRecord(modelUris[5]);
// // GH1000
// records[6] = DATUtils.getGridRecord(modelUris[6]);
} catch (Exception e) {
logger.error("No Grib record(s) found.....");
logger.error(e.toString());
e.printStackTrace();
}
return records;
}
@ -1133,33 +1185,69 @@ public class ScanURIFilter extends URIFilter {
private String[] getModelSQL() throws Exception {
SCANSiteXML site = scan.getRunConfig().getSiteConfig(getIcao());
int interval = 1440;
logger.info(" site = " + site.getScanSite());
int interval = 1440*3;
// Set interval to 1 day, 1440 minutes
Object[] objectsCapeUri = scan.dbRequest(CAPEProduct.getSQL(interval,
site.getModelParameter(CAPEProduct.cape).getModelName()));
Object[] objectsHeliUri = scan.dbRequest(HELIProduct.getSQL(interval,
site.getModelParameter(HELIProduct.heli).getModelName()));
Object[] objectsU500Uri = scan.dbRequest(U500Product.getSQL(interval,
site.getModelParameter(U500Product.U500).getModelName()));
Object[] objectsU700Uri = scan.dbRequest(U700Product.getSQL(interval,
site.getModelParameter(U700Product.U700).getModelName()));
Object[] objectsV700Uri = scan.dbRequest(V700Product.getSQL(interval,
site.getModelParameter(V700Product.V700).getModelName()));
Object[] objectsGH500Uri = scan.dbRequest(GH500Product.getSQL(interval,
site.getModelParameter(GH500Product.GH500).getModelName()));
Object[] objectsGH1000Uri = scan.dbRequest(GH1000Product.getSQL(
interval, site.getModelParameter(GH1000Product.GH1000)
.getModelName()));
String modelCape = site.getModelParameter(CAPEProduct.cape).getModelName();
String sqlCapeUri = CAPEProduct.getSQL(interval,modelCape);
logger.info("modelCape = " + modelCape + "; sqlCapeUri = " + sqlCapeUri);
Object[] objectsCapeUri = scan.dbRequest(sqlCapeUri);
String modelHeli = site.getModelParameter(HELIProduct.heli).getModelName();
String sqlHeliUri = HELIProduct.getSQL(interval,modelHeli);
logger.info("modelHeli = " + modelHeli + "; sqlHeliUri = " + sqlHeliUri);
Object[] objectsHeliUri = scan.dbRequest(sqlHeliUri);
String modelU500 = site.getModelParameter(U500Product.U500).getModelName();
String sqlU500Uri = U500Product.getSQL(interval,modelU500);
logger.info("modelU500 = " + modelU500 + "; sqlU500Uri = " + sqlU500Uri);
Object[] objectsU500Uri = scan.dbRequest(sqlU500Uri);
String modelU700 = site.getModelParameter(U700Product.U700).getModelName();
String sqlU700Uri = U700Product.getSQL(interval,modelU700);
logger.info("modelU700 = " + modelU700 + "; sqlU700Uri = " + sqlU700Uri);
Object[] objectsU700Uri = scan.dbRequest(sqlU700Uri);
String modelV700 = site.getModelParameter(V700Product.V700).getModelName();
String sqlV700Uri = V700Product.getSQL(interval,modelV700);
logger.info("modelV700 = " + modelV700 + "; sqlV700Uri = " + sqlV700Uri);
Object[] objectsV700Uri = scan.dbRequest(sqlV700Uri);
String modelGH500 = site.getModelParameter(GH500Product.GH500).getModelName();
String sqlGH500Uri = GH500Product.getSQL(interval,modelGH500);
logger.info("modelGH500 = " + modelGH500 + "; sqlGH500Uri = " + sqlGH500Uri);
Object[] objectsGH500Uri = scan.dbRequest(sqlGH500Uri);
String modelGH1000 = site.getModelParameter(GH1000Product.GH1000).getModelName();
String sqlGH1000Uri = GH1000Product.getSQL(interval,modelGH1000);
logger.info("modelGH1000 = " + modelGH1000 + "; sqlGH1000Uri = " + sqlGH1000Uri);
Object[] objectsGH1000Uri = scan.dbRequest(sqlGH1000Uri);
// always grab the most recent time data
String[] results = { "", "", "", "", "", "", "", "" };
results[0] = (String) objectsCapeUri[0];
results[1] = (String) objectsHeliUri[0];
results[2] = (String) objectsU500Uri[0];
results[3] = (String) objectsU700Uri[0];
results[4] = (String) objectsV700Uri[0];
results[5] = (String) objectsGH500Uri[0];
results[6] = (String) objectsGH1000Uri[0];
String[] results = { "", "", "", "", "", "", ""};
if (objectsCapeUri.length > 0) {
results[0] = (String) objectsCapeUri[0];
}
if (objectsHeliUri.length > 0) {
results[1] = (String) objectsHeliUri[0];
}
if (objectsU500Uri.length > 0) {
results[2] = (String) objectsU500Uri[0];
}
if (objectsU700Uri.length > 0) {
results[3] = (String) objectsU700Uri[0];
}
if (objectsV700Uri.length > 0) {
results[4] = (String) objectsV700Uri[0];
}
if (objectsGH500Uri.length > 0) {
results[5] = (String) objectsGH500Uri[0];
}
if (objectsGH1000Uri.length > 0) {
results[6] = (String) objectsGH1000Uri[0];
}
return results;
}

View file

@ -34,7 +34,8 @@ import com.raytheon.uf.edex.plugin.scan.ScanURIFilter;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Mar 2, 2012 bsteffen Initial creation
* Mar 2, 2012 bsteffen Initial creation
* Jun 21, 2013 7613 zhao Modified getGrigSQL()
*
* </pre>
*
@ -118,7 +119,7 @@ public abstract class GridProduct extends ScanProduct {
// interval
sql.append("and reftime > (now()- interval \'" + interval
+ " minutes\')");
sql.append(" order by forecasttime desc" + " limit 1");
sql.append(" order by reftime desc, forecasttime desc" + " limit 1");
return sql.toString();
}
}

View file

@ -40,6 +40,7 @@ import com.raytheon.uf.edex.plugin.scan.ScanURIFilter;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* May 18, 2010 5098 grichard Initial creation
* Jun 20, 2013 7613 zhao Modified getSQL()
*
* </pre>
*
@ -136,7 +137,7 @@ public class HELIProduct extends GridProduct {
* @return
*/
public static String getSQL(int interval, String model) {
return getGridSQL(interval, model, "Heli", "SFC", "0.0",
Level.getInvalidLevelValueAsString());
return getGridSQL(interval, model, "Heli", "FHAG", "0.0",
"3000.0");
}
}

View file

@ -458,4 +458,32 @@
version="0.0.0"
unpack="false"/>
<plugin
id="gov.noaa.nws.ncep.common.dataplugin.geomag"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="gov.noaa.nws.ncep.edex.plugin.geomag"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="gov.noaa.nws.ncep.common.dataplugin.pgen"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="gov.noaa.nws.ncep.edex.plugin.pgen"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>

View file

@ -94,11 +94,4 @@
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"/>
</feature>

View file

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="com.raytheon.uf.viz.ncep.core.feature"
label="NCEP Viz Core Feature"
version="1.0.0.qualifier"
provider-name="RAYTHEON">
<description url="http://www.example.com/description">
[Enter Feature Description here.]
</description>
<copyright url="http://www.example.com/copyright">
[Enter Copyright Description here.]
</copyright>
<license url="http://www.example.com/license">
[Enter License Description here.]
</license>
<requires>
<import feature="com.raytheon.uf.viz.cots.feature" version="1.0.0.qualifier"/>
<import feature="com.raytheon.uf.viz.common.core.feature" version="1.0.0.qualifier"/>
<import feature="com.raytheon.uf.viz.core.feature" version="1.0.0.qualifier"/>
<import feature="com.raytheon.viz.text.feature" version="1.0.0.qualifier"/>
</requires>
<plugin
id="gov.noaa.nws.ncep.viz.common"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="gov.noaa.nws.ncep.viz.localization"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="gov.noaa.nws.ncep.common"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="gov.noaa.nws.ncep.edex.common"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="gov.noaa.nws.ncep.gempak.parameters"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="gov.noaa.nws.ncep.common.log"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="gov.noaa.nws.ncep.common.log4j.config"
download-size="0"
install-size="0"
version="0.0.0"
fragment="true"/>
<plugin
id="gov.noaa.nws.ncep.viz.ui.display"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="gov.noaa.nws.ncep.gempak.parameters.core"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="gov.noaa.nws.ncep.common.staticdata"
download-size="0"
install-size="0"
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"/>
</feature>

View file

@ -15,8 +15,7 @@
* 05/27/10 100 F. J. Yen Refactored from to11dr3 for tolldr11
* Apr 4, 2013 1846 bkowal Added an index on refTime and forecastTime
* Apr 12, 2013 1857 bgonzale Added SequenceGenerator annotation.
* May 07, 2013 1869 bsteffen Remove dataURI column from
* PluginDataObject.
* 03/07/13 982 Archana Updated getPointNum() to return an Integer
*
* *
* This code has been developed by the SIB for use in the AWIPS2 system.
@ -33,8 +32,6 @@ import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
import java.util.Calendar;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.SequenceGenerator;
@ -165,7 +162,7 @@ public class IdftRecord extends PluginDataObject{
this.validTime=validTime;
}
public int getPointNum(){
public Integer getPointNum(){
return pointNum;
}
public void setPointNum(Integer pointNum){
@ -200,11 +197,4 @@ public class IdftRecord extends PluginDataObject{
this.distanceNm=distanceNm;
}
@Override
@Column
@Access(AccessType.PROPERTY)
public String getDataURI() {
return super.getDataURI();
}
}

View file

@ -13,7 +13,6 @@ Export-Package: gov.noaa.nws.ncep.edex.common.dao,
gov.noaa.nws.ncep.edex.common.ncinventory,
gov.noaa.nws.ncep.edex.common.sounding,
gov.noaa.nws.ncep.edex.common.stationTables,
gov.noaa.nws.ncep.edex.locations,
gov.noaa.nws.ncep.edex.tools.decoder,
gov.noaa.nws.ncep.edex.util

View file

@ -1,78 +0,0 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2009.05.05 at 04:38:50 PM EDT
//
package gov.noaa.nws.ncep.edex.locations;
import java.util.ArrayList;
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.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element ref="{}idftPoint" maxOccurs="unbounded"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"idftPoint"
})
@XmlRootElement(name = "idftLocs")
public class IdftLocs {
@XmlElement(required = true)
protected List<IdftPoint> idftPoint;
/**
* Gets the value of the idftPoint property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the idftPoint property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getIdftPoint().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link IdftPoint }
*
*
*/
public List<IdftPoint> getIdftPoint() {
if (idftPoint == null) {
idftPoint = new ArrayList<IdftPoint>();
}
return this.idftPoint;
}
}

View file

@ -1,71 +0,0 @@
/**
* This function reads the Idft Point Location Table from idftLoc.xml
* and unmarshall it.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 14May2009 98 F. J. Yen Initial Creation
*
* </pre>
*
* @author Fee Jing Yen, SIB
* @version 1
*/
package gov.noaa.nws.ncep.edex.locations;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.List;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
public class IdftLocsTableReader {
private final String PACKAGE = "gov.noaa.nws.ncep.edex.locations";
private String xmlFilename = null;
public IdftLocsTableReader(String file) {
/*
* file is the full name including the path for the
* idft point location xml file, idftLoc.xml
*/
xmlFilename = file;
}
public List<IdftPoint> getIdftLocsTable() throws JAXBException{
File xmlFile = new File(xmlFilename);
JAXBContext context = JAXBContext.newInstance(
PACKAGE);
Unmarshaller unmarshaller = context.createUnmarshaller();
IdftLocs loc = null;
try {
loc = (IdftLocs)unmarshaller.unmarshal(
new FileReader(xmlFile));
List<IdftPoint> listOfItems = loc.getIdftPoint();
return listOfItems;
} catch (FileNotFoundException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (NullPointerException e2) {
e2.printStackTrace();
}
return null;
}
}

View file

@ -1,203 +0,0 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2009.05.05 at 04:38:50 PM EDT
//
package gov.noaa.nws.ncep.edex.locations;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element ref="{}stid"/>
* &lt;element ref="{}stnnum"/>
* &lt;element ref="{}stnname"/>
* &lt;element ref="{}latitude"/>
* &lt;element ref="{}longitude"/>
* &lt;element ref="{}elevation"/>
* &lt;element ref="{}priority"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"stid",
"stnnum",
"stnname",
"latitude",
"longitude",
"elevation",
"priority"
})
@XmlRootElement(name = "idftPoint")
public class IdftPoint {
@XmlElement(required = true)
protected String stid;
@XmlElement(required = true)
protected String stnnum;
@XmlElement(required = true)
protected String stnname;
protected float latitude;
protected float longitude;
protected int elevation;
protected int priority;
/**
* Gets the value of the stid property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getStid() {
return stid;
}
/**
* Sets the value of the stid property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setStid(String value) {
this.stid = value;
}
/**
* Gets the value of the stnnum property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getStnnum() {
return stnnum;
}
/**
* Sets the value of the stnnum property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setStnnum(String value) {
this.stnnum = value;
}
/**
* Gets the value of the stnname property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getStnname() {
return stnname;
}
/**
* Sets the value of the stnname property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setStnname(String value) {
this.stnname = value;
}
/**
* Gets the value of the latitude property.
*
*/
public float getLatitude() {
return latitude;
}
/**
* Sets the value of the latitude property.
*
*/
public void setLatitude(float value) {
this.latitude = value;
}
/**
* Gets the value of the longitude property.
*
*/
public float getLongitude() {
return longitude;
}
/**
* Sets the value of the longitude property.
*
*/
public void setLongitude(float value) {
this.longitude = value;
}
/**
* Gets the value of the elevation property.
*
*/
public int getElevation() {
return elevation;
}
/**
* Sets the value of the elevation property.
*
*/
public void setElevation(int value) {
this.elevation = value;
}
/**
* Gets the value of the priority property.
*
*/
public int getPriority() {
return priority;
}
/**
* Sets the value of the priority property.
*
*/
public void setPriority(int value) {
this.priority = value;
}
}

View file

@ -1,128 +0,0 @@
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.3 in JDK 1.6
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2009.05.05 at 04:38:50 PM EDT
//
package gov.noaa.nws.ncep.edex.locations;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.namespace.QName;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the generated package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {
private final static QName _Stid_QNAME = new QName("", "stid");
private final static QName _Stnnum_QNAME = new QName("", "stnnum");
private final static QName _Priority_QNAME = new QName("", "priority");
private final static QName _Elevation_QNAME = new QName("", "elevation");
private final static QName _Longitude_QNAME = new QName("", "longitude");
private final static QName _Stnname_QNAME = new QName("", "stnname");
private final static QName _Latitude_QNAME = new QName("", "latitude");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: generated
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link IdftLocs }
*
*/
public IdftLocs createIdftLocs() {
return new IdftLocs();
}
/**
* Create an instance of {@link IdftPoint }
*
*/
public IdftPoint createIdftPoint() {
return new IdftPoint();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
*
*/
@XmlElementDecl(namespace = "", name = "stid")
public JAXBElement<String> createStid(String value) {
return new JAXBElement<String>(_Stid_QNAME, String.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
*
*/
@XmlElementDecl(namespace = "", name = "stnnum")
public JAXBElement<String> createStnnum(String value) {
return new JAXBElement<String>(_Stnnum_QNAME, String.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link Integer }{@code >}}
*
*/
@XmlElementDecl(namespace = "", name = "priority")
public JAXBElement<Integer> createPriority(Integer value) {
return new JAXBElement<Integer>(_Priority_QNAME, Integer.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link Integer }{@code >}}
*
*/
@XmlElementDecl(namespace = "", name = "elevation")
public JAXBElement<Integer> createElevation(Integer value) {
return new JAXBElement<Integer>(_Elevation_QNAME, Integer.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link Float }{@code >}}
*
*/
@XmlElementDecl(namespace = "", name = "longitude")
public JAXBElement<Float> createLongitude(Float value) {
return new JAXBElement<Float>(_Longitude_QNAME, Float.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
*
*/
@XmlElementDecl(namespace = "", name = "stnname")
public JAXBElement<String> createStnname(String value) {
return new JAXBElement<String>(_Stnname_QNAME, String.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link Float }{@code >}}
*
*/
@XmlElementDecl(namespace = "", name = "latitude")
public JAXBElement<Float> createLatitude(Float value) {
return new JAXBElement<Float>(_Latitude_QNAME, Float.class, null, value);
}
}

View file

@ -1,4 +0,0 @@
/**
* Contains supporting and test methods for reading and unmarshalling idftLocs.tbl
*/
package gov.noaa.nws.ncep.edex.locations;

View file

@ -1,51 +0,0 @@
/**
* This function tests the Idft Point Location Table Reader, IdftLocsTableReader
* by printing out all the elements in the XML file. It also gets the first and
* last element from the list and prints them out
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 12May2009 98 F. J. Yen Initial Creation
*
* </pre>
*
* @author Fee Jing Yen, SIB
* @version 1
*/
package gov.noaa.nws.ncep.edex.locations;
import java.util.List;
public class test_IdftLocsTableReader {
public static void main(String args[]) throws Exception{
String idftLocsXmlName = "../build.edex/esb/data/utility/edex_static/base/ncep/stns/idftLoc.xml";
IdftLocsTableReader myloc = new IdftLocsTableReader (idftLocsXmlName);
List<IdftPoint> list = myloc.getIdftLocsTable();
for(IdftPoint itm : list){
System.out.println(
" Stid = " + itm.getStid() +
" Stnnum= " + itm.getStnnum() +
" Stnname = " + itm.getStnname() +
" Latitude = " + itm.getLatitude() +
" Longitude =" + itm.getLongitude() +
" Elevation =" + itm.getElevation() +
" Priortiy =" + itm.getPriority() );
}
// Get the first and last elements of the list and print them along with the list size
System.out.println(" Stid(0)=" + list.get(0).stid
+ " Stnnum(0) = " + list.get(0).stnnum
+ " Stnname(0) = " + list.get(0).stnname
+ " Latitude(0) = " + list.get(0).latitude
+ " Longitude(0) = " + list.get(0).longitude
+ "\n Stid(206) = " + list.get(206).stid
+ " Stnnum(206) = " + list.get(206).stnnum
+ " Stnname(206) = " + list.get(206).stnname
+ " Latitude(206) = " + list.get(206).latitude
+ " Longitude(206) = " + list.get(206).longitude
+ "\n size = " + list.size());
}
}

View file

@ -40,6 +40,7 @@ import com.raytheon.uf.common.time.DataTime;
* ----------- ---------- ----------- --------------------------
* 03/27/2013 #975 sgurung Initial Creation
* 04/26/2013 #975 qzhou Added unit checkup. Declared missingVal.
* 06/07/2013 #975 qzhou Fixed an error on conversion
* </pre>
*
* @author sgurung
@ -291,8 +292,8 @@ public class GeoMagDecoder extends AbstractDecoder {
d = comp2Val;
if (h != null && d != null) {
comp1Val = (float) (h * Math.cos(d));
comp2Val = (float) (h * Math.sin(d));
comp1Val = (float) (h * Math.cos(Math.toRadians(d)));
comp2Val = (float) (h * Math.sin(Math.toRadians(d)));
}
}

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<requestPatterns xmlns:ns2="group">
<regex>^*</regex>
<regex></regex>
</requestPatterns>

View file

@ -15,6 +15,8 @@
* Remove unneeded imports after using generic StationTable
* 08Dec2009 100 F. J. Yen Modified to11d3 to to11d6
* 27May2010 100 F. J. Yen Migrated from to11dr3 to to11dr11
* Mar152013 982 Archana get idftLoc.xml from localization correctly and store
* stns in a map instead of a list
*
* </pre>
*
@ -22,47 +24,58 @@
*/
package gov.noaa.nws.ncep.edex.plugin.idft.util;
import static com.raytheon.uf.common.localization.LocalizationContext.LocalizationType.EDEX_STATIC;
import gov.noaa.nws.ncep.common.dataplugin.idft.IdftRecord;
import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN;
import gov.noaa.nws.ncep.edex.common.stationTables.Station;
import gov.noaa.nws.ncep.edex.common.stationTables.StationTable;
import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import com.raytheon.uf.common.localization.IPathManager;
import com.raytheon.uf.common.localization.LocalizationContext;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
import com.raytheon.uf.common.localization.LocalizationFile;
import com.raytheon.uf.common.localization.PathManagerFactory;
public class IdftParser {
private static List<Station> list = null;
private static Map<Integer,Station> idftStnsMap = null;
public IdftParser() {
}
public static synchronized void readIdftLocs() throws Exception {
final String NCEP_DIR = "ncep";
final String stnsDir = "stns";
final String idftLocTableName = "idftLoc.xml";
final String idftLocTableName = "ncep/stns/idftLoc.xml";
IPathManager manager = PathManagerFactory.getPathManager();
LocalizationContext baseContext = null;
File baseDir = null;
String stnsFileName = null;
baseContext = manager.getContext(EDEX_STATIC, LocalizationLevel.BASE);
baseDir = manager.getFile(baseContext, NCEP_DIR);
stnsFileName = baseDir + File.separator + stnsDir + File.separator
+ idftLocTableName;
StationTable myloc = new StationTable(stnsFileName);
LocalizationFile stnsFile = manager.getStaticLocalizationFile(idftLocTableName );
StationTable myloc = new StationTable( stnsFile.getFile().getAbsolutePath() );
/*
* Read and put the IdftLocsTable in list.
*/
list = myloc.getStationList();
List<Station> idftStnsList = myloc.getStationList();
idftStnsMap = new HashMap<Integer,Station>();
if( idftStnsList != null ) {
for( Station stn : idftStnsList ) {
Integer stnNum = Integer.parseInt( stn.getStnnum() );
if( idftStnsMap.containsKey( stnNum ) ) {
// LOG a warning msg
System.out.println("Duplicate stn num, "+
stn.getStnnum()+ ", in file: "+ stnsFile.getName() );
}
else {
idftStnsMap.put( stnNum, stn );
}
}
}
}
/**
@ -81,42 +94,32 @@ public class IdftParser {
/*
* Regular expression for IDFT report
*/
String stnum;
int istnum;
Float signLl;
record.setPointNum(Integer.parseInt(matchLn.group(1)));
if (itype == 0) {
/*
* If itype equals 0, then no lat/lon in raw data for point. So, get
* lat/lon from unmarshalled idftLoc.xml and then setLat and setLon.
*
* Subtract 1 from indx since index of list starts at 0 whereas the
* IDFT point numbers start at 1.
*/
int indx = Integer.parseInt(matchLn.group(1)) - 1;
try {
stnum = list.get(indx).getStnnum();
istnum = Integer.parseInt(stnum);
/*
* Verify if index matches data.
*/
if (indx == istnum - 1) {
record.setLat(list.get(indx).getLatitude());
record.setLon(list.get(indx).getLongitude());
} else {
System.out
.println("Point number "
+ istnum
+ " does not correspond to its position in idftLoc.xml");
Integer stnNum = Integer.parseInt(matchLn.group(1));
if( !idftStnsMap.containsKey( stnNum ) ) {
// TODO : change this to discard the record instead??
record.setLat(IDecoderConstantsN.FLOAT_MISSING);
record.setLon(IDecoderConstantsN.FLOAT_MISSING);
System.out.println("Stn Num, "+stnNum +", not found in idftLoc.xml station table.");
}
else {
Station stn = idftStnsMap.get( stnNum );
record.setLat(stn.getLatitude());
record.setLon(stn.getLongitude());
}
} catch (IndexOutOfBoundsException e) {
record.setLat(IDecoderConstantsN.FLOAT_MISSING);
record.setLon(IDecoderConstantsN.FLOAT_MISSING);
System.out
.println("Bad index to idftPoint created from idftLocs.xml");
e.printStackTrace();
System.out.println("Bad index to idftPoint created from idftLocs.xml");
}
} else {
/*

View file

@ -46,7 +46,7 @@ public class IdftParserTest {
Matcher m2 = dataLnPattern2.matcher(thePntRec2);
if (m2.find()) {
IdftParser.processIdft(m2, 6, record);
assertEquals (410, record.getPointNum());
assertEquals (410, record.getPointNum().intValue());
assertEquals (-66.8, record.getLat());
assertEquals (-73.3, record.getLon());
assertEquals (253.0F, record.getDirection());
@ -56,7 +56,7 @@ public class IdftParserTest {
m2 = dataLnPattern2.matcher(thePntRec2);
if (m2.find()) {
IdftParser.processIdft(m2, 6, record);
assertEquals (390, record.getPointNum());
assertEquals (390, record.getPointNum().intValue());
assertEquals (50.5, record.getLat());
assertEquals (10.3, record.getLon());
assertEquals (180.0F, record.getDirection());

View file

@ -8,5 +8,6 @@ Import-Package: org.junit
Export-Package: gov.noaa.nws.ncep.gempak.parameters.core.categorymap,
gov.noaa.nws.ncep.gempak.parameters.core.contourinterval,
gov.noaa.nws.ncep.gempak.parameters.core.marshaller.garea,
gov.noaa.nws.ncep.gempak.parameters.core.marshaller.garea.station,
gov.noaa.nws.ncep.gempak.parameters.core.util

View file

@ -85,7 +85,7 @@ public class GeographicalData {
*
*/
public String getGeogCode() {
return geogCode;
return geogCode.trim();
}
/**
@ -97,7 +97,7 @@ public class GeographicalData {
*
*/
public void setGeogCode(String value) {
this.geogCode = value;
this.geogCode = value.trim();
}
/**
@ -109,7 +109,7 @@ public class GeographicalData {
*
*/
public String getGeogAreaName() {
return geogAreaName;
return geogAreaName.trim();
}
/**
@ -121,7 +121,7 @@ public class GeographicalData {
*
*/
public void setGeogAreaName(String value) {
this.geogAreaName = value;
this.geogAreaName = value.trim();
}
/**
@ -289,7 +289,7 @@ public class GeographicalData {
*
*/
public void setMapProjectionString(String value) {
this.mapProjectionString = value;
this.mapProjectionString = value.trim();
}
}

View file

@ -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>

View file

@ -34622,7 +34622,7 @@
<stnname>NAUSORI</stnname>
<state></state>
<country>FJ</country>
<latitude>18.00</latitude>
<latitude>-18.00</latitude>
<longitude>178.00</longitude>
<elevation>5</elevation>
<priority>0</priority>

View file

@ -15,8 +15,11 @@ Import-Package: com.vividsolutions.jts.geom,
com.vividsolutions.jts.io,
com.vividsolutions.jts.operation.valid,
gov.noaa.nws.ncep.common.dataplugin.aww,
gov.noaa.nws.ncep.ui.pgen,
gov.noaa.nws.ncep.viz.common.dbQuery,
gov.noaa.nws.ncep.viz.localization,
gov.noaa.nws.ncep.viz.resources,
gov.noaa.nws.ncep.viz.rsc.wtch.util,
gov.noaa.nws.ncep.viz.resources
org.dom4j,
org.dom4j.io
Export-Package: gov.noaa.nws.ncep.staticdataprovider

View file

@ -12,6 +12,7 @@ import gov.noaa.nws.ncep.common.staticdata.SPCCounty;
import gov.noaa.nws.ncep.viz.common.dbQuery.NcDirectDbQuery;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import com.raytheon.uf.viz.core.catalog.DirectDbQuery.QueryLanguage;
@ -20,6 +21,7 @@ import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryFactory;
import com.vividsolutions.jts.geom.LinearRing;
import com.vividsolutions.jts.geom.MultiPolygon;
import com.vividsolutions.jts.geom.Point;
import com.vividsolutions.jts.geom.Polygon;
import com.vividsolutions.jts.geom.TopologyException;
import com.vividsolutions.jts.io.ParseException;
@ -35,6 +37,7 @@ import com.vividsolutions.jts.operation.valid.TopologyValidationError;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 02/12 ? B. Yin Moved from PGEN
* 06/13 T1000/TTR580 J. Wu Use ID for marine zones (no FIPS).
*
* </pre>
*
@ -48,6 +51,12 @@ public class SPCCountyProvider {
private static volatile boolean countyLoaded = false;
/*
* The 15 marine zones "State" names and its 2-digits IDs in NMAP2.
*/
private static HashMap<String, String> marineZoneStates;
/**
* Get all counties and marine zones from the database
* @return
@ -77,15 +86,21 @@ public class SPCCountyProvider {
String queryStnTbl = "Select station_number, station_id, state, country FROM stns.mzcntys";
String queryCntyBnds = "Select AsBinary(the_geom_0_064), countyname, state, fe_area, cwa, fips, lat, lon FROM mapdata.county";
String queryZoneBnds = "Select AsBinary(the_geom_0_064), id, name, wfo, fips, lat, lon FROM mapdata.marinezones";
boolean noFips4MarineZones = true;
String queryZoneBnds = "Select AsBinary(the_geom_0_064), id, name, wfo, lat, lon FROM mapdata.marinezones";
/* boolean noFips4MarineZones = !marineZoneHasFips();
if ( noFips4MarineZones ) {
queryZoneBnds = "Select AsBinary(the_geom_0_064), id, name, wfo, lat, lon FROM mapdata.marinezones";
}
else {
queryZoneBnds = "Select AsBinary(the_geom_0_064), id, name, wfo, fips, lat, lon FROM mapdata.marinezones";
}
*/
try {
bnds = NcDirectDbQuery.executeQuery(
queryCntyBnds, "maps", QueryLanguage.SQL);
zones = NcDirectDbQuery.executeQuery(
queryZoneBnds, "maps", QueryLanguage.SQL);
stns = NcDirectDbQuery.executeQuery(
queryStnTbl, "ncep", QueryLanguage.SQL);
bnds = NcDirectDbQuery.executeQuery( queryCntyBnds, "maps", QueryLanguage.SQL);
zones = NcDirectDbQuery.executeQuery( queryZoneBnds, "maps", QueryLanguage.SQL);
stns = NcDirectDbQuery.executeQuery( queryStnTbl, "ncep", QueryLanguage.SQL);
WKBReader wkbReader = new WKBReader();
@ -150,12 +165,23 @@ public class SPCCountyProvider {
cntyFips = cntyFips.substring(1);
}
for ( Object[] stn :stns ){
if ( stn[0] != null && ((String)stn[0]).equalsIgnoreCase(cntyFips)){
cntyUgc = (String)stn[1];
cntyCountry = (String)stn[3];
}
/*
* set county UGC and country
*/
cntyCountry = "US";
if ( cntyFips.length() == 4 ) {
cntyUgc = new String( cntySt + "C" + cntyFips.substring(1, 4) );
}
else if ( cntyFips.length() > 4 ) {
cntyUgc = new String( cntySt + "C" + cntyFips.substring(2, 5) );
}
//for ( Object[] stn :stns ){
// if ( stn[0] != null && ((String)stn[0]).equalsIgnoreCase(cntyFips)){
// cntyUgc = (String)stn[1];
// cntyCountry = (String)stn[3];
// }
//}
SPCCounty existingCnty = findCounty( cntyFips );
// if ( existingCnty != null ){
@ -177,6 +203,13 @@ public class SPCCountyProvider {
}
//System.out.println("total counties: "+tt);
int xIndex = 6;
int yIndex = 5;
if ( noFips4MarineZones ) {
xIndex--;
yIndex--;
}
for ( Object[] zn : zones ){
if ( zn[0] != null && zn[1] != null ){ //neither bound nor ugc can be null
@ -203,8 +236,8 @@ public class SPCCountyProvider {
Coordinate loc = new Coordinate(0,0);
try {
loc.x = ((Number)zn[6]).doubleValue();
loc.y = ((Number)zn[5]).doubleValue();
loc.x = ((Number)zn[xIndex]).doubleValue();
loc.y = ((Number)zn[yIndex]).doubleValue();
}
catch ( Exception e ){
e.printStackTrace();
@ -213,8 +246,14 @@ public class SPCCountyProvider {
if ( znName == null ) znName = "";
if ( wfo == null ) wfo ="";
if ( zn[4] != null ) fips = ((Integer)zn[4]).toString();
else fips = "00000";
// Use zone id as FIPS.
if ( !noFips4MarineZones && zn[4] != null ) {
fips = ((Integer)zn[4]).toString();
}
else {
fips = makeMarineZoneFips( (String)zn[1] );
}
zoneGeo = removeSmallShells(zoneGeo, 0.001);
@ -233,16 +272,46 @@ public class SPCCountyProvider {
}
for ( Object[] stn :stns ){
if ( stn[0] != null && ((String)stn[1]).equalsIgnoreCase(ugc)){
znSt = (String)stn[2];
country = (String)stn[3];
}
/*
* set state and country
*/
country = "US";
if ( ugc != null && ugc.length() > 2 ) {
znSt = ugc.substring(0, 2 );
}
//for ( Object[] stn :stns ){
// if ( stn[0] != null && ((String)stn[1]).equalsIgnoreCase(ugc)){
// znSt = (String)stn[2];
// country = (String)stn[3];
// }
//}
//Set centriod.
Point cent = zoneGeo.getCentroid();
if ( cent != null ) {
loc.x = cent.getX();
loc.y = cent.getY();
}
Geometry zgeo = zoneGeo;
SPCCounty existCnty = findCounty( fips );
if ( existCnty != null && existCnty.getName().equalsIgnoreCase( cntyName ) ) {
zgeo = existCnty.getShape().union( zoneGeo );
existCnty.setShape( zgeo );
Point cent1 = zoneGeo.getCentroid();
if ( cent1 != null ) {
loc.x = cent1.getX();
loc.y = cent1.getY();
existCnty.setCentriod( loc );
}
}
else {
SPCCounty cnty = new SPCCounty(fips, cntyName, wfo, ugc, znSt, country,
znName, loc, zoneGeo, mZone);
allCounties.add(cnty);
}
}
}
@ -252,6 +321,7 @@ public class SPCCountyProvider {
System.out.println("db exception reading county tables!");
e.printStackTrace();
}
countyLoaded = true;
}
@ -463,4 +533,80 @@ public class SPCCountyProvider {
return geo;
}
}
/**
* Check if there is "fips" column for marine zone table.
*/
private static boolean marineZoneHasFips() {
boolean hasFips4MarineZones = true;
String queryZoneFips = "Select fips FROM mapdata.marinezones";
try {
NcDirectDbQuery.executeQuery( queryZoneFips, "maps", QueryLanguage.SQL);
}
catch (Exception e ) {
hasFips4MarineZones = false;
}
return hasFips4MarineZones;
}
/**
* The equivalent state names and numeric IDs for marine zones.
* These name/numeric IDs match those used in NMAP2.
*/
private static HashMap<String, String> getMarineZoneStates() {
if ( marineZoneStates == null ) {
marineZoneStates = new HashMap<String, String>();
marineZoneStates.put( "LC", "60" );
marineZoneStates.put( "PZ", "61" );
marineZoneStates.put( "LO", "62" );
marineZoneStates.put( "LE", "63" );
marineZoneStates.put( "LM", "64" );
marineZoneStates.put( "LS", "65" );
marineZoneStates.put( "AM", "66" );
marineZoneStates.put( "AN", "67" );
marineZoneStates.put( "GM", "68" );
marineZoneStates.put( "PK", "69" );
marineZoneStates.put( "PH", "70" );
marineZoneStates.put( "PM", "71" );
marineZoneStates.put( "PS", "72" );
marineZoneStates.put( "SL", "73" );
marineZoneStates.put( "LH", "74" );
}
return marineZoneStates;
}
/**
* Make FIPS for marine zones to match those in Legacy NMAP2.
*
* Each FIPS is a 6-digit number string as following:
*
* The first two number is the numeric ID of a marine zones "State"
* see getMarineZoneStates() above.
*
* The next three digits is the marine zone's assigned id - the
* last three digits in its ID (e. g., 123 in "PKZ123" ).
*
* The last digit is always "0".
*
* 06/10/2013 - Decided to use the marine zone's ID directly as FIPS.
*
*/
private static String makeMarineZoneFips( String mzID ) {
String fips = "000000";
if ( mzID != null && mzID.trim().length() >= 0 ) {
// if ( mzID != null && mzID.trim().length() >= 6 ) {
fips = new String( mzID );
// String stKey = mzID.substring(0, 2).toUpperCase();
// fips = new String( getMarineZoneStates().get( stKey ) + mzID.substring(3, 6) + "0" );
}
return fips;
}
}

View file

@ -13,11 +13,22 @@ import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;
//import java.awt.Color;
import java.io.File;
import com.raytheon.uf.viz.core.catalog.DirectDbQuery.QueryLanguage;
import org.dom4j.Document;
import org.dom4j.Node;
import org.dom4j.io.SAXReader;
//import com.vividsolutions.jts.geom.Coordinate;
//import com.raytheon.uf.viz.core.catalog.DirectDbQuery.QueryLanguage;
//import gov.noaa.nws.ncep.common.staticdata.SPCCounty;
import gov.noaa.nws.ncep.edex.common.stationTables.StationTable;
import gov.noaa.nws.ncep.viz.common.dbQuery.NcDirectDbQuery;
import gov.noaa.nws.ncep.ui.pgen.PgenStaticDataProvider;
//import gov.noaa.nws.ncep.ui.pgen.PgenUtil;
//import gov.noaa.nws.ncep.viz.common.dbQuery.NcDirectDbQuery;
import gov.noaa.nws.ncep.viz.localization.NcPathManager;
import gov.noaa.nws.ncep.viz.localization.NcPathManager.NcPathConstants;
@ -29,6 +40,7 @@ import gov.noaa.nws.ncep.viz.localization.NcPathManager.NcPathConstants;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 02/12 ? B. Yin Moved from PGEN
* 06/13 T1000 J. Wu Move clusters from DB to Localization.
*
* </pre>
*
@ -50,9 +62,24 @@ public class StationTableProvider {
//merged cluster tables
static private HashMap<String,Set<String>> clstTbl;
//Cluster table names
private static String PERM_CLUSTER_TABLE = "WatchCountyPermCluster.xml";
private static String STATE_CLUSTER_TABLE = "WatchCountyStateCluster.xml";
private static String WFO_CLUSTER_TABLE = "WatchCountyWFOCluster.xml";
//Cluster tables
static private Set<String> permClstTbl;
static private Set<String> stateClstTbl;
static private Set<String> wfoClstTbl;
//volcano table
private static StationTable volcanoTbl;
/*
* The 15 marine zones "State" names and its 2-digits IDs in NMAP2.
*/
private static HashMap<String, String> marineZoneStates;
/**
* Return the anchor table
* @return
@ -124,6 +151,11 @@ public class StationTableProvider {
// in the cluster including the key itself in the format of fips1+fips2+...
clstTbl = new HashMap<String, Set<String>>();
/*
* We move the cluster tables from NCEP DB to Localization - so we retrieve those
* tables from PGEN localization now.
*/
/*
List<Object[]> rows1 = null;
List<Object[]> rows2 = null;
List<Object[]> rows3 = null;
@ -147,6 +179,35 @@ public class StationTableProvider {
e.printStackTrace();
}
*/
/*
* Retrieve cluster tables from PGEN localization.
*/
List<Object[]> rows1 = new ArrayList<Object[]>();
List<Object[]> rows2 = new ArrayList<Object[]>();
List<Object[]> rows3 = new ArrayList<Object[]>();
for ( String ss : getWFOClusterTbl() ) {
String clusters = ss.substring( ss.lastIndexOf('|') + 1 );
if ( clusters != null && clusters.length() > 0 ) {
rows1.add( new Object[]{ new String( clusters ) } );
}
}
for ( String ss : getStateClusterTbl() ) {
String clusters = ss.substring( ss.lastIndexOf('|') + 1 );
if ( clusters != null && clusters.length() > 0 ) {
rows2.add( new Object[]{ new String( clusters ) } );
}
}
for ( String ss : getPermClusterTbl() ) {
String clusters = ss.substring( ss.lastIndexOf('|') + 1 );
if ( clusters != null && clusters.length() > 0 ) {
rows3.add( new Object[]{ new String( clusters ) } );
}
}
//For optional cluster A+B, two entries are needed. "A: A+B" and "B: A+B"
List<Object[]> optional = new ArrayList< Object[] >();
@ -212,9 +273,167 @@ public class StationTableProvider {
}
}
// writeClusters();
}
return clstTbl;
}
/**
* The equivalent state names and numeric IDs for marine zones.
* These name/numeric IDs match those used in NMAP2.
*/
private static HashMap<String, String> getMarineZoneStateIDs() {
if ( marineZoneStates == null ) {
marineZoneStates = new HashMap<String, String>();
marineZoneStates.put( "60", "LC" );
marineZoneStates.put( "61", "PZ" );
marineZoneStates.put( "62", "LO" );
marineZoneStates.put( "63", "LE" );
marineZoneStates.put( "64", "LM" );
marineZoneStates.put( "65", "LS" );
marineZoneStates.put( "66", "AM" );
marineZoneStates.put( "67", "AN" );
marineZoneStates.put( "68", "GM" );
marineZoneStates.put( "69", "PK" );
marineZoneStates.put( "70", "PH" );
marineZoneStates.put( "71", "PM" );
marineZoneStates.put( "72", "PS" );
marineZoneStates.put( "73", "SL" );
marineZoneStates.put( "74", "LH" );
}
return marineZoneStates;
}
/**
* Make FIPS for marine zones to match those in Legacy NMAP2.
*
* Each FIPS is a 6-digit number string as following:
*
* The first two number is the numeric ID of a marine zones "State"
* see getMarineZoneStates() above.
*
* The next three digits is the marine zone's assigned id - the
* last three digits in its ID (e. g., 123 in "PKZ123" ).
*
* The last digit is always "0".
*
* 06/10/2013 - Decided to use the marine zone's ID directly as FIPS.
*
*/
private static String makeMarineZoneIDs( String fips ) {
String id = new String( fips );
if ( fips != null && fips.trim().length() >= 4 ) {
String stateID;
if ( fips.trim().length() == 4 ) {
stateID = fips.substring(0, 1);
fips = new String( getMarineZoneStateIDs().get( stateID ) + "Z" + fips.substring(1, 4) );
}
else {
stateID = fips.substring(0, 2);
fips = new String( getMarineZoneStateIDs().get( stateID ) + "Z" + fips.substring(2, 5) );
}
}
return id;
}
/**
* Read a clustering table.
*/
public static Set<String> loadClstTbl( String tblName ){
HashSet<String> clusters = new HashSet<String>();
File clusterFile = PgenStaticDataProvider.getProvider().getStaticFile(
PgenStaticDataProvider.getProvider().getPgenLocalizationRoot() +
tblName );
Document clstDoc = null;
try {
SAXReader reader = new SAXReader();
clstDoc= reader.read( clusterFile .getAbsoluteFile());
} catch (Exception e) {
e.printStackTrace();
}
if ( clstDoc != null ) {
List<Node> clstNodes = clstDoc.selectNodes("/root/countyCluster");
for ( Node n : clstNodes) {
clusters.add( n.getText() );
}
}
return clusters;
}
/**
* Return permanent cluster table
* @return
*/
public static Set<String> getPermClusterTbl(){
if ( permClstTbl == null ){
permClstTbl = loadClstTbl( PERM_CLUSTER_TABLE );
}
return permClstTbl;
}
/**
* Return state cluster table
* @return
*/
public static Set<String> getStateClusterTbl(){
if ( stateClstTbl == null ){
stateClstTbl = loadClstTbl( STATE_CLUSTER_TABLE );
}
return stateClstTbl;
}
/**
* Return WFO cluster table
* @return
*/
public static Set<String> getWFOClusterTbl(){
if ( wfoClstTbl == null ){
wfoClstTbl = loadClstTbl( WFO_CLUSTER_TABLE );
}
return wfoClstTbl;
}
/**
* Write out all clusters to a PGEN file (symbol) for testing.
* @return
*/
/* private static void writeClusters() {
HashSet<String> fips = new HashSet<String>();
List<Coordinate> pts = new ArrayList<Coordinate>();
for ( String ss : clstTbl.keySet() ) {
for ( String sn : clstTbl.get( ss ) ) {
if ( !fips.contains( sn ) ) {
fips.add( sn );
SPCCounty spc = SPCCountyProvider.findCounty( sn );
if ( spc != null ) {
pts.add( spc.getCentriod() );
}
}
}
}
PgenUtil.writePgenFile( "/export/cdbsrv/jwu/workbak/pgen/cluster", "watch_cluster.xml",
"DIAMOND", Color.green, 1.0, pts );
}
*/
}

View file

@ -21,7 +21,6 @@ Require-Bundle: org.eclipse.ui,
gov.noaa.nws.ncep.edex.common;bundle-version="1.0.0",
gov.noaa.nws.ncep.viz.common;bundle-version="1.0.0",
gov.noaa.nws.ncep.gempak.parameters.core;bundle-version="1.0.0",
gov.noaa.nws.ncep.viz.customprojection;bundle-version="1.0.0",
gov.noaa.nws.ncep.viz.gempak.nativelib;bundle-version="1.0.0",
gov.noaa.nws.ncep.common.dataplugin.pgen;bundle-version="1.0.0",
com.raytheon.uf.common.auth;bundle-version="1.12.1174"

View file

@ -0,0 +1,13 @@
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs= "0" maxOccurs="unbounded" ref="countyCluster"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="countyCluster" type="xs:string"></xs:element>
</xs:schema>

View file

@ -0,0 +1,104 @@
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="WatchCountyCluster.xsd">
<!--
This xml file defines all permanent county clusters for Watch, converted from permclust.tbl.
These are Proposed Permanent Marine Zone clustering, NOT Negotiable. If the county is in
then the marine zone will ALWAYS be in.
For ease of visual maintenance only, the county clusters are organized by region, and
alphabetically by WFO within a region.
-->
<!--
Format:
<countyCluster>WFO|cluster name|cntyFIPScode1 + ... + cntyFIPScodeN</countyCluster>
- WFO is the WFO 3-letter identifier, not used in the code.
- The cluster name is not used in the code.
- For continental counties, use FIPS; for marine zones, use their ID (e.g, ANZ633).
-->
<countyCluster>BOX|Bristol+Newport+Narag Bay|44001 + 44005 + ANZ236</countyCluster>
<countyCluster>BOX|Norfolk + Boston Harbor|25021 + ANZ230</countyCluster>
<countyCluster>BOX|Dukes+Vineyard&amp;Nantucket Snd|25007 + ANZ232 + ANZ233</countyCluster>
<countyCluster>BOX|Washington + Block Isl Snd|44009 + ANZ237</countyCluster>
<countyCluster>BOX|Suffolk + Boston Harbor|25025 + ANZ230</countyCluster>
<countyCluster>BOX|Plymouth+Boston Harbor|25023 + ANZ230</countyCluster>
<countyCluster>CAR|Hancock+costal_waters|23009 + ANZ050</countyCluster>
<countyCluster>CAR|Washington+costal_waters|23029 + ANZ050</countyCluster>
<countyCluster>CHS|Charleston|45019 + AMZ330</countyCluster>
<countyCluster>CLE|Cuyahoga|39035 + LEZ146</countyCluster>
<countyCluster>CRP|Calhoun + Bays|48057 + GMZ235</countyCluster>
<countyCluster>CRP|Refugio + Bays|48391 + GMZ235</countyCluster>
<countyCluster>CRP|Aransas + Bays|48007 + GMZ235</countyCluster>
<countyCluster>CRP|San_Patricio + Bays|48409 + GMZ230</countyCluster>
<countyCluster>CRP|Nueces + Bays|48355 + GMZ230</countyCluster>
<countyCluster>CRP|Kleberg + Bays|48273 + GMZ230</countyCluster>
<countyCluster>DTX|Macomb|26099 + LCZ460</countyCluster>
<countyCluster>DTX|St._Clair + St._Clair River|26147 + LCZ422</countyCluster>
<countyCluster>DTX|Wayne|26163 + LCZ423</countyCluster>
<countyCluster>LOT|Lake_IL|17097 + LMZ740</countyCluster>
<countyCluster>LOT|Cook|17031 + LMZ740 + LMZ741+ LMZ742 </countyCluster>
<countyCluster>LOX|Los_Angeles|6037 + PZZ655 + PZZ676</countyCluster>
<countyCluster>LOX|Ventura|6111 + PZZ676 + PZZ655</countyCluster>
<countyCluster>LOX|Santa_Barbara|6083 + PZZ650 + PZZ673</countyCluster>
<countyCluster>LWX|Anne_Arundel + Chesapeake Bay|24003 + ANZ531 + ANZ532</countyCluster>
<countyCluster>LWX|Arlington+ Tidal Potomac|51013 + ANZ535</countyCluster>
<countyCluster>LWX|Balt + Chke Bay|24005 + ANZ531</countyCluster>
<countyCluster>LWX|Baltimore_City + Chesapeake Bay|24510 + ANZ531</countyCluster>
<countyCluster>LWX|Calvert + Chesapeake Bay|24009 + ANZ533 + ANZ542</countyCluster>
<countyCluster>LWX|Charles + Tidal Potomac|24017 + ANZ536 + ANZ535</countyCluster>
<countyCluster>LWX|City_of_Alexandria+Tidal Pot|51510 + ANZ535</countyCluster>
<countyCluster>LWX|D.C. + Tidal Potomac|11001 + ANZ535</countyCluster>
<countyCluster>LWX|Fairfax + Tidal Potomac|51059 + ANZ535 + ANZ536</countyCluster>
<countyCluster>LWX|Harford + Chesapeake Bay|24025 + ANZ530 + ANZ531</countyCluster>
<countyCluster>LWX|King_George + Chesapeake Bay|51099 + ANZ536</countyCluster>
<countyCluster>LWX|Prince_William + Chesapeake Bay|51153 + ANZ536</countyCluster>
<countyCluster>LWX|St._Marys+Ches Bay+Tidal Pot|24037 + ANZ534 + ANZ537</countyCluster>
<countyCluster>LWX|Stafford + Tidal Potomac|51179 + ANZ536</countyCluster>
<!--<countyCluster>MFL|Palm_Beach|12099 + AMZ610</countyCluster> -->
<countyCluster>MFL|Miami-Dade|12086 + AMZ630</countyCluster>
<countyCluster>MTR|Monterey|6053 + PZZ535</countyCluster>
<countyCluster>MTR|Santa_Clara|6085 + PZZ535</countyCluster>
<countyCluster>MTR|San_Mateo|6081 + PZZ530</countyCluster>
<countyCluster>MTR|San_Francisco|6075 + PZZ530</countyCluster>
<countyCluster>MTR|Marin|6041 + PZZ530</countyCluster>
<!--
<countyCluster>!OKX|Bronx|36005 + ANZ335</countyCluster>
<countyCluster>!OKX|Hudson|34017 + ANZ338</countyCluster>
<countyCluster>!OKX|Richmond|36085 + ANZ338</countyCluster>
-->
<!--
OKX - New York City, NY Metro Bronx + Kings (Brooklyn) + New York (Manhattan)
+ Queens + Richmond (Staten Island) [NYC] + New York Harbor) -->
<countyCluster>OKX|NYC, NY Metro|36005 + 36061 + 36085 + 36047 + 36081 + ANZ338</countyCluster>
<!-- OKX|Suffolk = (Suffolk + Peconic and Gardiners Bays + South Shore Bays)-->
<countyCluster>OKX|Suffolk|36103 + ANZ340 + ANZ345</countyCluster>
<!-- <countyCluster>PHI|Middlesex|34023 + ANZ338</countyCluster> -->
<countyCluster>PHI|Cape_May|34009 + ANZ431</countyCluster>
<countyCluster>PHI|New_Castle|10003 + ANZ430</countyCluster>
<countyCluster>PQR|Clatsop+Columbia Rvr Bar+CW|41007 + PZZ250 + PZZ210</countyCluster>
<countyCluster>PQR|Pacific+Columbia Rvr Bar+CW|53049 + PZZ250 + PZZ210</countyCluster>
<countyCluster>PQR|Tillamook + CW|41057 + PZZ250</countyCluster>
<countyCluster>PQR|Lincoln + CW|41041 + PZZ255</countyCluster>
<countyCluster>SEW|Grays_Harbor|53027 + PZZ110</countyCluster>
<countyCluster>SEW|Jefferson|53031 + PZZ134 + PZZ135</countyCluster>
<countyCluster>SEW|Mason|53045 + PZZ135</countyCluster>
<countyCluster>SEW|Kitsap|53035 + PZZ135</countyCluster>
<countyCluster>SEW|Island|53029 + PZZ134 + PZZ135</countyCluster>
<countyCluster>SGX|San_Diego county|6073 + PZZ750</countyCluster>
<countyCluster>TBW|Pinellas|12103 + GMZ830</countyCluster>
<countyCluster>TBW|Hillsborough|12057 + GMZ830</countyCluster>
<countyCluster>TBW|Manatee|12081 + GMZ830</countyCluster>
<countyCluster>TBW|Lee|12071 + GMZ856</countyCluster>
<countyCluster>TBW|Charlotte|12015 + GMZ856</countyCluster>
</root>

View file

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="WatchCountyCluster.xsd">
<!--
This xml file defines state county clusters for Watch, converted from countyClust.tbl.
-->
<!--
Format:
<countyCluster>State name|cluster name|cntyFIPScode1 + ... + cntyFIPScodeN</countyCluster>
- State Name is a state's 2-letter identifier, not used in the code.
- The cluster name is not used in the code.
- For continental counties, use FIPS; for marine zones, use their ID (e.g, ANZ633).
-->
<!-- Albemarle + Charlottesville -->
<countyCluster>VA|Albemarle|51003 + 51540</countyCluster>
<!-- Alleghany + Covington -->
<countyCluster>VA|Alleghany|51005 + 51580 </countyCluster>
<!-- Augusta + Staunton + Waynesboro -->
<countyCluster>VA|Augusta|51015 + 51790 + 51820</countyCluster>
<!-- Bedford + Bedford -->
<countyCluster>VA|Bedford|51019 + 51515</countyCluster>
<!-- Fairfax + Fairfax -->
<countyCluster>VA|Fairfax|51059 + 51600</countyCluster>
<!-- Frederick + Winchester -->
<countyCluster>VA|Frederick|51069 + 51840</countyCluster>
<!-- Greensville + Emporia -->
<countyCluster>VA|Greensville|51081 + 51595</countyCluster>
<!-- Henry + Martinsville -->
<countyCluster>VA|Henry|51089 + 51690</countyCluster>
<!-- Pittsylvania + Danville -->
<countyCluster>VA|Pittsylvania|51143 + 51590</countyCluster>
<!-- Prince William + Manassas + Manassas Park -->
<countyCluster>VA|Prince William|51153 + 51683 + 51685</countyCluster>
<!-- Roanoke + Salem + Roanoke -->
<countyCluster>VA|Roanoke|51161 + 51775 + 51770</countyCluster>
<!-- Rockingham + Harrisonburg -->
<countyCluster>VA|Rockingham| 51165 + 51660</countyCluster>
<!-- Rockbridge + Lexington + Buena Vista -->
<countyCluster>VA|Rockbridge|51163 + 51678 + 51530</countyCluster>
<!-- Washington + Bristol -->
<countyCluster>VA|Washington|51191 + 51520</countyCluster>
<!-- Wise + Norton -->
<countyCluster>VA|Wise|51195 + 51720</countyCluster>
</root>

View file

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="WatchCountyCluster.xsd">
<!--
This xml file defines WFO county clusters for Watch, converted from countyClust.tbl.
-->
<!--
Format:
<countyCluster>WFO|cluster name|cntyFIPScode1 + ... + cntyFIPScodeN</countyCluster>
- WFO is the WFO 3-letter identifier, not used in the code.
- The cluster name is not used in the code.
- For continental counties, use FIPS; for marine zones, use their ID (e.g, ANZ633).
-->
<!-- EASTERN REGION -->
<!-- AKQ - Southampton + Franklin counties in VA -->
<countyCluster>AKQ|Southampton + Franklin, VA|51175 + 51620</countyCluster>
<!-- AKQ - Hampton + Newport_News counties in VA -->
<countyCluster>AKQ|Hampton + Newport_News, VA|51650 + 51700</countyCluster>
<!-- AKQ - Prince_George + Hopewell counties in VA -->
<countyCluster>AKQ|Prince_George + Hopewell, VA|51149 + 51670</countyCluster>
<!-- AKQ - York + Poquoson counties in VA -->
<countyCluster>AKQ|York + Poquoson, VA|51199 + 51735</countyCluster>
<!-- AKQ - Henrico + Richmond counites in VA -->
<countyCluster>AKQ|Henrico + Richmond, VA|51087 + 51760</countyCluster>
<!-- AKQ - James_City + Williamsburg counites in VA -->
<countyCluster>AKQ|James_City + Williamsburg, VA|51095 + 51830</countyCluster>
<!-- AKQ - Currituck + Currituck Sound in NC -->
<countyCluster>AKQ|Currituck + Currituck Sound, NC|37053 + ANZ633</countyCluster>
<!-- BOX - Norfolk and Plymouth counties in MA -->
<countyCluster>BOX|Norfolk + Plymouth, MA|25021 + 25023</countyCluster>
<!-- SOUTHERN REGION -->
<!-- FWD - Dallas/Fort Worth, TX Metro -->
<countyCluster>FWD|Dallas/Fort Worth, TX Metro|48113 + 48439</countyCluster>
<!-- CENTRAL REGION -->
<!-- DVN - Scott IA + Rock Island IL -->
<countyCluster>DVN|Scott IA + Rock Is IL|19163 + 17161</countyCluster>
<!-- LSX - St. Louis, MO Metro -->
<countyCluster>LSX|St. Louis, MO Metro|29189 + 29510</countyCluster>
</root>

View file

@ -25,7 +25,7 @@
dropdown. Attributes: "label" - the label placed in front of this text,
Values: value
-->
<hazard name="C&amp;V" snapshot="red" smear="violet" outlook="cyan" other="red" category="SIERRA">
<hazard name="C&amp;V" snapshot="red" smear="violet" outlook="mdcyan" other="red" category="SIERRA">
<checkbox label="CIG BLW 010" type="type" checked="false"/>
<popup label="VIS BLW 3SM">
<checkbox label="PCPN"/>
@ -77,7 +77,7 @@
<checkbox label="LYR" checked="false"/>
</hazard>
-->
<hazard name="MT_OBSC" snapshot="yellow" smear="violet" outlook="cyan" other="yellow" category="SIERRA">
<hazard name="MT_OBSC" snapshot="yellow" smear="violet" outlook="mdcyan" other="yellow" category="SIERRA">
<!-- <text type="input" width="100" height="18" label="Top/Bottom" scrollable="false" editable="true" characterType="digitsAndSlash" characterLimit="7" padWithZeros="3"/>
-->
<popup label="MTNS OBSC BY">
@ -90,7 +90,7 @@
</popup>
<text type="type" width="200" height="25" required="true" scrollable="true" editable="false"/>
</hazard>
<hazard name="ICE" snapshot="green" smear="violet" outlook="cyan" other="green" category="ZULU">
<hazard name="ICE" snapshot="green" smear="violet" outlook="mdcyan" other="green" category="ZULU">
<fzlText width="100" height="18" label="FZL Top/Bottom" scrollable="false" characterType="digitsAndSlash" characterLimit="7" padWithZeros="3"/>
<!-- <dropdown label="Type">
<value>ICE</value>
@ -129,7 +129,7 @@
</dropdown>
</hazard>
-->
<hazard name="FZLVL" snapshot="llBlue" smear="lightBlue" outlook="lightBlue" other="llBlue" format="false" category="ZULU">
<hazard name="FZLVL" snapshot="dkpink" smear="violet" outlook="mdcyan" other="dkpink" format="false" category="ZULU">
<dropdown label="Contour">
<value>Open</value>
<value>Closed</value>
@ -143,10 +143,10 @@
</dropdown>
<text type="input" width="100" height="18" label="FZL RANGE" scrollable="false" editable="true"/>
</hazard>
<hazard name="M_FZLVL" snapshot="cyan" smear="violet" outlook="cyan" other="cyan" category="ZULU">
<hazard name="M_FZLVL" snapshot="mdcyan" smear="violet" outlook="mdcyan" other="mdcyan" category="ZULU">
<text type="input" width="100" height="18" label="Top/Bottom" required="true" scrollable="false" editable="true" characterType="digitsAndSlash" characterLimit="7" padWithZeros="3"/>
</hazard>
<hazard name="TURB-HI" snapshot="pink" smear="violet" outlook="cyan" other="pink" category="TANGO">
<hazard name="TURB-HI" snapshot="magenta" smear="violet" outlook="mdcyan" other="magenta" category="TANGO">
<text type="input" width="100" height="18" label="Top/Bottom" required="true" scrollable="false" editable="true" characterType="digitsAndSlash" characterLimit="7" padWithZeros="3"/>
<!-- <dropdown label="DUE TO">
<value></value>
@ -161,7 +161,7 @@
<value>WIND SHEAR ASSOC WITH JTST AND MTN WAVE ACT</value>
</dropdown> -->
</hazard>
<hazard name="TURB-LO" snapshot="lightBlue" smear="violet" outlook="cyan" other="lightBlue" category="TANGO">
<hazard name="TURB-LO" snapshot="ltblue" smear="violet" outlook="mdcyan" other="ltblue" category="TANGO">
<text type="input" width="100" height="18" label="Top/Bottom" required="true" scrollable="false" editable="true" characterType="digitsAndSlash" characterLimit="7" padWithZeros="3"/>
<!-- <dropdown label="DUE TO">
<value></value>
@ -182,7 +182,7 @@
<!-- <value>20KT</value> -->
</dropdown>
</hazard>
<hazard name="LLWS" snapshot="cyan" smear="violet" outlook="cyan" other="cyan" category="TANGO">
<hazard name="LLWS" snapshot="cyan" smear="violet" outlook="mdcyan" other="cyan" category="TANGO">
</hazard>
<!-- <hazard name="TS" snapshot="green" smear="green" outlook="green" other="green" format="false" category="NONE">
<text type="input" width="100" height="18" label="Top/Bottom" required="true" scrollable="false" editable="true" characterType="digitsAndSlash" characterLimit="7" padWithZeros="3"/>
@ -249,17 +249,39 @@
for snapshot, outlook, and other gfa elements; and violet for smear ones.
-->
<color>
<value name="" r="137" g="104" b="205"/>
<value name="violet" r="137" g="104" b="205"/>
<value name="red" r="255" g="0" b="0"/>
<value name="yellow" r="255" g="255" b="0"/>
<value name="cyan" r="0" g="255" b="255"/>
<value name="green" r="0" g="255" b="0"/>
<value name="blue" r="0" g="0" b="255"/>
<value name="lightBlue" r="30" g="144" b="255"/>
<value name="llBlue" r="0" g="178" b="238"/>
<value name="pink" r="255" g="0" b="255"/>
<value name="orange" r="255" g="127" b="0"/>
<value name="black" r="0" g="0" b="0" index='0'/>
<value name="vanilla" r="255" g="228" b="220" index='1'/>
<value name="red" r="255" g="0" b="0" index='2'/>
<value name="green" r="0" g="255" b="0" index='3'/>
<value name="cyan" r="0" g="255" b="255" index='4'/>
<value name="yellow" r="255" g="255" b="0" index='5'/>
<value name="cyan" r="0" g="255" b="255" index='6'/>
<value name="magenta" r="255" g="0" b="255" index='7'/>
<value name="brown" r="139" g="71" b="38" index='8'/>
<value name="coral" r="255" g="130" b="71" index='9'/>
<value name="apricot" r="255" g="165" b="79" index='10'/>
<value name="pink" r="255" g="174" b="185" index='11'/>
<value name="dkpink" r="255" g="106" b="106" index='12'/>
<value name="mdviolet" r="238" g="44" b="44" index='13'/>
<value name="maroon" r="139" g="0" b="0" index='14'/>
<value name="firebric" r="205" g="0" b="0" index='15'/>
<value name="orred" r="238" g="64" b="0" index='16'/>
<value name="orange" r="255" g="127" b="0" index='17'/>
<value name="dkorange" r="205" g="133" b="0" index='18'/>
<value name="gold" r="255" g="215" b="0" index='19'/>
<value name="dkyellow" r="238" g="238" b="0" index='20'/>
<value name="lwngreen" r="127" g="255" b="0" index='21'/>
<value name="mdgreen" r="0" g="205" b="0" index='22'/>
<value name="dkgreen" r="0" g="139" b="0" index='23'/>
<value name="grpblue" r="16" g="78" b="139" index='24'/>
<value name="ltblue" r="30" g="144" b="255" index='25'/>
<value name="sky" r="0" g="178" b="238" index='26'/>
<value name="mdcyan" r="0" g="238" b="238" index='27'/>
<value name="violet" r="137" g="104" b="205" index='28'/>
<value name="purple" r="145" g="44" b="238" index='29'/>
<value name="plum" r="139" g="0" b="139" index='30'/>
<value name="white" r="255" g="255" b="255" index='31'/>
<value name="" r="137" g="104" b="205" index='32'/>
</color>
<!--
@ -286,7 +308,7 @@
<value hazard="TURB-HI" originalText="TURB-HI" displayAs="ICONHERE,,"/>
<value hazard="TURB-LO" originalText="TURB-LO" displayAs="ICONHERE,,"/>
<value hazard="SFC_WND" originalText="SFC_WND" displayAs="ICONHERE,,,,"/>
<value hazard="M_FZLVL" originalText="M_FZLVL" displayAs="0°"/>
<value hazard="M_FZLVL" originalText="M_FZLVL" displayAs="0°"/>
<!-- for all hazards -->
<value hazard="" originalText=":" displayAs=" "/>
@ -294,4 +316,15 @@
</displayText>
<gfaOtlkgenRatio>0.25</gfaOtlkgenRatio>
<!--
Color definitions for surface FZLVL (Level = "SFC"). The colors defined in
<FZLVL> will be used for other non-SFC FZLVLs (040, 080, 120, 160).
-->
<fzlvlSFC>
<value name="snapshot" nmapcolor="sky"/>
<value name="smear" nmapcolor="ltblue"/>
<value name="outlook" nmapcolor="ltblue"/>
<value name="other" nmapcolor="sky"/>
</fzlvlSFC>
</root>

View file

@ -11,6 +11,7 @@
<xs:element ref="color"/>
<xs:element ref="displayText"/>
<xs:element ref="gfaOtlkgenRatio"/>
<xs:element ref="fzlvlSFC"/>
</xs:sequence>
</xs:complexType>
</xs:element>
@ -102,7 +103,7 @@
<xs:element name="color">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="value"/>
<xs:element maxOccurs="unbounded" ref="value" />
</xs:sequence>
</xs:complexType>
</xs:element>
@ -113,6 +114,13 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="fzlvlSFC">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="value"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="gfaOtlkgenRatio" type="xs:decimal"/>
<xs:element name="checkbox">
<xs:complexType>
@ -130,6 +138,8 @@
<xs:attribute name="name"/>
<xs:attribute name="originalText"/>
<xs:attribute name="r" type="xs:integer"/>
<xs:attribute name="index" type="xs:integer"/>
<xs:attribute name="nmapcolor" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>

View file

@ -617,7 +617,7 @@
</xsl:param>
<xsl:choose>
<xsl:when test="$numFzlvl > 0 ">
<xsl:variable name="areaRange">
<!-- <xsl:variable name="areaRange">
<xsl:for-each select="//Gfa[@fzlRange]">
<xsl:if test="contains(@fzlRange, $FAarea)">
<xsl:value-of select="substring-after(substring-after(@fzlRange, $FAarea), ';')"/>
@ -628,11 +628,21 @@
<xsl:value-of
select="substring-before(substring-after($areaRange, ';'),';')" />
-->
<xsl:for-each select="//Gfa[@fzlRange and contains(@fzlRange, $FAarea)]">
<xsl:sort select="substring-after(substring-after(substring-after(@fzlRange, $FAarea), ';'), ';')" data-type="number" order="ascending" />
<xsl:if test="position() = 1">
<xsl:value-of select="substring-after(substring-after(substring-after(@fzlRange, $FAarea), ';'), ';')" />
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="//Gfa[@hazard='M_FZLVL' and contains(@fcstHr,'-')] ">
<xsl:sort select="@bottom" data-type="number" order="ascending" />
<xsl:if test="position() = 1">
<xsl:value-of select="@bottom" />
</xsl:if>
</xsl:for-each>
</xsl:otherwise>
@ -646,7 +656,7 @@
<xsl:choose>
<xsl:when test="$numFzlvl > 0 ">
<xsl:variable name="areaRange">
<!-- <xsl:variable name="areaRange">
<xsl:for-each select="//Gfa[@fzlRange]">
<xsl:if test="contains(@fzlRange, $FAarea)">
<xsl:value-of select="substring-after(substring-after(@fzlRange, $FAarea), ';')"/>
@ -655,12 +665,24 @@
</xsl:variable>
<xsl:value-of select="substring-before($areaRange, ';')" />
-->
<xsl:for-each select="//Gfa[@fzlRange and contains(@fzlRange, $FAarea)]">
<xsl:sort select="substring-before(substring-after(substring-after(@fzlRange, $FAarea), ';'), ';')" data-type="number" order="descending" />
<xsl:if test="position() = 1">
<xsl:value-of select="substring-before(substring-after(substring-after(@fzlRange, $FAarea), ';'), ';')" />
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="//Gfa[@hazard='M_FZLVL' and contains(@fcstHr,'-')] ">
<xsl:sort select="@top" data-type="number" order="descending" />
<xsl:if test="position() = 1">
<xsl:value-of select="@top" />
</xsl:if>
</xsl:for-each>
</xsl:otherwise>

View file

@ -14,9 +14,16 @@ import gov.noaa.nws.ncep.ui.pgen.elements.DrawableElement;
import gov.noaa.nws.ncep.ui.pgen.elements.Layer;
import gov.noaa.nws.ncep.ui.pgen.elements.Line;
import gov.noaa.nws.ncep.ui.pgen.elements.Outlook;
import gov.noaa.nws.ncep.ui.pgen.elements.Product;
import gov.noaa.nws.ncep.ui.pgen.elements.ProductInfo;
import gov.noaa.nws.ncep.ui.pgen.elements.ProductTime;
import gov.noaa.nws.ncep.ui.pgen.elements.Symbol;
import gov.noaa.nws.ncep.ui.pgen.elements.WatchBox;
import gov.noaa.nws.ncep.ui.pgen.elements.labeledlines.Label;
import gov.noaa.nws.ncep.ui.pgen.elements.labeledlines.LabeledLine;
import gov.noaa.nws.ncep.ui.pgen.file.FileTools;
import gov.noaa.nws.ncep.ui.pgen.file.ProductConverter;
import gov.noaa.nws.ncep.ui.pgen.file.Products;
import gov.noaa.nws.ncep.ui.pgen.gfa.Gfa;
import gov.noaa.nws.ncep.ui.pgen.graphtogrid.CoordinateTransform;
import gov.noaa.nws.ncep.ui.pgen.productmanage.ProductConfigureDialog;
@ -30,6 +37,7 @@ import gov.noaa.nws.ncep.viz.common.display.INatlCntrsPaneManager;
import gov.noaa.nws.ncep.viz.common.display.NcDisplayName;
import gov.noaa.nws.ncep.viz.common.display.NcDisplayType;
import java.awt.Color;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.text.DecimalFormat;
@ -39,6 +47,7 @@ import java.util.Arrays;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.TimeZone;
import javax.xml.transform.Transformer;
@ -118,7 +127,7 @@ import com.vividsolutions.jts.geom.Polygon;
* 07/10 #215 J. Wu Added calendarToGempakDattim()
* 09/10 #63 J. Wu Added CURRENT_WORKING_DIRCTORY
* 09/10 #304 B. Yin Added a method to load a tool editing LabeledLine
* 10/10 #310 %. Gilbert Added PgenMode
* 10/10 #310 S. Gilbert Added PgenMode
* 02/11 #405 J. Wu Set CURRENT_WORKING_DIRCTORY to user-defined directory
* in the PGEN preference page
* 03/11 J. Wu Added getSphPolyArea() && getPolyArea()
@ -131,6 +140,7 @@ import com.vividsolutions.jts.geom.Polygon;
* 05/12 #769 B. Yin Moved the creation of UTC time from TCA dialog to here.
* 03/13 #972 G. Hull add isNatlCntrsEditor()
* 03/13 #927 B. Yin Moved isUnmovable from the PgenSelectTool class.
* 06/13 #1000 J. Wu Added utility function writePgenFile().
*
* </pre>
*
@ -2068,4 +2078,32 @@ public class PgenUtil {
return false;
}
/*
* Write a set of points into a PGEN file - each point represents the location of a Symbol.
*/
public static void writePgenFile( String path, String fname, String symName, Color symClr,
double size, List<Coordinate> pts ) {
//Default product/layer to hold symbols
Product activeProduct = new Product("Default", "Default", "Default",
new ProductInfo(), new ProductTime(), new ArrayList<Layer>() );
Layer activeLayer = new Layer();
activeProduct.addLayer( activeLayer );
List<Product> productList = new ArrayList<Product>();
productList.add( activeProduct );
for ( Coordinate c : pts ) {
Symbol cmm = new Symbol( null, new Color[] {symClr},
1.0F, size, false, c, "Symbol", symName );
activeLayer.add( cmm );
}
Products filePrds1 = ProductConverter.convert( productList );
String aa = path + "/" + fname;
FileTools.write( aa, filePrds1 );
}
}

View file

@ -65,6 +65,9 @@ import com.raytheon.uf.viz.core.exception.VizException;
* 07/12 #663 Q. Zhou Add selected Gfa in movetext listener. Added get/set for MoveTextBtn
* 12/12 #908 B. Yin Added empty items in drop-down menus for multi-selecting
* 12/12 #937 J. Wu Update G_Airmet layers/hazard - "C&V"
* 05/13 #610 J. Wu Implemented FZLVL range (TTR425)
* 06/13 #674/TTR426 J. Wu Added color settings for surface FZLVLs.
*
* </pre>
*
* @author mlaryukhin
@ -202,6 +205,7 @@ public class GfaAttrDlg extends LineAttrDlg implements IGfa {
addSelectionListeners();
populateTagCbo();
}
/**
@ -256,13 +260,22 @@ public class GfaAttrDlg extends LineAttrDlg implements IGfa {
}
private void createColorButtonSelector() {
cs = new ColorButtonSelector(panelComboGroup);
if (rgbLastUsed == null) {
cs.setColorValue(getRGB(hazardCbo.getItem(hazardIndexLastUsed), fcstHrCbo
.getSelectionIndex()));
RGB rgb = getDefaultRGB( hazardCbo.getItem(hazardIndexLastUsed), getGfaFcstHr() );
if ( hazardCbo.getItem(hazardIndexLastUsed).equalsIgnoreCase( "FZLVL" ) ) {
rgb = getDefaultFzlvlSfcColor( getGfaFcstHr() );
}
cs.setColorValue( rgb );
} else {
cs.setColorValue(rgbLastUsed);
}
cs.addListener(new IPropertyChangeListener(){
@Override
public void propertyChange(PropertyChangeEvent event) {
@ -319,6 +332,21 @@ public class GfaAttrDlg extends LineAttrDlg implements IGfa {
}
if(type != null) updateType();
hazardSpecificGroup.setVisible(nodes.size() > 0);
/*
* Adjust the color for FZLVL SFC.
*/
if ( hazardCbo.getText().equalsIgnoreCase( "FZLVL") ) {
Widget levelCmb = widgets.get( Gfa.LEVEL );
if ( levelCmb != null && !levelCmb.isDisposed() ) {
String lvl = ((Combo)widgets.get( Gfa.LEVEL )).getText();
if ( lvl.equalsIgnoreCase( "SFC" ) ) {
RGB useFzlvlSfcClr = getDefaultFzlvlSfcColor( getGfaFcstHr() );
cs.setColorValue( useFzlvlSfcClr );
}
}
}
}
/**
@ -514,8 +542,15 @@ public class GfaAttrDlg extends LineAttrDlg implements IGfa {
} else {
requiredCrosses.put(lblStr, l);
}
} else {
}
else {
txt = createTextAttr(g, w, h, horizontalSpan, scrollable, editable);
txt.addFocusListener( new FocusAdapter() {
public void focusLost( FocusEvent e ) {
updateValues();
}
});
}
boolean digitsOnly = "digitsOnly".equalsIgnoreCase(node.valueOf("@characterType"));
@ -558,7 +593,9 @@ public class GfaAttrDlg extends LineAttrDlg implements IGfa {
index = cbo.indexOf(v);
}
index = (index == -1) ? 0: index;
cbo.select(index);
values.put(lblStr, cbo.getText());
widgets.put(lblStr, cbo);
cbo.addSelectionListener(new SelectionAdapter(){
@ -1161,6 +1198,7 @@ public class GfaAttrDlg extends LineAttrDlg implements IGfa {
* Updates the values map with the information from the screen.
*/
private void updateValues(){
for(String key: widgets.keySet()){
Widget w = widgets.get(key);
if(w == null || w.isDisposed()) continue;
@ -1172,13 +1210,27 @@ public class GfaAttrDlg extends LineAttrDlg implements IGfa {
values.put(Gfa.BOTTOM, (splitValue.length > 1) ? splitValue[1]:null);
}
values.put(key, v);
} else if (w instanceof Combo){
} else if (w instanceof Combo) {
values.put(key, ((Combo) w).getText());
if ( key.equalsIgnoreCase( Gfa.LEVEL) ) {
String lvl = ((Combo)w).getText();
RGB clr = getDefaultRGB( hazardCbo.getItem(hazardIndexLastUsed), getGfaFcstHr() );
if ( hazardCbo.getText().equalsIgnoreCase( "FZLVL") ) {
if ( lvl.equalsIgnoreCase( "SFC" ) ) {
clr = getDefaultFzlvlSfcColor( getGfaFcstHr() );
}
}
cs.setColorValue( clr );
}
} else if (w instanceof Button){
values.put(key, "" + ((Button) w).getSelection());
}
}
updateVORText();
}
@ -1347,8 +1399,10 @@ public class GfaAttrDlg extends LineAttrDlg implements IGfa {
}
public void redrawHazardSpecificPanel() {
// save settings
setAttrForDlg(GfaAttrDlg.this);
// repaint a part of the dialog
Shell shell = hazardSpecificGroup.getShell();
if(hazardSpecificGroup != null){
@ -1371,8 +1425,8 @@ public class GfaAttrDlg extends LineAttrDlg implements IGfa {
}
// update color
String hazard = hazardCbo.getText();
rgbLastUsed = getRGB(hazard, fcstHrCbo.getSelectionIndex());
// rgbLastUsed = getRGB(hazard, fcstHrCbo.getSelectionIndex());
rgbLastUsed = getDefaultRGB( hazardCbo.getItem(hazardIndexLastUsed), getGfaFcstHr() );
cs.setColorValue(rgbLastUsed);
shell.pack();
@ -1380,7 +1434,9 @@ public class GfaAttrDlg extends LineAttrDlg implements IGfa {
warning.dispose();
warning = null;
}
createHazardSpecificPanel();
createBottomPanel();
shell.pack();
}
@ -1626,14 +1682,30 @@ public class GfaAttrDlg extends LineAttrDlg implements IGfa {
private void updateColorWhenOtherTextChanged(String s) {
String hazard = hazardCbo.getText();
RGB fzlvlClr = null;
if ( hazard.equalsIgnoreCase( "FZLVL") ) {
Widget levelCmb = widgets.get( Gfa.LEVEL );
if ( levelCmb != null && !levelCmb.isDisposed() ) {
String lvl = ((Combo)widgets.get( Gfa.LEVEL )).getText();
if ( lvl.equalsIgnoreCase( "SFC" ) ) {
fzlvlClr = getDefaultFzlvlSfcColor( s );
}
}
}
if("Other".equals(fcstHrCbo.getText())) {
String str = s;
if(str.endsWith(":") || str.endsWith("-")) str = str.substring(0, str.length()-1);
Color[] c = GfaInfo.getDefaultColors(hazard, str);
RGB rgb = new RGB(c[0].getRed(), c[0].getGreen(), c[0].getBlue());
if ( fzlvlClr != null ) rgb = fzlvlClr;
cs.setColorValue(rgb);
} else {
cs.setColorValue(getRGB(hazard, fcstHrCbo.getSelectionIndex()));
}
else {
RGB clr = getDefaultRGB( hazardCbo.getItem(hazardIndexLastUsed), getGfaFcstHr() );
cs.setColorValue( clr );
}
}
@ -2026,5 +2098,31 @@ public class GfaAttrDlg extends LineAttrDlg implements IGfa {
index = fcstHrCbo.indexOf("Other");
fcstHrCbo.select(index);
}
/*
* Find the color
*/
private RGB getDefaultFzlvlSfcColor( String fcsthr ) {
RGB rgb = GfaInfo.getFzlvlSfcColor( "Other" );
if ( fcsthr != null ) {
String[] hrmin = fcsthr.split("-");
if ( hrmin.length > 1 ) {
double hr = Double.parseDouble( hrmin[0] );
if ( hr >= 6 ) {
rgb = GfaInfo.getFzlvlSfcColor( "outlook" );
}
else {
rgb = GfaInfo.getFzlvlSfcColor( "smear" );
}
}
else {
rgb = GfaInfo.getFzlvlSfcColor( "snapshot" );
}
}
return rgb;
}
}

View file

@ -3467,7 +3467,7 @@ public class DisplayElementFactory {
* create shadedshape of the arrow head
*/
double pointAngle = 60.0;
double height = deviceScale * vect.getArrowHeadSize();
double height = deviceScale * vect.getArrowHeadSize()*2;
ArrowHead head = new ArrowHead (new Coordinate(end[0],end[1]),
pointAngle, angle, height, ArrowHeadType.FILLED );
Coordinate[] ahead = head.getArrowHeadShape();
@ -3496,17 +3496,18 @@ public class DisplayElementFactory {
* For each color encountered above, compile the accumulated wireframes (or shaded shapes)
* of that color, package them into a single display element, and add to return list
*/
for (Color color : maskMap.keySet()) {
IWireframeShape masks = maskMap.get(color);
masks.compile();
slist.add( new LineDisplayElement(masks, color, (float) (lineWidth + deviceScale)) );
}
for (Color color : arrowMap.keySet()) {
IWireframeShape arrows = arrowMap.get(color);
arrows.compile();
slist.add( new LineDisplayElement(arrows, color, lineWidth) );
}
for (Color color : maskMap.keySet()) {
IWireframeShape masks = maskMap.get(color);
masks.compile();
slist.add( new LineDisplayElement(masks, color, (float) (lineWidth + deviceScale)) );
}
for (Color color : arrowHeadMap.keySet()) {
IShadedShape arrowHeads = arrowHeadMap.get(color);
arrowHeads.compile();

View file

@ -12,10 +12,24 @@ import java.util.EnumMap;
/**
* This object contains a list of defined Fill Patterns that can be applied to
* a multi-point line path.<P>
*
* This class is implemented as a singleton, and the predefined Fill Patterns are
* constructed when the instance is created. Users can get a reference to this
* object using the static method getInstance().
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 22, 2010 ?? sgilbert Initial creation
* May 21, 2013 #996 J. Wu Updated pattern1 - dashed line and
* pattern4 - wave line to match legacy.
*
* </pre>
*
* @author sgilbert
* @version 1.0
*
*/
public class FillPatternList {
@ -183,7 +197,7 @@ public class FillPatternList {
};
*/
//Modified pattern 1 and 5 to match CCFP fill patterns in NMAP (TTR648) -- bingfan 11/28/2012
int[] pattern1 = { 0x80, 0x00, 0x80, 0x00,
/* int[] pattern1 = { 0x80, 0x00, 0x80, 0x00,
0x40, 0x00, 0x40, 0x00,
0x20, 0x00, 0x20, 0x00,
0x10, 0x00, 0x10, 0x00,
@ -216,6 +230,50 @@ public class FillPatternList {
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
};
*/
//Modified pattern 1 to match fill patterns in NMAP -- J. Wu 05/21/2013
int[] pattern1 = {
0x80, 0x80, 0x80, 0x80,
0x40, 0x40, 0x40, 0x40,
0x20, 0x20, 0x20, 0x20,
0x10, 0x10, 0x10, 0x10,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x80, 0x80, 0x80, 0x80,
0x40, 0x40, 0x40, 0x40,
0x20, 0x20, 0x20, 0x20,
0x10, 0x10, 0x10, 0x10,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x80, 0x80, 0x80, 0x80,
0x40, 0x40, 0x40, 0x40,
0x20, 0x20, 0x20, 0x20,
0x10, 0x10, 0x10, 0x10,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x80, 0x80, 0x80, 0x80,
0x40, 0x40, 0x40, 0x40,
0x20, 0x20, 0x20, 0x20,
0x10, 0x10, 0x10, 0x10,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};
byte[] pattern_1 = new byte[pattern1.length];
for (int i=0; i<pattern1.length; i++) {
pattern_1[i] = (byte)pattern1[i];
@ -302,7 +360,7 @@ public class FillPatternList {
}
patternMap.put(FillPattern.FILL_PATTERN_3, pattern_3);
int[] pattern4 = { 0x08, 0x04, 0x1e, 0x08, 0x0f, 0x04, 0x02, 0x0f, 0x81, 0x07, 0x02, 0x81,
/* int[] pattern4 = { 0x08, 0x04, 0x1e, 0x08, 0x0f, 0x04, 0x02, 0x0f, 0x81, 0x07, 0x02, 0x81,
0x81, 0xc0, 0x03, 0x81, 0x81, 0x40, 0xe0, 0x81, 0xf0, 0x40, 0x20, 0xf0,
0x10, 0x78, 0x20, 0x10, 0x10, 0x08, 0x3c, 0x10, 0x1e, 0x08, 0x04, 0x1e,
0x02, 0x0f, 0x04, 0x02, 0x02, 0x81, 0x07, 0x02, 0x03, 0x81, 0xc0, 0x03,
@ -313,6 +371,42 @@ public class FillPatternList {
0x08, 0x04, 0x1e, 0x08, 0x0f, 0x04, 0x02, 0x0f, 0x81, 0x07, 0x02, 0x81,
0x81, 0xc0, 0x03, 0x81, 0x81, 0x40, 0xe0, 0x81, 0xf0, 0x40, 0x20, 0xf0,
0x10, 0x78, 0x20, 0x10, 0x10, 0x08, 0x3c, 0x10 };
*/
//Modified pattern 4 to match fill patterns in NMAP -- J. Wu 05/21/2013
int[] pattern4 = {
0x80, 0x00, 0x80, 0x00,
0x80, 0x00, 0x80, 0x00,
0x80, 0x00, 0x80, 0x00,
0x80, 0x00, 0x80, 0x00,
0x80, 0x00, 0x80, 0x00,
0x80, 0x00, 0x80, 0x00,
0x80, 0x00, 0x80, 0x00,
0xff, 0x80, 0xff, 0x80,
0x00, 0x80, 0x00, 0x80,
0x00, 0x80, 0x00, 0x80,
0x00, 0x80, 0x00, 0x80,
0x00, 0x80, 0x00, 0x80,
0x00, 0x80, 0x00, 0x80,
0x00, 0x80, 0x00, 0x80,
0x00, 0x80, 0x00, 0x80,
0x80, 0xff, 0x80, 0xff,
0x80, 0x00, 0x80, 0x00,
0x80, 0x00, 0x80, 0x00,
0x80, 0x00, 0x80, 0x00,
0x80, 0x00, 0x80, 0x00,
0x80, 0x00, 0x80, 0x00,
0x80, 0x00, 0x80, 0x00,
0x80, 0x00, 0x80, 0x00,
0xff, 0x80, 0xff, 0x80,
0x00, 0x80, 0x00, 0x80,
0x00, 0x80, 0x00, 0x80,
0x00, 0x80, 0x00, 0x80,
0x00, 0x80, 0x00, 0x80,
0x00, 0x80, 0x00, 0x80,
0x00, 0x80, 0x00, 0x80,
0x00, 0x80, 0x00, 0x80,
0x80, 0xff, 0x80, 0xff
};
byte[] pattern_4 = new byte[pattern4.length];
for (int i=0; i<pattern4.length; i++) {

View file

@ -9,7 +9,6 @@ package gov.noaa.nws.ncep.ui.pgen.gfa;
import static gov.noaa.nws.ncep.ui.pgen.gfa.Gfa.nvl;
import gov.noaa.nws.ncep.ui.pgen.PgenStaticDataProvider;
import gov.noaa.nws.ncep.ui.pgen.elements.AbstractDrawableComponent;
import gov.noaa.nws.ncep.ui.pgen.elements.Layer;
import gov.noaa.nws.ncep.ui.pgen.elements.Product;
import gov.noaa.nws.ncep.ui.pgen.file.FileTools;
@ -18,6 +17,7 @@ import gov.noaa.nws.ncep.ui.pgen.file.Products;
import gov.noaa.nws.ncep.ui.pgen.store.PgenStorageException;
import gov.noaa.nws.ncep.ui.pgen.store.StorageUtils;
import gov.noaa.nws.ncep.ui.pgen.tools.PgenCycleTool;
import gov.noaa.nws.ncep.ui.pgen.rsc.PgenResource;
import java.io.File;
import java.io.IOException;
@ -26,6 +26,7 @@ import java.io.StringWriter;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import javax.xml.bind.JAXBException;
@ -36,7 +37,9 @@ import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import com.raytheon.uf.common.serialization.SerializationUtil;
import com.vividsolutions.jts.geom.Coordinate;
import com.vividsolutions.jts.geom.Geometry;
import com.vividsolutions.jts.geom.GeometryFactory;
/**
* GFA Generate functionality.
@ -54,7 +57,8 @@ import com.vividsolutions.jts.geom.Geometry;
* 05/12 #610 J. Wu Assign issue/until times if they are missing.
* 11/12 #952 J. Wu Format for "TURB_HI" and "TURB-LO".
* 12/12 #953 J. Wu Use deep copy when generating XML to avoid
* 04/13 #977 S. Gilbert PGEN Database support the parents of DEs in the layer..
* 04/13 #977 S. Gilbert PGEN Database support
* 05/13 #610 J. Wu Implemented FZLVL range (TTR425)
* </pre>
*
* @author M.Laryukhin
@ -63,6 +67,7 @@ import com.vividsolutions.jts.geom.Geometry;
public class GfaGenerate {
private static final String TEXT_TYPE = "TEXT";
private GeometryFactory gf = new GeometryFactory();
// private final static Logger logger = Logger.getLogger(GfaGenerate.class);
private Transformer transformer;
@ -123,6 +128,11 @@ public class GfaGenerate {
for (Gfa gg : adjusted) {
String area = gg.getGfaArea();
if ( area == null || gg.getGfaStates() == null ||
gg.getGfaStates().trim().length() == 0 ) {
continue;
}
ArrayList<String> oldStates = new ArrayList<String>();
ArrayList<String> oldStatesNoWater = new ArrayList<String>();
for (String ss : gg.getGfaStates().split(" ")) {
@ -177,14 +187,13 @@ public class GfaGenerate {
*/
for (String category : categories) {
for (String area : areas) {
List<AbstractDrawableComponent> ret = filterSelected(adjusted,
area, category);
List<Gfa> ret = filterSelected( adjusted, area, category );
// If no issue/until times, assign them.
for (AbstractDrawableComponent de : ret) {
if (de instanceof Gfa && !((Gfa) de).isSnapshot()
&& ((Gfa) de).getAttribute(Gfa.ISSUE_TIME) == null) {
GfaRules.assignIssueTime(((Gfa) de));
for (Gfa de : ret) {
if (!de.isSnapshot()
&& de.getAttribute(Gfa.ISSUE_TIME) == null) {
GfaRules.assignIssueTime( de );
}
}
@ -198,13 +207,22 @@ public class GfaGenerate {
Layer l = new Layer();
p.addLayer(l);
/*
* Find freezing range for this area!
*/
String fzlvlRange = findFreezingRange( all, ret, area, category );
/*
* Note - needs to use a copy so it won't change the parent of
* the original G-Airmets, e.g. l.add( de ) will set the parent
* of the 'de" to be "l"!
*/
for (AbstractDrawableComponent gss : ret) {
l.add(gss.copy());
for ( Gfa gss : ret) {
Gfa gfaCopy = gss.copy();
if ( fzlvlRange != null ) {
gfaCopy.setGfaValue( Gfa.FZL_RANGE, fzlvlRange );
}
l.add( gfaCopy );
}
// l.add( ret );
@ -216,13 +234,15 @@ public class GfaGenerate {
// Needs to add an empty Gfa to carry the issue/until for proper
// formatting.
if (ret.size() == 0) {
addNullGfa(products, category);
addNullGfa( products, category, fzlvlRange );
}
String xml = SerializationUtil.marshalToXml(products);
if (sb.length() > 0 && !sb.toString().endsWith("\n\n"))
if (sb.length() > 0 && !sb.toString().endsWith("\n\n")) {
sb.append("\n\n");
}
String prdXml = generateProduct(xml, category, area).trim();
temp.append(prdXml);
@ -264,10 +284,9 @@ public class GfaGenerate {
* @param cats
* @return
*/
private static List<AbstractDrawableComponent> filterSelected(
List<Gfa> all, String area, String category) {
private static List<Gfa> filterSelected( List<Gfa> all, String area, String category) {
ArrayList<AbstractDrawableComponent> ret = new ArrayList<AbstractDrawableComponent>();
ArrayList<Gfa> ret = new ArrayList<Gfa>();
int ii = 0;
for (Gfa g : all) {
@ -448,12 +467,12 @@ public class GfaGenerate {
/*
* Adds an empty Gfa to the product so it can pass issue/until time for
* correct formatting.
* correct formatting. Freezing range should be set if provided.
*
* Note - this should be called only when there is no Gfa smears in the
* "prds".
*/
private void addNullGfa(Products prds, String category) {
private void addNullGfa(Products prds, String category, String fzlRange ) {
gov.noaa.nws.ncep.ui.pgen.file.Gfa fgfa = new gov.noaa.nws.ncep.ui.pgen.file.Gfa();
@ -465,6 +484,12 @@ public class GfaGenerate {
fgfa.setHazard(setFirstHazardType(category));
fgfa.setFcstHr("0-6");
// If freezing range is provided, set it and set hazard type as "FZLVL".
if ( fzlRange != null ) {
fgfa.setHazard( "FZLVL" );
fgfa.setFzlRange( fzlRange );
}
//
SimpleDateFormat sdf = new SimpleDateFormat("ddHHmm");
@ -508,4 +533,369 @@ public class GfaGenerate {
}
/*
* Find the freezing range from FZLVL/M_FZLVL airmets.
*/
private String findFreezingRange( List<Gfa> all, List<Gfa> selected,
String area, String cat ) {
if ( !cat.equalsIgnoreCase( "ZULU" ) ) {
return null;
}
String fzlRange = null;
String topStr = null;
String botStr = null;
/*
* If no FZLVL/M_FZLVL in this area, find range using those outside of
* this area, if any.
*/
if ( selected == null || selected.size() == 0 ) {
int[] extRange = findExernalFzlvlRange( all, area );
if ( extRange[0] != -1 ) {
topStr = padding( extRange[0] );
botStr = padding( extRange[1] );
}
}
else {
/*
* First - find the worst range from existing FZL_RANGE in FZLVL airmets.
* If no existing range found, then find the worst top/bottom from
* FZLVLs' levels ( top = level + 40 and bottom = level - 40)
* Second - find the worst top/bottom from M_FZLVLs
*
* Third - find the worst case range using info from step 1 and 2.
*
*/
int[] existingRange = findExistingFzlRange( all, selected, area );
int[] mfzlRange = findMfzlvlRange( all, selected, area );
if ( existingRange[0] == -1 ) {
existingRange = findFzlvlLevelRange( all, selected, area );
}
if ( existingRange[0] != -1 || mfzlRange[0] != -1 ) {
topStr = padding( Math.max( existingRange[0], mfzlRange[0] ) );
}
if ( existingRange[1] != 9999 || mfzlRange[1] != 9999 ){
botStr = padding( Math.min( existingRange[1], mfzlRange[1] ) );
}
}
// Now create a range string.
if ( topStr != null && botStr != null ) {
fzlRange = area + ";" + topStr + ";" + botStr;
}
return fzlRange;
}
/*
* Retrieve the worst FZLVL range from ranges existing in FZLVL airmet/outlook.
* Such existing range should be in the form as "MIA;160;40", retrievable as
* gfa.getGfaValue( Gfa.FZL_RANGE ).
*/
private int[] findExistingFzlRange( List<Gfa> all, List<Gfa> selected, String area ) {
int[] topBot = { -1, 9999 };
for ( Gfa elem : selected ) {
String gtype = elem.getGfaHazard();
if ( !gtype.equalsIgnoreCase("FZLVL") || elem.isSnapshot() ) {
continue;
}
String range1 = elem.getGfaValue( Gfa.FZL_RANGE );
if ( range1 != null ) {
String[] rangeInfo = range1.split(";");
if ( rangeInfo.length >= 3 && rangeInfo[0].equalsIgnoreCase( area ) ) {
int top1 = -1;
int bot1 = -1;
try {
top1 = Integer.parseInt( rangeInfo[1] );
}
catch ( Exception e ) {
e.printStackTrace();
}
if ( rangeInfo[2].equalsIgnoreCase("SFC") ) {
bot1 = 0;
}
else {
try {
bot1 = Integer.parseInt( rangeInfo[2] );
}
catch ( Exception e ) {
e.printStackTrace();
}
}
if ( top1 >= 0 && bot1 >= 0 ) {
topBot[0] = Math.max( topBot[0], top1 );
topBot[1] = Math.min( topBot[1], bot1 );
}
}
}
}
return topBot;
}
/*
* Retrieve the worst range from existing top/bottom of M_FZLVL airmet/outlook.
* Such top/bottom are retrievable as gfa.getGfaTop() & gfa.getGfaBottom().
*/
private int[] findMfzlvlRange( List<Gfa> all, List<Gfa> selected, String area ) {
int[] topBot = { -1, 9999 };
for ( Gfa elem : selected ) {
String gtype = elem.getGfaHazard();
if ( !gtype.equalsIgnoreCase("M_FZLVL") || elem.isSnapshot() ) {
continue;
}
int top2 = -1;
int bot2 = -1;
if ( elem.getGfaTop() != null ) {
try {
top2 = Integer.parseInt( elem.getGfaTop() );
}
catch ( Exception e ) {
e.printStackTrace();
}
}
String botStr = elem.getGfaBottom();
if ( botStr != null ) {
if ( botStr.equalsIgnoreCase( "SFC") ) {
bot2 = 0;
}
else {
try {
bot2 = Integer.parseInt( elem.getGfaBottom() );
}
catch ( Exception e ) {
e.printStackTrace();
}
}
}
if ( top2 >= 0 && bot2 >= 0 ) {
topBot[0] = Math.max( topBot[0], top2 );
topBot[1] = Math.min( topBot[1], bot2 );
}
}
return topBot;
}
/*
* Retrieve the worst range from existing levels of FZLVL airmet/outlook.
* Such levels are retrievable as gfa.getGfaValue( Gfa.LEVEL ).
*/
private int[] findFzlvlLevelRange( List<Gfa> all, List<Gfa> selected, String area ) {
int[] topBot = { -1, 9999 };
for ( Gfa elem : selected ) {
String gtype = elem.getGfaHazard();
if ( !gtype.equalsIgnoreCase("FZLVL") || elem.isSnapshot() ) {
continue;
}
int top2 = -1;
int bot2 = -1;
String levelStr = elem.getGfaValue( Gfa.LEVEL );
int lvl = -1;
if ( levelStr != null ) {
if ( levelStr.equalsIgnoreCase( "SFC" ) ) {
top2 = 40;
bot2 = 0;
}
else {
try {
lvl = Integer.parseInt( levelStr );
}
catch ( Exception e ) {
e.printStackTrace();
}
if ( lvl >= 0 && lvl <= 40 ) {
top2 = 40;
bot2 = 0;
}
else {
top2 = lvl + 40;
bot2 = lvl - 40;
}
}
}
if ( top2 >= 0 && bot2 >= 0 ) {
topBot[0] = Math.max( topBot[0], top2 );
topBot[1] = Math.min( topBot[1], bot2 );
}
}
return topBot;
}
/*
* Find the top and base levels for a FA area that is not intersected by any FZLVL
* contours. It sorts all external fzlvls by distance from the area centroid, then
* uses the level from that contour. If the contour is to the left of the area then
* the answer is base = contour level, top = base + 040. If the contour is to the
* right of the area then the answer top = contour level, base = top - 040.
*
* See legacy af_getExternalFzlvlRng() in af_getAirmetXml.c.
*
* Note (1) only FZLVLs are used, not M_FZLVLs.
* (2) All FZLVLs are used, including snapshots.
*
*/
private int[] findExernalFzlvlRange( List<Gfa> all, String area ) {
int[] topBot = { -1, 9999 };
HashMap<String, Geometry> areaBnds = GfaClip.getInstance().getFaAreaBounds();
Coordinate center = gf.createLinearRing( areaBnds.get(area ).getCoordinates() ).getCentroid().getCoordinate();
Gfa closestGfa = null;
double minDist = Double.MAX_VALUE;
for ( Gfa elem : all ) {
String gtype = elem.getGfaHazard();
if ( !gtype.equalsIgnoreCase("FZLVL") ) {
continue;
}
// Find distance from the FA Area's centroid to this FZLVL.
double dist = distance( elem, center );
if ( dist < minDist ) {
minDist = dist;
closestGfa = elem;
}
}
if ( closestGfa != null ) {
boolean isLeft = GfaSnap.getInstance().atLeft( center, closestGfa.getLinePoints(),
closestGfa.isClosedLine(), 0.0 );
String levelStr = closestGfa.getGfaValue( Gfa.LEVEL );
int lvl = -1;
if ( levelStr != null ) {
if ( levelStr.equalsIgnoreCase( "SFC" ) ) {
lvl = 0;
}
else {
try {
lvl = Integer.parseInt( levelStr );
}
catch ( Exception e ) {
e.printStackTrace();
}
}
}
if ( lvl >= 0 ) {
if ( !isLeft ) { // FZLVL is at right of FA area
topBot[0] = lvl + 40;
topBot[1] = lvl;
}
else { // FZLVL is at left of FA area
topBot[0] = lvl;
topBot[1] = lvl - 40;
if ( topBot[1] < 0 ) topBot[1] = 0;
}
}
}
return topBot;
}
/*
* Pad a value between 0 to 100 in format of "0xx".
*/
private String padding( int value ) {
StringBuilder str = new StringBuilder();
if ( value <= 0 ) {
str.append( "SFC" );
}
else {
if ( value < 100 ) {
str.append( "0" + value );
}
else {
str.append( value );
}
}
return str.toString();
}
/*
* Find the distance from a given point to a Gfa line or polygon.
*/
private double distance( Gfa gfa, Coordinate loc ) {
double dist = Double.MAX_VALUE;
double minDist = Double.MAX_VALUE;
Object pts[] = gfa.getPoints().toArray();
for ( int ii = 0; ii < pts.length; ii++ ) {
if ( ii == pts.length - 1 ) {
if ( gfa.isClosedLine() ) {
dist = PgenResource.distanceFromLineSegment( loc,
(Coordinate) pts[ii], (Coordinate) pts[0]);
}
else {
break;
}
}
else {
dist = PgenResource.distanceFromLineSegment( loc, (Coordinate) pts[ii],
(Coordinate) pts[ii + 1]);
}
if ( dist < minDist ) {
minDist = dist;
}
}
return minDist;
}
}

View file

@ -30,6 +30,7 @@ import org.eclipse.swt.graphics.RGB;
* 07/10 #223 M.Laryukhin Initial creation
* 02/12 #662 J. Wu Adjust forecast hour with color/line width
* 02/12 #672 J. Wu Add FA area specific state list
* 06/13 #674/TTR426 J. Wu Added getFzlvlSfcColor() & getDefaultRGB().
*
* </pre>
*
@ -84,6 +85,11 @@ public class GfaInfo {
*/
private static HashMap<String, ArrayList<String> > stateOrderByArea;
/**
* Pairs like ("red", new RGB(255, 0, 0)) read from gfa.xml
*/
private static HashMap<String, RGB> fzlvlSfcColors;
/**
* Getter for the document.
*
@ -178,9 +184,23 @@ public class GfaInfo {
*
* @param hazard
* @param fcstHr
* @return
* @return Color[]
*/
public static Color[] getDefaultColors(String hazard, String fcstHr) {
RGB rgb = getDefaultRGB( hazard, fcstHr );
Color color = new Color(rgb.red, rgb.green, rgb.blue);
return new Color[]{color, color};
}
/**
* Returns the default color's RGB for the hazard and forecast hour pair.
*
* @param hazard
* @param fcstHr
* @return RGB
*/
public static RGB getDefaultRGB(String hazard, String fcstHr) {
if (definedColors == null) {
loadColors();
}
@ -233,8 +253,8 @@ public class GfaInfo {
String colorStr = hazardNodes.get(0).valueOf("@" + gfaType );
RGB rgb = definedColors.get(colorStr);
Color color = new Color(rgb.red, rgb.green, rgb.blue);
return new Color[]{color, color};
return rgb;
}
/**
@ -367,4 +387,30 @@ public class GfaInfo {
return stateOrderByArea;
}
/**
* Get colors for FZLVL SFC snapshot, smear, or outlook.
* Default is "sky".
*/
public static RGB getFzlvlSfcColor( String name ) {
if ( definedColors == null ) {
loadColors();
}
List<Node> colorNodes = selectNodes("/root/fzlvlSFC/value");
if ( fzlvlSfcColors == null ) {
fzlvlSfcColors = new HashMap<String, RGB>();
for ( Node nd : colorNodes ) {
fzlvlSfcColors.put( nd.valueOf("@name"), definedColors.get( nd.valueOf("@nmapcolor") ) );
}
}
RGB clr = fzlvlSfcColors.get( name );
if ( clr == null ) clr = definedColors.get( "sky" );
return clr;
}
}

View file

@ -1338,7 +1338,7 @@ public class GfaSnap {
*
* @return boolean true -left of or on line; false - right of line
*/
private boolean atLeft( Coordinate pp, Coordinate[] line, boolean closed, double tolerance ) {
public boolean atLeft( Coordinate pp, Coordinate[] line, boolean closed, double tolerance ) {
// Check if closed line has duplicate end point.
boolean clsd = closed;

Some files were not shown because too many files have changed in this diff Show more