Merge "Issue #2096 - Display of Madis point data" into development
Former-commit-id:7a00e7eb24
[formerly 03bb912e339342ce7aab76abaf1d76f4522e7b01] Former-commit-id:546524f278
This commit is contained in:
commit
fb0b7b4dd6
4 changed files with 574 additions and 219 deletions
414
cave/build/static/common/cave/etc/plotModels/madisObsDesign.svg
Normal file
414
cave/build/static/common/cave/etc/plotModels/madisObsDesign.svg
Normal file
|
@ -0,0 +1,414 @@
|
|||
<?xml version="1.0"?>
|
||||
<svg width="80" height="80"
|
||||
viewBox="0 0 80 80"
|
||||
overflow="visible"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" style="stroke: rgb(255,255,255);">
|
||||
<defs>
|
||||
<script type="text/python" plotDelegate="plotDelegate">
|
||||
import re
|
||||
import datetime
|
||||
|
||||
class ObsPlotDelegate(PlotDelegate):
|
||||
def __init__(self):
|
||||
PlotDelegate.__init__(self)
|
||||
|
||||
def isMissing(self, value):
|
||||
if value == -99999.0:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
def getSampleText(self, rec):
|
||||
if rec.isValidParameter("stationId"):
|
||||
stationId = rec.getString("stationId")
|
||||
sampleString = "Station ID: " + stationId + "\n"
|
||||
|
||||
if rec.isValidParameter("timeObs"):
|
||||
timeObsSeconds = rec.getLong("timeObs")
|
||||
if not self.isMissing(timeObsSeconds):
|
||||
timeString = datetime.datetime.utcfromtimestamp(timeObsSeconds / 1000)
|
||||
sampleString += "Time: " + str(timeString) + "\n"
|
||||
|
||||
if rec.isValidParameter("provider"):
|
||||
provider = rec.getString("provider")
|
||||
if not provider in ('null'):
|
||||
sampleString += "Provider: " + provider + "\n"
|
||||
|
||||
if rec.isValidParameter("sub_provider"):
|
||||
subProvider = rec.getString("sub_provider")
|
||||
if not subProvider in ('null'):
|
||||
sampleString += "Sub Provider: " + subProvider + "\n"
|
||||
|
||||
if rec.isValidParameter("restriction"):
|
||||
restriction = rec.getInt("restriction")
|
||||
if not self.isMissing(restriction):
|
||||
sampleString += "Restriction: " + str(restriction) + "\n"
|
||||
|
||||
if rec.isValidParameter("dataset"):
|
||||
dataset = rec.getInt("dataset")
|
||||
if not self.isMissing(dataset):
|
||||
sampleString += "Dataset: " + str(dataset) + "\n"
|
||||
|
||||
if rec.isValidParameter("temperature"):
|
||||
temperature = rec.getFloat("temperature")
|
||||
|
||||
if not self.isMissing(temperature):
|
||||
temperature = (temperature - 273.15)* 1.8000 + 32
|
||||
qcd = ""
|
||||
qcaString = ""
|
||||
qcrString = ""
|
||||
|
||||
if rec.isValidParameter("temperature_qcd"):
|
||||
qcd = rec.getString("temperature_qcd")
|
||||
|
||||
if rec.isValidParameter("temperature_qca"):
|
||||
qca = rec.getInt("temperature_qca")
|
||||
if not self.isMissing(qca):
|
||||
qcaString = str(qca)
|
||||
|
||||
if rec.isValidParameter("temperature_qcr"):
|
||||
qcr = rec.getInt("temperature_qcr")
|
||||
if not self.isMissing(qcr):
|
||||
qcrString = str(qcr)
|
||||
|
||||
sampleString += "Temperature: "
|
||||
sampleString += self.getString("%.0f" % (temperature), qcd, qcaString, qcrString)
|
||||
|
||||
if rec.isValidParameter("dewpoint"):
|
||||
dewpoint = rec.getFloat("dewpoint")
|
||||
|
||||
if not self.isMissing(dewpoint):
|
||||
dewpoint = (dewpoint - 273.15)* 1.8000 + 32
|
||||
qcd = ""
|
||||
qcaString = ""
|
||||
qcrString = ""
|
||||
|
||||
if rec.isValidParameter("dewpoint_qcd"):
|
||||
qcd = rec.getString("dewpoint_qcd")
|
||||
|
||||
if rec.isValidParameter("dewpoint_qca"):
|
||||
qca = rec.getInt("dewpoint_qca")
|
||||
if not self.isMissing(qca):
|
||||
qcaString = str(qca)
|
||||
|
||||
if rec.isValidParameter("dewpoint_qcr"):
|
||||
qcr = rec.getInt("dewpoint_qcr")
|
||||
if not self.isMissing(qcr):
|
||||
qcrString = str(qcr)
|
||||
|
||||
sampleString += "Dew Point: "
|
||||
sampleString += self.getString("%.0f" % (dewpoint), qcd, qcaString, qcrString)
|
||||
|
||||
if rec.isValidParameter("rh"):
|
||||
rh = rec.getFloat("rh")
|
||||
|
||||
if not self.isMissing(rh):
|
||||
qcd = ""
|
||||
qcaString = ""
|
||||
qcrString = ""
|
||||
|
||||
if rec.isValidParameter("rh_qcd"):
|
||||
qcd = rec.getString("rh_qcd")
|
||||
|
||||
if rec.isValidParameter("rh_qca"):
|
||||
qca = rec.getInt("rh_qca")
|
||||
if not self.isMissing(qca):
|
||||
qcaString = str(qca)
|
||||
|
||||
if rec.isValidParameter("rh_qcr"):
|
||||
qcr = rec.getInt("rh_qcr")
|
||||
if not self.isMissing(qcr):
|
||||
qcrString = str(qcr)
|
||||
|
||||
sampleString += "Relative Humidity: "
|
||||
sampleString += self.getString("%.0f" % (rh), qcd, qcaString, qcrString)
|
||||
|
||||
if rec.isValidParameter("windDirection"):
|
||||
windDir = rec.getFloat("windDirection")
|
||||
|
||||
if not self.isMissing(windDir):
|
||||
qcd = ""
|
||||
qcaString = ""
|
||||
qcrString = ""
|
||||
|
||||
if rec.isValidParameter("windDirection_qcd"):
|
||||
qcd = rec.getString("windDirection_qcd")
|
||||
|
||||
if rec.isValidParameter("windDirection_qca"):
|
||||
qca = rec.getInt("windDirection_qca")
|
||||
if not self.isMissing(qca):
|
||||
qcaString = str(qca)
|
||||
|
||||
if rec.isValidParameter("windDirection_qcr"):
|
||||
qcr = rec.getInt("windDirection_qcr")
|
||||
if not self.isMissing(qcr):
|
||||
qcrString = str(qcr)
|
||||
|
||||
sampleString += "Wind Direction: "
|
||||
sampleString += self.getString("%.0f" % (windDir), qcd, qcaString, qcrString)
|
||||
|
||||
if rec.isValidParameter("windSpeed"):
|
||||
windSpeed = rec.getFloat("windSpeed")
|
||||
|
||||
if not self.isMissing(windSpeed):
|
||||
qcd = ""
|
||||
qcaString = ""
|
||||
qcrString = ""
|
||||
|
||||
if rec.isValidParameter("windSpeed_qcd"):
|
||||
qcd = rec.getString("windSpeed_qcd")
|
||||
|
||||
if rec.isValidParameter("windSpeed_qca"):
|
||||
qca = rec.getInt("windSpeed_qca")
|
||||
if not self.isMissing(qca):
|
||||
qcaString = str(qca)
|
||||
|
||||
if rec.isValidParameter("windSpeed_qcr"):
|
||||
qcr = rec.getInt("windSpeed_qcr")
|
||||
if not self.isMissing(qcr):
|
||||
qcrString = str(qcr)
|
||||
|
||||
sampleString += "Wind Speed: "
|
||||
sampleString += self.getString("%.0f" % (windSpeed), qcd, qcaString, qcrString)
|
||||
|
||||
if rec.isValidParameter("windGust"):
|
||||
windGust = rec.getFloat("windGust")
|
||||
|
||||
if not self.isMissing(windGust):
|
||||
qcd = ""
|
||||
qcaString = ""
|
||||
qcrString = ""
|
||||
|
||||
if rec.isValidParameter("windGust_qcd"):
|
||||
qcd = rec.getString("windGust_qcd")
|
||||
|
||||
if rec.isValidParameter("windGust_qca"):
|
||||
qca = rec.getInt("windGust_qca")
|
||||
if not self.isMissing(qca):
|
||||
qcaString = str(qca)
|
||||
|
||||
if rec.isValidParameter("windGust_qcr"):
|
||||
qcr = rec.getInt("windGust_qcr")
|
||||
if not self.isMissing(qcr):
|
||||
qcrString = str(qcr)
|
||||
|
||||
sampleString += "Wind Gust: "
|
||||
sampleString += self.getString("%.0f" % (windGust), qcd, qcaString, qcrString)
|
||||
|
||||
if rec.isValidParameter("altimeter"):
|
||||
altimeter = rec.getFloat("altimeter")
|
||||
|
||||
if not self.isMissing(altimeter):
|
||||
qcd = ""
|
||||
qcaString = ""
|
||||
qcrString = ""
|
||||
|
||||
if rec.isValidParameter("altimeter_qcd"):
|
||||
qcd = rec.getString("altimeter_qcd")
|
||||
|
||||
if rec.isValidParameter("altimeter_qca"):
|
||||
qca = rec.getInt("altimeter_qca")
|
||||
if not self.isMissing(qca):
|
||||
qcaString = str(qca)
|
||||
|
||||
if rec.isValidParameter("altimeter_qcr"):
|
||||
qcr = rec.getInt("altimeter_qcr")
|
||||
if not self.isMissing(qcr):
|
||||
qcrString = str(qcr)
|
||||
|
||||
sampleString += "Altimeter: "
|
||||
sampleString += self.getString("%.0f" % (altimeter / 100), qcd, qcaString, qcrString)
|
||||
|
||||
if rec.isValidParameter("pressure"):
|
||||
pressure = rec.getFloat("pressure")
|
||||
|
||||
if not self.isMissing(pressure):
|
||||
qcd = ""
|
||||
qcaString = ""
|
||||
qcrString = ""
|
||||
|
||||
if rec.isValidParameter("pressure_qcd"):
|
||||
qcd = rec.getString("pressure_qcd")
|
||||
|
||||
if rec.isValidParameter("pressure_qca"):
|
||||
qca = rec.getInt("pressure_qca")
|
||||
if not self.isMissing(qca):
|
||||
qcaString = str(qca)
|
||||
|
||||
if rec.isValidParameter("pressure_qcr"):
|
||||
qcr = rec.getInt("pressure_qcr")
|
||||
if not self.isMissing(qcr):
|
||||
qcrString = str(qcr)
|
||||
|
||||
sampleString += "Pressure: "
|
||||
sampleString += self.getString("%.0f" % (pressure / 100), qcd, qcaString, qcrString)
|
||||
|
||||
if rec.isValidParameter("precipitalWater"):
|
||||
precipitalWater = rec.getFloat("precipitalWater")
|
||||
|
||||
if not self.isMissing(precipitalWater):
|
||||
qcd = ""
|
||||
qcaString = ""
|
||||
qcrString = ""
|
||||
|
||||
if rec.isValidParameter("precipitalWater_qcd"):
|
||||
qcd = rec.getString("precipitalWater_qcd")
|
||||
|
||||
if rec.isValidParameter("precipitalWater_qca"):
|
||||
qca = rec.getInt("precipitalWater_qca")
|
||||
if not self.isMissing(qca):
|
||||
qcaString = str(qca)
|
||||
|
||||
if rec.isValidParameter("precipitalWater_qcr"):
|
||||
qcr = rec.getInt("precipitalWater_qcr")
|
||||
if not self.isMissing(qcr):
|
||||
qcrString = str(qcr)
|
||||
|
||||
sampleString += "Precipital Water: "
|
||||
sampleString += self.getString("%.2f" % (precipitalWater), qcd, qcaString, qcrString)
|
||||
|
||||
if rec.isValidParameter("precipRate"):
|
||||
precipRate = rec.getFloat("precipRate")
|
||||
|
||||
if not self.isMissing(precipRate):
|
||||
qcd = ""
|
||||
qcaString = ""
|
||||
qcrString = ""
|
||||
|
||||
if rec.isValidParameter("precipRate_qcd"):
|
||||
qcd = rec.getString("precipRate_qcd")
|
||||
|
||||
if rec.isValidParameter("precipRate_qca"):
|
||||
qca = rec.getInt("precipRate_qca")
|
||||
if not self.isMissing(qca):
|
||||
qcaString = str(qca)
|
||||
|
||||
if rec.isValidParameter("precipRate_qcr"):
|
||||
qcr = rec.getInt("precipRate_qcr")
|
||||
if not self.isMissing(qcr):
|
||||
qcrString = str(qcr)
|
||||
|
||||
sampleString += "Precip Rate: "
|
||||
sampleString += self.getString("%.2f" % (precipRate), qcd, qcaString, qcrString)
|
||||
|
||||
|
||||
return sampleString
|
||||
|
||||
def getString(self, value, qcd, qca, qcr):
|
||||
return value + " / " + qcd + " / " + qca + " / " + qcr + "\n"
|
||||
|
||||
plotDelegate = ObsPlotDelegate()
|
||||
|
||||
</script>
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
@font-face { font-family: "WindSymbolFont";
|
||||
src: url(WindSymbols.svg#WindSymbols); }
|
||||
@font-face { font-family: "StandardFont";
|
||||
src: url(Standard.svg#Standard); }
|
||||
@font-face { font-family: "WxSymbolFont";
|
||||
src: url(WxSymbols.svg#WxSymbols); }
|
||||
@font-face { font-family: "SpecialSymbolFont";
|
||||
src: url(SpecialSymbols.svg#SpecialSymbols); }
|
||||
text.barb
|
||||
{
|
||||
fill: none;
|
||||
font-size: 1em;
|
||||
font-size: 1em;
|
||||
font-family: WindSymbolFont;
|
||||
}
|
||||
text.arrow
|
||||
{
|
||||
fill: none;
|
||||
font-size: 1em;
|
||||
font-size: 1em;
|
||||
font-family: WindSymbolFont;
|
||||
}
|
||||
text.text
|
||||
{
|
||||
fill: none;
|
||||
font-size: 1em;
|
||||
stroke-width: 1px;
|
||||
font-family: StandardFont;
|
||||
font-size: 1em;
|
||||
}
|
||||
text.weather
|
||||
{
|
||||
fill: none;
|
||||
font-size: 1em;
|
||||
stroke-width: 1px;
|
||||
font-family: WxSymbolFont;
|
||||
|
||||
}
|
||||
text.special
|
||||
{
|
||||
fill: none;
|
||||
font-size: 1em;
|
||||
stroke-width: 1px;
|
||||
font-size: 1em;
|
||||
font-family: SpecialSymbolFont;
|
||||
}
|
||||
]]>
|
||||
</style>
|
||||
|
||||
<symbol overflow="visible" id="plotData" class="info">
|
||||
<g id="windVaneText" plotMode="barb" plotParam="windSpeed,windDirection,windGust" plotUnit="kts" x="0" y="0" transform="rotate(0,0,0)">
|
||||
<text id="windVaneText" class="arrow" x="0" y="0">0</text>
|
||||
<text id="windArrowText" class="barb" x="0" y="0">arrow</text>
|
||||
<text id="windGustText" class="text" x="0" y="32" style="text-anchor: middle">0</text>
|
||||
</g>
|
||||
<text id="pressure" plotMode="text" plotParam="pressure" plotUnit="hPa" plotFormat="%5.0f" plotTrim="2" style="text-anchor: start;" x="10px" y="-10px">018</text>
|
||||
<text id="dewpoint" plotMode="text" plotParam="dewpoint" plotUnit="F" plotFormat="%3.0f" style="text-anchor: end;" x="-10px" y="10px">59</text>
|
||||
<text id="temperature" plotMode="text" plotParam="temperature" plotUnit="F" plotFormat="%3.0f" style="text-anchor: end;" x="-10px" y="-10px">75</text>
|
||||
|
||||
<text id="provider" plotMode="sample" class="text" plotParam="provider">0</text>
|
||||
<text id="sub_provider" plotMode="sample" class="text" plotParam="sub_provider">0</text>
|
||||
<text id="stationID" plotMode="sample" class="text" plotParam="stationId">0</text>
|
||||
<text id="restriction" plotMode="sample" class="text" plotParam="restriction">0</text>
|
||||
<text id="dataset" plotMode="sample" class="text" plotParam="dataset">0</text>
|
||||
<text id="timeObs" plotMode="sample" class="text" plotParam="timeObs">0</text>
|
||||
<text id="precipitalWater" plotMode="sample" plotParam="precipitalWater" plotUnit="in" plotFormat="%3.0f" style="text-anchor: end;">0</text>
|
||||
<text id="precipitalWater_qcd" plotMode="sample" plotParam="precipitalWater_qcd">59</text>
|
||||
<text id="precipitalWater_qcr" plotMode="sample" plotParam="precipitalWater_qcr">59</text>
|
||||
<text id="precipitalWater_qca" plotMode="sample" plotParam="precipitalWater_qca">59</text>
|
||||
<text id="rh" plotMode="sample" plotParam="rh" plotUnit="%" plotFormat="%2.0f" style="text-anchor: end;">0</text>
|
||||
<text id="rh_qcd" plotMode="sample" plotParam="rh_qcd">59</text>
|
||||
<text id="rh_qcr" plotMode="sample" plotParam="rh_qcr">59</text>
|
||||
<text id="rh_qca" plotMode="sample" plotParam="rh_qca">59</text>
|
||||
<text id="precipRate" plotMode="sample" plotParam="precipRate" plotUnit="in/hr" plotFormat="%2.0f" style="text-anchor: end;">0</text>
|
||||
<text id="precipRate_qcd" plotMode="sample" plotParam="precipRate_qcd">59</text>
|
||||
<text id="precipRate_qcr" plotMode="sample" plotParam="precipRate_qcr">59</text>
|
||||
<text id="precipRate_qca" plotMode="sample" plotParam="precipRate_qca">59</text>
|
||||
<text id="pressure" plotMode="sample" plotParam="pressure" plotUnit="hPa">018</text>
|
||||
<text id="pressure_qcd" plotMode="sample" plotParam="pressure_qcd">59</text>
|
||||
<text id="pressure_qcr" plotMode="sample" plotParam="pressure_qcr">59</text>
|
||||
<text id="pressure_qca" plotMode="sample" plotParam="pressure_qca">59</text>
|
||||
<text id="altimeter" plotMode="sample" plotParam="altimeter" plotUnit="hPa">018</text>
|
||||
<text id="altimeter_qcd" plotMode="sample" plotParam="altimeter_qcd">59</text>
|
||||
<text id="altimeter_qcr" plotMode="sample" plotParam="altimeter_qcr">59</text>
|
||||
<text id="altimeter_qca" plotMode="sample" plotParam="altimeter_qca">59</text>
|
||||
<text id="windSpeed" plotMode="sample" plotParam="windSpeed" plotUnit="kn">0</text>
|
||||
<text id="windSpeed_qcd" plotMode="sample" plotParam="windSpeed_qcd">59</text>
|
||||
<text id="windSpeed_qcr" plotMode="sample" plotParam="windSpeed_qcr">59</text>
|
||||
<text id="windSpeed_qca" plotMode="sample" plotParam="windSpeed_qca">59</text>
|
||||
<text id="windDirection" plotMode="sample" plotParam="windDirection" plotUnit="degree_angle">0</text>
|
||||
<text id="windDirection_qcd" plotMode="sample" plotParam="windDirection_qcd">59</text>
|
||||
<text id="windDirection_qcr" plotMode="sample" plotParam="windDirection_qcr">59</text>
|
||||
<text id="windDirection_qca" plotMode="sample" plotParam="windDirection_qca">59</text>
|
||||
<text id="windGust" plotMode="sample" plotParam="windGust" plotUnit="kn">0</text>
|
||||
<text id="windGust_qcd" plotMode="sample" plotParam="windGust_qcd">59</text>
|
||||
<text id="windGust_qcr" plotMode="sample" plotParam="windGust_qcr">59</text>
|
||||
<text id="windGust_qca" plotMode="sample" plotParam="windGust_qca">59</text>
|
||||
<text id="dewpoint" plotMode="sample" plotParam="dewpoint">59</text>
|
||||
<text id="dewpoint_qcd" plotMode="sample" plotParam="dewpoint_qcd">59</text>
|
||||
<text id="dewpoint_qcr" plotMode="sample" plotParam="dewpoint_qcr">59</text>
|
||||
<text id="dewpoint_qca" plotMode="sample" plotParam="dewpoint_qca">59</text>
|
||||
<text id="temperature" plotMode="sample" plotParam="temperature">59</text>
|
||||
<text id="temperature_qcd" plotMode="sample" plotParam="temperature_qcd">59</text>
|
||||
<text id="temperature_qcr" plotMode="sample" plotParam="temperature_qcr">59</text>
|
||||
<text id="temperature_qca" plotMode="sample" plotParam="temperature_qca">59</text>
|
||||
</symbol>
|
||||
</defs>
|
||||
<use id="precip" x="40" y="40" width="80" height="80" visibility="visible" xlink:href="#plotData"/>
|
||||
</svg>
|
After Width: | Height: | Size: 18 KiB |
|
@ -1,93 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<svg width="80" height="80"
|
||||
viewBox="0 0 80 80"
|
||||
overflow="visible"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" style="stroke: rgb(255,255,255);">
|
||||
<defs>
|
||||
<script type="text/python" plotDelegate="plotDelegate">
|
||||
import re
|
||||
|
||||
class ObsPlotDelegate(PlotDelegate):
|
||||
def __init__(self):
|
||||
PlotDelegate.__init__(self)
|
||||
|
||||
def getSampleText(self, rec):
|
||||
stationString = rec.getString("stationId")
|
||||
providerString = rec.getString("provider")
|
||||
subProviderString = rec.getString("sub_provider")
|
||||
sampleString = stationString + " " + providerString + " " + subProviderString
|
||||
return sampleString
|
||||
|
||||
plotDelegate = ObsPlotDelegate()
|
||||
|
||||
</script>
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
@font-face { font-family: "WindSymbolFont";
|
||||
src: url(WindSymbols.svg#WindSymbols); }
|
||||
@font-face { font-family: "StandardFont";
|
||||
src: url(Standard.svg#Standard); }
|
||||
@font-face { font-family: "WxSymbolFont";
|
||||
src: url(WxSymbols.svg#WxSymbols); }
|
||||
@font-face { font-family: "SpecialSymbolFont";
|
||||
src: url(SpecialSymbols.svg#SpecialSymbols); }
|
||||
text.barb
|
||||
{
|
||||
fill: none;
|
||||
font-size: 1em;
|
||||
font-size: 1em;
|
||||
font-family: WindSymbolFont;
|
||||
}
|
||||
text.arrow
|
||||
{
|
||||
fill: none;
|
||||
font-size: 1em;
|
||||
font-size: 1em;
|
||||
font-family: WindSymbolFont;
|
||||
}
|
||||
text.text
|
||||
{
|
||||
fill: none;
|
||||
font-size: 1em;
|
||||
stroke-width: 1px;
|
||||
font-family: StandardFont;
|
||||
font-size: 1em;
|
||||
}
|
||||
text.weather
|
||||
{
|
||||
fill: none;
|
||||
font-size: 1em;
|
||||
stroke-width: 1px;
|
||||
font-family: WxSymbolFont;
|
||||
|
||||
}
|
||||
text.special
|
||||
{
|
||||
fill: none;
|
||||
font-size: 1em;
|
||||
stroke-width: 1px;
|
||||
font-size: 1em;
|
||||
font-family: SpecialSymbolFont;
|
||||
}
|
||||
]]>
|
||||
</style>
|
||||
|
||||
<symbol overflow="visible" id="plotData" class="info">
|
||||
<text id="stationID" plotMode="sample" class="text" plotParam="stationId" x="0" y="0">0</text>
|
||||
<g id="windVaneText" plotMode="barb" plotParam="windSpeed,windDirection,windGust" plotUnit="kts" x="0" y="0" transform="rotate(0,0,0)">
|
||||
<text id="windVaneText" class="arrow" x="0" y="0">0</text>
|
||||
<text id="windArrowText" class="barb" x="0" y="0">arrow</text>
|
||||
<text id="windGustText" class="text" x="0" y="32" style="text-anchor: middle">0</text>
|
||||
</g>
|
||||
|
||||
<text id="provider" plotMode="sample" class="text" plotParam="provider" x="10px" y="0">018</text>
|
||||
<text id="dewpoint" plotMode="text" plotParam="dewpoint" plotUnit="°F" plotFormat="%3.0f" style="text-anchor: end;" x="-10px" y="10px">59</text>
|
||||
<text id="temperature" plotMode="text" plotParam="temperature" plotUnit="°F" plotFormat="%3.0f" style="text-anchor: end;" x="-10px" y="-10px">75</text>
|
||||
<text id="pressure" plotMode="text" plotParam="pressure" plotUnit="dPa" plotFormat="%5.0f" plotTrim="2" style="text-anchor: start;" x="10px" y="-10px">018</text>
|
||||
<text id="dataset" plotMode="sample" class="text" plotParam="dataset" x="0" y="0">0</text>
|
||||
<text id="precipitalWater" plotMode="text" plotParam="precipitalWater" plotUnit="in" plotFormat="%3.0f" style="text-anchor: end;" x="-10" y="0">0</text>
|
||||
<text id="relative humidity" plotMode="text" plotParam="rh" plotUnit="%" plotFormat="PK%.0f" style="text-anchor: end;" x="-10px" y="20px">59</text>
|
||||
</symbol>
|
||||
</defs>
|
||||
</svg>
|
Before Width: | Height: | Size: 3.6 KiB |
|
@ -30,7 +30,7 @@ import com.raytheon.uf.common.pointdata.PointDataView;
|
|||
import com.raytheon.uf.viz.core.datastructure.CubeUtil;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
* Plot Data Object.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
|
@ -38,7 +38,8 @@ import com.raytheon.uf.viz.core.datastructure.CubeUtil;
|
|||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 19, 2011 njensen Initial creation
|
||||
* Jul 19, 2011 njensen Initial creation.
|
||||
* Jul 12, 2013 2096 mpduff Add method to check if parameter is valid.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -58,7 +59,8 @@ public class PlotData {
|
|||
private int dimension;
|
||||
}
|
||||
|
||||
private Map<String, PlotValue> valueMap = new HashMap<String, PlotValue>();
|
||||
/** Map of data values */
|
||||
private final Map<String, PlotValue> valueMap = new HashMap<String, PlotValue>();
|
||||
|
||||
public void addData(PointDataView pdv) {
|
||||
for (String key : pdv.getContainer().getParameters()) {
|
||||
|
@ -220,4 +222,14 @@ public class PlotData {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the provided parameter is valid (contained in the valueMap)
|
||||
*
|
||||
* @param param
|
||||
* The parameter to check
|
||||
* @return true if the parameter exists in the valueMap, false if not
|
||||
*/
|
||||
public boolean isValidParameter(String param) {
|
||||
return valueMap.containsKey(param);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,6 +71,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* May 16, 2013 753 dhladky Restored dataUri as unique key
|
||||
* June 03, 2013 1763 dhladky Added ValMap lookups for QCD
|
||||
* July 08, 2013 2171 dhladky Removed dataURI
|
||||
* July 12, 2013 2096 mpduff Changed temperature unit to F.
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
|
@ -81,14 +82,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
@SequenceGenerator(initialValue = 1, name = PluginDataObject.ID_GEN, sequenceName = "madisseq")
|
||||
@Table(name = "madis", uniqueConstraints = { @UniqueConstraint(columnNames = {
|
||||
"location", "refTime", "provider", "subProvider", "restriction" }) })
|
||||
|
||||
@org.hibernate.annotations.Table(
|
||||
appliesTo = "madis",
|
||||
indexes = {
|
||||
@Index(name = "madis_wfsQueryIndex", columnNames = { "refTime", "location" }),
|
||||
}
|
||||
)
|
||||
|
||||
@org.hibernate.annotations.Table(appliesTo = "madis", indexes = { @Index(name = "madis_wfsQueryIndex", columnNames = {
|
||||
"refTime", "location" }), })
|
||||
@DynamicSerialize
|
||||
public class MadisRecord extends PersistablePluginDataObject implements
|
||||
ISpatialEnabled, IDecoderGettable, IPointData {
|
||||
|
@ -106,171 +101,171 @@ public class MadisRecord extends PersistablePluginDataObject implements
|
|||
@Column
|
||||
@DataURI(position = 2)
|
||||
private String subProvider;
|
||||
|
||||
|
||||
@Embedded
|
||||
@DataURI(position = 3, embedded = true)
|
||||
@DynamicSerializeElement
|
||||
private SurfaceObsLocation location;
|
||||
|
||||
|
||||
/** An integer denoting the dataset */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int dataset;
|
||||
|
||||
|
||||
/** An integer denoting the restriction level */
|
||||
@DynamicSerializeElement
|
||||
@Column
|
||||
@DataURI(position = 4)
|
||||
private int restriction;
|
||||
|
||||
|
||||
/** A string denoting the time of observation */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private Date timeObs;
|
||||
|
||||
|
||||
/** A float denoting the dewpoint temp */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private float dewpoint = -99999;
|
||||
|
||||
|
||||
/** A QCD denoting the dewpoint quality */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private QCD dewpoint_qcd = QCD.MISSING;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int dewpoint_qca = -99999;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int dewpoint_qcr = -99999;
|
||||
|
||||
|
||||
/** A float denoting the relative humidity */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private float rh = -99999;
|
||||
|
||||
|
||||
/** A string denoting the provider sub network */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private QCD rh_qcd = QCD.MISSING;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int rh_qca = -99999;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int rh_qcr = -99999;
|
||||
|
||||
|
||||
/** A float denoting the altimeter */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private float altimeter = -99999;
|
||||
|
||||
|
||||
/** A QCD denoting the altimeter quality */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private QCD altimeter_qcd = QCD.MISSING;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int altimeter_qca = -99999;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int altimeter_qcr = -99999;
|
||||
|
||||
|
||||
/** A float denoting the temperature */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private float temperature = -99999;
|
||||
|
||||
|
||||
/** A QCD denoting the temperature quality */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private QCD temperature_qcd = QCD.MISSING;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int temperature_qca = -99999;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int temperature_qcr = -99999;
|
||||
|
||||
|
||||
/** An int denoting the windDirection */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int windDirection = -99999;
|
||||
|
||||
|
||||
/** A QCD denoting the wind Direction quality */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private QCD windDirection_qcd = QCD.MISSING;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int windDirection_qca = -99999;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int windDirection_qcr = -99999;
|
||||
|
||||
|
||||
/** A QCD denoting the altimeter quality */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private QCD elevation_qcd = QCD.MISSING;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int elevation_qca = -99999;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int elevation_qcr = -99999;
|
||||
|
||||
|
||||
/** A QCD denoting the latitude quality */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private QCD latitude_qcd = QCD.MISSING;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int latitude_qca = -99999;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int latitude_qcr = -99999;
|
||||
|
||||
|
||||
/** A QCD denoting the longitude quality */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private QCD longitude_qcd = QCD.MISSING;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int longitude_qca = -99999;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int longitude_qcr = -99999;
|
||||
|
||||
|
||||
/** A float denoting the preciprate */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private float precipRate = -99999;
|
||||
|
||||
|
||||
/** A QCD denoting the preciprate quality */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private QCD precipRate_qcd = QCD.MISSING;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int precipRate_qca = -99999;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int precipRate_qcr = -99999;
|
||||
|
@ -279,84 +274,84 @@ public class MadisRecord extends PersistablePluginDataObject implements
|
|||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private float windSpeed = -99999;
|
||||
|
||||
|
||||
/** A QCD denoting the windSpeed(wind) quality */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private QCD windSpeed_qcd = QCD.MISSING;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int windSpeed_qca = -99999;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int windSpeed_qcr = -99999;
|
||||
|
||||
|
||||
/** A float denoting the windSpeedgust(wind) */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private float windGust = -99999;
|
||||
|
||||
|
||||
/** A QCD denoting the windSpeedgust(wind) quality */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private QCD windGust_qcd = QCD.MISSING;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int windGust_qca = -99999;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int windGust_qcr = -99999;
|
||||
|
||||
|
||||
/** A float denoting the precipitalWater */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private float precipitalWater = -99999;
|
||||
|
||||
|
||||
/** A QCD denoting the precipitalWater */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private QCD precipitalWater_qcd = QCD.MISSING;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int precipitalWater_qca = -99999;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int precipitalWater_qcr = -99999;
|
||||
|
||||
|
||||
/** A float denoting the pressure */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private float pressure = -99999;
|
||||
|
||||
|
||||
/** A QCD denoting the precipitalWater */
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private QCD pressure_qcd = QCD.MISSING;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int pressure_qca = -99999;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Transient
|
||||
private int pressure_qcr = -99999;
|
||||
|
||||
|
||||
@DynamicSerializeElement
|
||||
@Embedded
|
||||
private PointDataView pointDataView;
|
||||
|
||||
|
||||
public static final String PLUGIN_NAME = "madis";
|
||||
|
||||
public static final String STATION_ID = "stationId";
|
||||
|
||||
public static final Unit<Temperature> TEMPERATURE_UNIT = SI.CELSIUS;
|
||||
|
||||
public static final Unit<Temperature> TEMPERATURE_UNIT = NonSI.FAHRENHEIT;
|
||||
|
||||
public static final Unit<Dimensionless> HUMIDITY_UNIT = NonSI.PERCENT;
|
||||
|
||||
public static final Unit<Velocity> WIND_SPEED_UNIT = NonSI.KNOT;
|
||||
|
@ -370,9 +365,9 @@ public class MadisRecord extends PersistablePluginDataObject implements
|
|||
public static final Unit<Pressure> PRESSURE_UNIT = SI.HECTO(SI.PASCAL);
|
||||
|
||||
public static final Unit<Pressure> ALTIMETER_UNIT = SI.PASCAL;
|
||||
|
||||
|
||||
public static final Unit<Length> PRECIP_UNIT = NonSI.INCH;
|
||||
|
||||
|
||||
/** Keys that map back to known decoder params **/
|
||||
private static final HashMap<String, String> PARM_MAP = new HashMap<String, String>();
|
||||
static {
|
||||
|
@ -387,72 +382,99 @@ public class MadisRecord extends PersistablePluginDataObject implements
|
|||
PARM_MAP.put(STA_LON, STA_LON);
|
||||
}
|
||||
|
||||
|
||||
/** MADIS specific parameter keys */
|
||||
public static final class ParameterKey {
|
||||
|
||||
public static final String RH = "RH";
|
||||
|
||||
public static final String RH_QCA = "RH_QCA";
|
||||
|
||||
public static final String RH_QCR = "RH_QCR";
|
||||
|
||||
public static final String RH_QCD = "RH_QCD";
|
||||
|
||||
|
||||
public static final String TEMPERATURE_QCD = "TEMPERATURE_QCD";
|
||||
|
||||
public static final String TEMPERATURE_QCA = "TEMPERATURE_QCA";
|
||||
|
||||
public static final String TEMPERATURE_QCR = "TEMPERATURE_QCR";
|
||||
|
||||
|
||||
public static final String DEWPOINT_QCD = "DEWPOINT_QCD";
|
||||
|
||||
public static final String DEWPOINT_QCA = "DEWPOINT_QCA";
|
||||
|
||||
public static final String DEWPOINT_QCR = "DEWPOINT_QCR";
|
||||
|
||||
|
||||
public static final String WINDDIRECTION_QCD = "WINDDIRECTION_QCD";
|
||||
|
||||
public static final String WINDDIRECTION_QCA = "WINDDIRECTION_QCA";
|
||||
|
||||
public static final String WINDDIRECTION_QCR = "WINDDIRECTION_QCR";
|
||||
|
||||
|
||||
public static final String WINDSPEED_QCD = "WINDSPEED_QCD";
|
||||
|
||||
public static final String WINDSPEED_QCA = "WINDSPEED_QCA";
|
||||
|
||||
public static final String WINDSPEED_QCR = "WINDSPEED_QCR";
|
||||
|
||||
|
||||
public static final String WINDGUST_QCD = "WINDGUST_QCD";
|
||||
|
||||
public static final String WINDGUST_QCA = "WINDGUST_QCA";
|
||||
|
||||
public static final String WINDGUST_QCR = "WINDGUST_QCR";
|
||||
|
||||
|
||||
public static final String PRECIPRATE = "PCPRATE";
|
||||
|
||||
public static final String PRECIPRATE_QCA = "PCPRATE_QCA";
|
||||
|
||||
public static final String PRECIPRATE_QCR = "PCPRATE_QCR";
|
||||
|
||||
public static final String PRECIPRATE_QCD = "PCPRATE_QCD";
|
||||
|
||||
public static final String PRECIPITALWATER = "PWV";
|
||||
|
||||
public static final String PRECIPITALWATER_QCA = "PWV_QCA";
|
||||
|
||||
public static final String PRECIPITALWATER_QCR = "PWV_QCR";
|
||||
|
||||
public static final String PRECIPITALWATER_QCD = "PWV_QCD";
|
||||
|
||||
|
||||
public static final String PRESSURE = "P";
|
||||
|
||||
public static final String PRESSURE_QCA = "P_QCA";
|
||||
|
||||
public static final String PRESSURE_QCR = "P_QCR";
|
||||
|
||||
public static final String PRESSURE_QCD = "P_QCD";
|
||||
|
||||
public static final String RELATIVEHUMIDITY = "RH";
|
||||
|
||||
public static final String RELATIVEHUMIDITY_QCA = "RH_QCA";
|
||||
|
||||
public static final String RELATIVEHUMIDITY_QCR = "RH_QCR";
|
||||
|
||||
public static final String RELATIVEHUMIDITY_QCD = "RH_QCD";
|
||||
|
||||
|
||||
public static final String PROVIDER = "PROVIDER";
|
||||
|
||||
public static final String SUB_PROVIDER = "SUB_PROVIDER";
|
||||
|
||||
public static final String STATIONID = "STATIONID";
|
||||
|
||||
public static final String RESTRICTION = "RESTRICTION";
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the pointdata view
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get the pointdata view
|
||||
*/
|
||||
@Override
|
||||
public PointDataView getPointDataView() {
|
||||
return this.pointDataView;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the pointdata view
|
||||
*/
|
||||
/**
|
||||
* Set the pointdata view
|
||||
*/
|
||||
@Override
|
||||
public void setPointDataView(PointDataView pointDataView) {
|
||||
this.pointDataView = pointDataView;
|
||||
|
@ -463,15 +485,15 @@ public class MadisRecord extends PersistablePluginDataObject implements
|
|||
Amount a = null;
|
||||
|
||||
String pName = paramName;
|
||||
|
||||
|
||||
if (SFC_TEMP.equals(pName)) {
|
||||
if (temperature != -9999) {
|
||||
a = new Amount(temperature, TEMPERATURE_UNIT);
|
||||
}
|
||||
}
|
||||
} else if (SFC_DWPT.equals(pName)) {
|
||||
if (dewpoint != -9999) {
|
||||
a = new Amount(dewpoint, TEMPERATURE_UNIT);
|
||||
}
|
||||
}
|
||||
} else if (SFC_WNDSPD.equals(pName)) {
|
||||
a = new Amount(windSpeed, WIND_SPEED_UNIT);
|
||||
} else if (SFC_WNDGST.equals(pName)) {
|
||||
|
@ -499,7 +521,7 @@ public class MadisRecord extends PersistablePluginDataObject implements
|
|||
if (pressure != -9999) {
|
||||
a = new Amount(pressure, PRESSURE_UNIT);
|
||||
}
|
||||
}
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
|
@ -523,7 +545,7 @@ public class MadisRecord extends PersistablePluginDataObject implements
|
|||
@Override
|
||||
public String[] getStrings(final String paramName) {
|
||||
if (ParameterKey.PROVIDER.matches(paramName)) {
|
||||
return new String[] {getProvider()};
|
||||
return new String[] { getProvider() };
|
||||
} else if (ParameterKey.SUB_PROVIDER.matches(paramName)) {
|
||||
return new String[] { getSubProvider() };
|
||||
} else if (ParameterKey.STATIONID.matches(paramName)) {
|
||||
|
@ -549,42 +571,43 @@ public class MadisRecord extends PersistablePluginDataObject implements
|
|||
*/
|
||||
@XmlEnum
|
||||
public enum QCD {
|
||||
//C - Coarse pass, passed level 1
|
||||
//S - Screened, passed levels 1 and 2
|
||||
//V - Verified, passed levels 1, 2, and 3
|
||||
//X - Rejected/erroneous, failed level 1
|
||||
//Q - Questioned, passed level 1, failed 2 or 3
|
||||
//G - Subjective good
|
||||
//B - Subjective bad
|
||||
@XmlEnumValue(QCD.V) VERIFIED("V"),
|
||||
@XmlEnumValue(QCD.S) SCREENDED("S"),
|
||||
@XmlEnumValue(QCD.Q) QUESTIONED("Q"),
|
||||
@XmlEnumValue(QCD.B) BAD("B"),
|
||||
@XmlEnumValue(QCD.C) COARSEPASS("C"),
|
||||
@XmlEnumValue(QCD.G) GOOD("G"),
|
||||
@XmlEnumValue(QCD.Z) MISSING("Z"),
|
||||
@XmlEnumValue(QCD.X) REJECTED("X");
|
||||
// C - Coarse pass, passed level 1
|
||||
// S - Screened, passed levels 1 and 2
|
||||
// V - Verified, passed levels 1, 2, and 3
|
||||
// X - Rejected/erroneous, failed level 1
|
||||
// Q - Questioned, passed level 1, failed 2 or 3
|
||||
// G - Subjective good
|
||||
// B - Subjective bad
|
||||
@XmlEnumValue(QCD.V)
|
||||
VERIFIED("V"), @XmlEnumValue(QCD.S)
|
||||
SCREENDED("S"), @XmlEnumValue(QCD.Q)
|
||||
QUESTIONED("Q"), @XmlEnumValue(QCD.B)
|
||||
BAD("B"), @XmlEnumValue(QCD.C)
|
||||
COARSEPASS("C"), @XmlEnumValue(QCD.G)
|
||||
GOOD("G"), @XmlEnumValue(QCD.Z)
|
||||
MISSING("Z"), @XmlEnumValue(QCD.X)
|
||||
REJECTED("X");
|
||||
|
||||
private static final String V = "V";
|
||||
|
||||
private static final String S = "S";
|
||||
|
||||
|
||||
private static final String Q = "Q";
|
||||
|
||||
|
||||
private static final String C = "C";
|
||||
|
||||
|
||||
private static final String B = "B";
|
||||
|
||||
|
||||
private static final String G = "G";
|
||||
|
||||
|
||||
private static final String Z = "Z";
|
||||
|
||||
|
||||
private static final String X = "X";
|
||||
|
||||
private static final Map<String,QCD> qcdMap;
|
||||
|
||||
|
||||
private static final Map<String, QCD> qcdMap;
|
||||
|
||||
private static final Map<String, QCD> valMap;
|
||||
|
||||
|
||||
static {
|
||||
Map<String, QCD> map = new HashMap<String, QCD>();
|
||||
map.put(V, QCD.VERIFIED);
|
||||
|
@ -596,7 +619,7 @@ public class MadisRecord extends PersistablePluginDataObject implements
|
|||
map.put(Z, QCD.MISSING);
|
||||
map.put(X, QCD.REJECTED);
|
||||
qcdMap = Collections.unmodifiableMap(map);
|
||||
|
||||
|
||||
Map<String, QCD> map2 = new HashMap<String, QCD>();
|
||||
map2.put(QCD.VERIFIED.name(), QCD.VERIFIED);
|
||||
map2.put(QCD.SCREENDED.name(), QCD.SCREENDED);
|
||||
|
@ -623,11 +646,11 @@ public class MadisRecord extends PersistablePluginDataObject implements
|
|||
public static QCD fromString(String val) {
|
||||
return qcdMap.get(val);
|
||||
}
|
||||
|
||||
|
||||
public static QCD fromVal(String val) {
|
||||
return valMap.get(val);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public String getProvider() {
|
||||
|
@ -789,7 +812,7 @@ public class MadisRecord extends PersistablePluginDataObject implements
|
|||
public void setPrecipitalWater_qcd(QCD precipitalWater_qcd) {
|
||||
this.precipitalWater_qcd = precipitalWater_qcd;
|
||||
}
|
||||
|
||||
|
||||
public float getPressure() {
|
||||
return pressure;
|
||||
}
|
||||
|
@ -949,7 +972,7 @@ public class MadisRecord extends PersistablePluginDataObject implements
|
|||
public void setPrecipitalWater_qcr(int precipitalWater_qcr) {
|
||||
this.precipitalWater_qcr = precipitalWater_qcr;
|
||||
}
|
||||
|
||||
|
||||
public int getPressure_qca() {
|
||||
return pressure_qca;
|
||||
}
|
||||
|
@ -986,7 +1009,7 @@ public class MadisRecord extends PersistablePluginDataObject implements
|
|||
public void setLocation(SurfaceObsLocation location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the geometry latitude.
|
||||
*
|
||||
|
@ -1085,7 +1108,7 @@ public class MadisRecord extends PersistablePluginDataObject implements
|
|||
public QCD getElevation_qcd() {
|
||||
return elevation_qcd;
|
||||
}
|
||||
|
||||
|
||||
public void setDataset(int dataset) {
|
||||
this.dataset = dataset;
|
||||
}
|
||||
|
@ -1101,7 +1124,7 @@ public class MadisRecord extends PersistablePluginDataObject implements
|
|||
public int getRestriction() {
|
||||
return restriction;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the station identifier for this observation.
|
||||
*
|
||||
|
@ -1110,7 +1133,7 @@ public class MadisRecord extends PersistablePluginDataObject implements
|
|||
public String getStationId() {
|
||||
return location.getStationId();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
|
@ -1119,7 +1142,7 @@ public class MadisRecord extends PersistablePluginDataObject implements
|
|||
+ ((getDataURI() == null) ? 0 : getDataURI().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
|
@ -1141,5 +1164,4 @@ public class MadisRecord extends PersistablePluginDataObject implements
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue