12.5.1-6 baseline
Former-commit-id:24474489f9
[formerly24474489f9
[formerly a75af2f0de38d65dcbbd919e159c3b0a268fc245]] Former-commit-id:fa87dc6cf1
Former-commit-id:c452cce633
This commit is contained in:
parent
377ae76413
commit
2738af2019
428 changed files with 11684 additions and 10837 deletions
|
@ -5,6 +5,7 @@
|
|||
<available file="../../../../../build.edex"
|
||||
property="build.dir.location"
|
||||
value="../../../../../build.edex"/>
|
||||
<available file="../build.edex" property="build.dir.location" value="../build.edex"/>
|
||||
|
||||
<import file="${build.dir.location}/basebuilds/component_deploy_base.xml" />
|
||||
</project>
|
|
@ -32,6 +32,20 @@ import com.raytheon.rcm.message.GSM;
|
|||
import com.raytheon.rcm.request.Request;
|
||||
import com.raytheon.rcm.request.RpsList;
|
||||
|
||||
/**
|
||||
* Utility class for dealing with AWIPS 1 RPS lists.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2009 dfriedma Initial version
|
||||
* 2012-04-30 DR 14908 D. Friedman Require radar name for valid RPS
|
||||
* file names.
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
public class Awips1RpsListUtil {
|
||||
// is 'maint' an opMode??
|
||||
public static class Selector {
|
||||
|
@ -187,7 +201,7 @@ public class Awips1RpsListUtil {
|
|||
}
|
||||
|
||||
protected static final Pattern selectorPattern = Pattern
|
||||
.compile("^(?:(.+)\\.)?(.+)\\.VCP(\\d+)(?:\\.(.*))?$");
|
||||
.compile("^(.+)\\.(.+)\\.VCP(\\d+)(?:\\.(.*))?$");
|
||||
|
||||
protected static final Pattern maintPattern = Pattern
|
||||
.compile("^([^\\.]+)\\.maint(?:\\.(.*))?$");
|
||||
|
@ -197,9 +211,7 @@ public class Awips1RpsListUtil {
|
|||
if (m.matches()) {
|
||||
Selector sel = new Selector();
|
||||
|
||||
if (m.group(1) != null) {
|
||||
sel.radar = m.group(1).toLowerCase();
|
||||
}
|
||||
sel.radar = m.group(1).toLowerCase();
|
||||
|
||||
String opModeString = m.group(2).toLowerCase();
|
||||
if (opModeString.equals("clear-air"))
|
||||
|
|
|
@ -48,6 +48,15 @@ import com.raytheon.rcm.server.Log;
|
|||
* com.raytheon.rcm.config.awips1.FXA_LOCAL_SITE property.
|
||||
*
|
||||
* Note: Does not recognize the FILE_SERVER_DEFAULT_PATHS environment variable.
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 2009 dfriedma Initial version
|
||||
* 2012-04-30 DR 14904 D. Friedman Add backup links to dial ORPGs.
|
||||
* </pre>
|
||||
*/
|
||||
public class Awips1ConfigProvider implements ConfigurationProvider {
|
||||
|
||||
|
@ -410,10 +419,8 @@ public class Awips1ConfigProvider implements ConfigurationProvider {
|
|||
String radarName = ls.next().toLowerCase();
|
||||
int nexradId = ls.nextInt();
|
||||
|
||||
RadarConfig rc = radars.get(radarName.toLowerCase()); //config.getConfigForRadar(radarName);
|
||||
// so only getting entries for current purpose .. does not
|
||||
// allow easy switching
|
||||
if (rc == null || rc.isDedicated() != dedicated)
|
||||
RadarConfig rc = radars.get(radarName.toLowerCase());
|
||||
if (rc == null)
|
||||
continue;
|
||||
if (nexradId != rc.getNexradID()) {
|
||||
// warn...
|
||||
|
@ -428,8 +435,6 @@ public class Awips1ConfigProvider implements ConfigurationProvider {
|
|||
lr.setLinkIndex(ls.nextInt());
|
||||
lr.setTcmPassword(ls.next());
|
||||
lr.setDedicated(dedicated);
|
||||
// TODO: do something with max rps size?
|
||||
// lr.setBackup(backup);
|
||||
|
||||
if (dedicated) {
|
||||
lr.setMaxRpsListSize(ls.nextInt());
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<default-memory-setting>
|
||||
<default-max-memory>
|
||||
<jvm-arg>Xmx</jvm-arg>
|
||||
<value>1024M</value>
|
||||
<value>1280M</value>
|
||||
</default-max-memory>
|
||||
|
||||
<default-max-perm>
|
||||
|
|
|
@ -270,10 +270,6 @@
|
|||
<param name="feature"
|
||||
value="com.raytheon.uf.viz.thinclient.feature" />
|
||||
</antcall>
|
||||
<antcall target="p2.build.repo">
|
||||
<param name="feature"
|
||||
value="com.raytheon.uf.viz.npp.feature" />
|
||||
</antcall>
|
||||
|
||||
<antcall target="cleanup.features" />
|
||||
</target>
|
||||
|
|
|
@ -400,9 +400,9 @@ class _NetCDFFile:
|
|||
# v = self._fh.variables['refTime']
|
||||
# itime = int(v[records[0]])
|
||||
|
||||
import PointDataRetrieve
|
||||
import ForecastPointDataRetrieve
|
||||
self.Model = 'ETA'
|
||||
pdc = PointDataRetrieve.retrieve('modelsounding', ident, PARAMETERS, refTime=refTime, constraint={'reportType':self.Model})
|
||||
pdc = ForecastPointDataRetrieve.retrieve('modelsounding', ident, PARAMETERS, refTime=refTime, constraint={'reportType':self.Model})
|
||||
self.NumData = min(self.MaxData, len(pdc.keys()))
|
||||
keys = pdc.keys()
|
||||
keys.sort()
|
||||
|
|
|
@ -698,7 +698,7 @@ class Server(object):
|
|||
"""
|
||||
Process the newly arrived profiler data
|
||||
"""
|
||||
import PointDataRetrieve, NoDataException
|
||||
import RefTimePointDataRetrieve, NoDataException
|
||||
PARAMETERS = ["profilerId", "validTime", "numProfLvls", "height",
|
||||
"uComponent", "vComponent", "uvQualityCode"]
|
||||
site = AvnParser.getTafSiteCfg(ident)
|
||||
|
@ -706,9 +706,9 @@ class Server(object):
|
|||
if len(profilerList) > 0:
|
||||
for profilerName in profilerList:
|
||||
try :
|
||||
pdc = PointDataRetrieve.retrieve('profiler', None, PARAMETERS,
|
||||
pdc = RefTimePointDataRetrieve.retrieve('profiler', None, PARAMETERS,
|
||||
keyId='validTime', constraint={'profilerId':profilerName},
|
||||
forecast=False, maxSize=1)
|
||||
maxSize=1)
|
||||
except NoDataException.NoDataException:
|
||||
_Logger.info("Error reading profiler " + profilerName)
|
||||
profilerList.remove(profilerName)
|
||||
|
|
|
@ -19,8 +19,9 @@
|
|||
##
|
||||
|
||||
import Avn, MetarDecoder
|
||||
import PointDataRetrieve
|
||||
import NoDataException
|
||||
import HoursRefTimePointDataRetrieve
|
||||
|
||||
|
||||
#
|
||||
# Retrieves metar data through pointdata interfaces
|
||||
|
@ -31,6 +32,7 @@ import NoDataException
|
|||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 08/26/09 njensen Initial Creation.
|
||||
# 26APR2012 14688 rferrel Use HoursRefTimePointDataRetrieve.
|
||||
#
|
||||
#
|
||||
#
|
||||
|
@ -41,7 +43,7 @@ def retrieve(siteID, size=1):
|
|||
if type(siteID) is str:
|
||||
siteID = [siteID]
|
||||
try :
|
||||
pdc = PointDataRetrieve.retrieve('obs', siteID[0], PARAMETERS, keyId='timeObs', maxSize=size, forecast=False)
|
||||
pdc = HoursRefTimePointDataRetrieve.retrieve('obs', siteID[0], PARAMETERS, keyId='timeObs', maxSize=size)
|
||||
except NoDataException.NoDataException:
|
||||
raise NoDataException.NoDataException('No METAR data available for site %s' % siteID[0])
|
||||
decoder = MetarDecoder.Decoder()
|
||||
|
|
|
@ -624,9 +624,9 @@ class _NetCDFFile:
|
|||
# if recno is None:
|
||||
# return None
|
||||
|
||||
import PointDataRetrieve
|
||||
import ForecastPointDataRetrieve
|
||||
# print 'makeData: ident (%s), selfModel(%s) refTime(%s):' % (ident, self.Model, refTime)
|
||||
pdc = PointDataRetrieve.retrieve('bufrmos' + self.Model, ident, PARAMETERS, refTime=refTime)
|
||||
pdc = ForecastPointDataRetrieve.retrieve('bufrmos' + self.Model, ident, PARAMETERS, refTime=refTime)
|
||||
self.NumData = min(self.NumData, len(pdc.keys()))
|
||||
self.issuetime = pdc.refTime.getTime() / 1000
|
||||
fcstHrList = pdc.keys()
|
||||
|
@ -655,8 +655,8 @@ class _NetCDFFile:
|
|||
return result
|
||||
|
||||
def makeReport(self, ident):
|
||||
import PointDataRetrieve
|
||||
pdc = PointDataRetrieve.retrieve('bufrmos' + self.Model, ident, PARAMETERS)
|
||||
import ForecastPointDataRetrieve
|
||||
pdc = ForecastPointDataRetrieve.retrieve('bufrmos' + self.Model, ident, PARAMETERS)
|
||||
self.NumData = min(self.NumData, len(pdc.keys()))
|
||||
self.issuetime = pdc.refTime.getTime() / 1000
|
||||
fcstHrList = pdc.keys()
|
||||
|
@ -1064,8 +1064,8 @@ class _GfsLampNetCDFFile(_NetCDFFile):
|
|||
return g
|
||||
|
||||
def makeReport(self, ident):
|
||||
import PointDataRetrieve
|
||||
pdc = PointDataRetrieve.retrieve('bufrmos' + self.Model, ident, PARAMETERS)
|
||||
import ForecastPointDataRetrieve
|
||||
pdc = ForecastPointDataRetrieve.retrieve('bufrmos' + self.Model, ident, PARAMETERS)
|
||||
self.NumData = min(self.NumData, len(pdc.keys()))
|
||||
self.issuetime = pdc.refTime.getTime() / 1000
|
||||
fcstHrList = pdc.keys()
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
import logging
|
||||
import Avn
|
||||
import PointDataRetrieve, NoDataException
|
||||
import ForecastPointDataRetrieve, NoDataException
|
||||
|
||||
#
|
||||
# Retrieves mos lightning data through pointdata interfaces
|
||||
|
@ -31,6 +31,7 @@ import PointDataRetrieve, NoDataException
|
|||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 09/15/09 njensen Initial Creation.
|
||||
# 26APR2012 14688 rferrel Use ForecastPointDataRetrieve.
|
||||
#
|
||||
#
|
||||
#
|
||||
|
@ -43,7 +44,7 @@ _Logger = logging.getLogger(Avn.CATEGORY)
|
|||
|
||||
def retrieve(siteID):
|
||||
try:
|
||||
pdc = PointDataRetrieve.retrieve('bufrmosLAMP', siteID, PARAMETERS)
|
||||
pdc = ForecastPointDataRetrieve.retrieve('bufrmosLAMP', siteID, PARAMETERS)
|
||||
except NoDataException.NoDataException:
|
||||
return None
|
||||
pots = []
|
||||
|
|
|
@ -1,231 +0,0 @@
|
|||
<!-- ====================
|
||||
This is a colormap file that is read via JaXB to marshel the ColorMap class.
|
||||
======================-->
|
||||
<colorMap>
|
||||
<color r="0.0" g="0.0" b="0.0" a="0.0"/>
|
||||
<!-- 0.0 -->
|
||||
<color r="0.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="0.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<!-- 0.1 -->
|
||||
<color r="0.0" g="0.7490196" b="1.0" a="1.0"/>
|
||||
<color r="0.0" g="0.7490196" b="1.0" a="1.0"/>
|
||||
<color r="0.0" g="0.7490196" b="1.0" a="1.0"/>
|
||||
<!-- 0.2 -->
|
||||
<color r="0.0" g="0.0" b="1.0" a="1.0"/>
|
||||
<color r="0.0" g="0.0" b="1.0" a="1.0"/>
|
||||
<color r="0.0" g="0.0" b="1.0" a="1.0"/>
|
||||
<color r="0.0" g="0.0" b="1.0" a="1.0"/>
|
||||
<color r="0.0" g="0.0" b="1.0" a="1.0"/>
|
||||
<color r="0.0" g="0.0" b="1.0" a="1.0"/>
|
||||
<!-- 0.4 -->
|
||||
<color r="0.0" g="1.0" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="1.0" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="1.0" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="1.0" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="1.0" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="1.0" b="0.0" a="1.0"/>
|
||||
<!-- 0.6 -->
|
||||
<color r="0.0" g="0.79215687" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="0.79215687" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="0.79215687" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="0.79215687" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="0.79215687" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="0.79215687" b="0.0" a="1.0"/>
|
||||
<!-- 0.8 -->
|
||||
<color r="0.0" g="0.39215687" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="0.39215687" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="0.39215687" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="0.39215687" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="0.39215687" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="0.39215687" b="0.0" a="1.0"/>
|
||||
<!-- 1.0 -->
|
||||
<color r="1.0" g="1.0" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="0.0" a="1.0"/>
|
||||
<!-- 1.25 -->
|
||||
<color r="1.0" g="0.64705884" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.64705884" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.64705884" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.64705884" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.64705884" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.64705884" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.64705884" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.64705884" b="0.0" a="1.0"/>
|
||||
<!-- 1.5 -->
|
||||
<color r="1.0" g="0.54901963" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.54901963" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.54901963" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.54901963" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.54901963" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.54901963" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.54901963" b="0.0" a="1.0"/>
|
||||
<!-- 1.75 -->
|
||||
<color r="1.0" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="1.0" g="0.0" b="0.0" a="1.0"/>
|
||||
<!-- 2.0 -->
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<color r="0.69803923" g="0.13333334" b="0.13333334" a="1.0"/>
|
||||
<!-- 3.0 -->
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.64705884" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<!-- 4.0 -->
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<color r="1.0" g="0.078431375" b="0.5764706" a="1.0"/>
|
||||
<!-- 5.0 -->
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<color r="0.5176471" g="0.4392157" b="1.0" a="1.0"/>
|
||||
<!-- 6.0 -->
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
</colorMap>
|
|
@ -93,7 +93,7 @@
|
|||
</TableColumn>
|
||||
<TableColumn>
|
||||
<ColumnName>GUID</ColumnName>
|
||||
<ReverseFilter>false</ReverseFilter>
|
||||
<ReverseFilter>true</ReverseFilter>
|
||||
<Filter>6.0</Filter>
|
||||
<Low>1.0</Low>
|
||||
<Mid>3.0</Mid>
|
||||
|
|
|
@ -1600,6 +1600,9 @@ Scripts = [
|
|||
"Send Grids to NDFD..:" +
|
||||
"sendGridsToNDFD.sh {site} &",
|
||||
|
||||
"Send Point and Click Grids to Consolidated Web Farm..:" +
|
||||
"/awips2/GFESuite/bin/rsyncGridsToCWF_client.sh {site} &",
|
||||
|
||||
"Png Images...:" +
|
||||
"ifpIMAGE " +\
|
||||
"-h {host} -c {entry:ConfigFile:imageTest1} -o {prddir}/IMAGE",
|
||||
|
|
|
@ -169,7 +169,8 @@ def buildWidgetList(pythonWidgetList):
|
|||
|
||||
for widget in pythonWidgetList:
|
||||
|
||||
res = None
|
||||
res = 1.0 # Default resolution
|
||||
prec = 3 # Default precision
|
||||
valueList = []
|
||||
|
||||
# unpack the tuple
|
||||
|
@ -179,22 +180,17 @@ def buildWidgetList(pythonWidgetList):
|
|||
name,defaultValue,entType,valueList = widget
|
||||
if len(widget) == 5:
|
||||
name,defaultValue,entType,valueList,res = widget
|
||||
|
||||
if len(widget) == 6:
|
||||
name,defaultValue,entType,valueList,res,prec = widget
|
||||
# Handle possibility of (label, variable) tuple
|
||||
if type(name) is types.TupleType:
|
||||
desc = name[0]
|
||||
else:
|
||||
desc = name
|
||||
|
||||
w = FieldDefinition()
|
||||
w.setName(JUtil.pyValToJavaObj(name))
|
||||
w.setDescription(desc)
|
||||
w.setType(FieldType.convertPythonType(entType))
|
||||
w.setDefaultValue(JUtil.pyValToJavaObj(defaultValue))
|
||||
w.setValueList(JUtil.pyValToJavaObj(valueList))
|
||||
if res is not None:
|
||||
w.setResolution(float(res))
|
||||
|
||||
w = FieldDefinition(JUtil.pyValToJavaObj(name),desc,FieldType.convertPythonType(entType),
|
||||
JUtil.pyValToJavaObj(defaultValue),JUtil.pyValToJavaObj(valueList),
|
||||
float(res),int(prec))
|
||||
widgetList.add(w)
|
||||
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ import loadConfig
|
|||
from operator import attrgetter
|
||||
from com.raytheon.uf.common.time import DataTime
|
||||
from com.raytheon.uf.viz.core import RGBColors
|
||||
from com.raytheon.viz.gfe.core.parm import ParmDisplayAttributes_VisMode as VisMode
|
||||
|
||||
class PngWriter:
|
||||
def __init__(self, conf="testIFPImage", userName="", baseTime=None,
|
||||
|
@ -47,6 +48,7 @@ class PngWriter:
|
|||
self.pgons = None
|
||||
self.imgParm = None
|
||||
self.ipn = self.getConfig('Png_image', '')
|
||||
print "ipn:",self.ipn
|
||||
|
||||
# user named time range specified?
|
||||
if usrTimeRange is not None:
|
||||
|
@ -79,51 +81,11 @@ class PngWriter:
|
|||
rval.append(tparm)
|
||||
return rval
|
||||
|
||||
def getVisuals(self, parms, time):
|
||||
rval = []
|
||||
for p in parms:
|
||||
image = AFPS.ParmDspAttr.GRAPHIC
|
||||
if p.parmID().compositeNameUI() == self.ipn:
|
||||
image = AFPS.ParmDspAttr.IMAGE
|
||||
self.imgParm = p
|
||||
for vt in p.dspAttr().visualizationType(
|
||||
AFPS.ParmDspAttr.SPATIAL, image):
|
||||
v = self._createVisual(vt, p, time)
|
||||
if v is not None:
|
||||
rval.append(v)
|
||||
|
||||
return rval
|
||||
|
||||
def adjustAspect(self, width, height, wd):
|
||||
# Calculate the correct aspect ratio and adjust the width
|
||||
# and height to fit.
|
||||
if width is None and height is None:
|
||||
width = 400 # The default
|
||||
|
||||
if width is not None:
|
||||
height = int((float(width) * wd.extent().y) / wd.extent().x)
|
||||
else:
|
||||
width = int((float(height) * wd.extent().x) / wd.extent().y)
|
||||
return width, height
|
||||
|
||||
def getBG(self):
|
||||
bgColor = self.getConfig('bgColor', "black")
|
||||
trans = self.getConfig('Png_transBG', 0, int)
|
||||
return bgColor, trans
|
||||
|
||||
def paintBorder(self, i1):
|
||||
width, height = i1.size()
|
||||
# paint a border
|
||||
self.white = i1.colorAllocate((255, 255, 255))
|
||||
black = i1.colorAllocate((70, 70, 70))
|
||||
white = i1.colorAllocate((220, 220, 220))
|
||||
i1.rectangle((0, 0), (width - 1, height - 1), black)
|
||||
i1.rectangle((1, 1), (width - 2, height - 2), black)
|
||||
i1.line((0, 0), (width - 1, 0), white)
|
||||
i1.line((1, 1), (width - 2, 1), white)
|
||||
i1.line((0, 0), (0, height - 1), white)
|
||||
i1.line((1, 1), (1, height - 2), white)
|
||||
|
||||
def getFileName(self, dir, setime):
|
||||
# calculate output filename, baseTime is AbsTime
|
||||
baseTimeFormat = self.getConfig('Png_baseTimeFormat', "%Y%m%d_%H%M")
|
||||
|
@ -137,97 +99,10 @@ class PngWriter:
|
|||
fname = dir + "/" + prefix + timeString
|
||||
return fname
|
||||
|
||||
def writePng(self, dir, setime, visualInfo, i1):
|
||||
fname = self.getFileName(dir, setime) + '.png'
|
||||
if len(visualInfo) > 0:
|
||||
i1.writePng(fname)
|
||||
cbv = None
|
||||
|
||||
def getFileType(self):
|
||||
ext = self.getConfig('Png_fileType', 'png')
|
||||
return ext
|
||||
|
||||
def paintVisuals(self, visuals, setime, dir, wd, maskBasedOnHistory,
|
||||
width=None, height=None):
|
||||
fexten, ftype = self.getFileType()
|
||||
omitColorBar = self.getConfig('Png_omitColorBar', 0, int)
|
||||
width, height = self.adjustAspect(width, height, wd)
|
||||
if self.imgParm is not None and not omitColorBar:
|
||||
height += 25 # for colorbar
|
||||
sd = AFPS.CD2Dint(AFPS.CC2Dint(0, 0), AFPS.CC2Dint(width, height))
|
||||
cbv = Graphics.SEColorBarVisual(self.dbss.msgHandler(),
|
||||
AFPS.GridID_default(), 0)
|
||||
mapping = Graphics.Mapping_spatial(sd, wd)
|
||||
bgColor, trans = self.getBG()
|
||||
fname = self.getFileName(dir, setime) + '.' + fexten
|
||||
LogStream.logEvent("painting:", setime, "fname:", fname)
|
||||
canvas = Graphics.FileCanvas_newCanvas(mapping, fname,
|
||||
ftype, bgColor, trans)
|
||||
canvas.reg(visuals)
|
||||
|
||||
refMgr = self.dbss.dataManager().referenceSetMgr()
|
||||
visualInfo = []
|
||||
for v in visuals:
|
||||
if hasattr(v, "parm"):
|
||||
parm = v.parm()
|
||||
|
||||
gridid = AFPS.GridID(parm, setime)
|
||||
griddata = gridid.grid()
|
||||
if griddata is None:
|
||||
continue
|
||||
|
||||
# set up attributes for painting
|
||||
AFPS.SETimeChangedMsg_send_mh(self.dbss.msgHandler(), setime)
|
||||
AFPS.GridVisibilityChangedMsg_send_mh(self.dbss.msgHandler(),
|
||||
gridid, 1, 0)
|
||||
if self.imgParm is not None and self.imgParm == v.parm():
|
||||
AFPS.DisplayTypeChangedMsg_send_mh(self.dbss.msgHandler(),
|
||||
AFPS.ParmDspAttr.SPATIAL, gridid,
|
||||
AFPS.ParmDspAttr.IMAGE)
|
||||
if v.visualType().type() == AFPS.VisualType.IMAGE:
|
||||
info = (parm.parmID(), griddata.gridTime().startTime(),
|
||||
griddata.gridTime().endTime(),
|
||||
'NoColor', 1)
|
||||
else:
|
||||
info = (parm.parmID(), griddata.gridTime().startTime(),
|
||||
griddata.gridTime().endTime(),
|
||||
parm.dspAttr().baseColor(), 0)
|
||||
|
||||
# fit to data special cases
|
||||
if v.visualType().type() == AFPS.VisualType.IMAGE:
|
||||
alg = self.getConfig(parm.parmID().compositeNameUI()
|
||||
+ '_fitToDataColorTable', None)
|
||||
if alg is not None:
|
||||
if alg == 'Single Grid over Area':
|
||||
ct = parm.dspAttr().colorTable()
|
||||
refarea = refMgr.activeRefSet()
|
||||
ct.fitToData_gridarea(gridid, refarea)
|
||||
elif alg == 'Single Grid':
|
||||
ct = parm.dspAttr().colorTable()
|
||||
ct.fitToData_grid(gridid)
|
||||
|
||||
visualInfo.append(info)
|
||||
|
||||
|
||||
# special masking based on Grid Data History
|
||||
if maskBasedOnHistory:
|
||||
parm = v.parm()
|
||||
bits = refMgr.siteGridpoints(griddata.historySites(), 1)
|
||||
parm.dspAttr().setDisplayMask_grid2dbit(bits)
|
||||
|
||||
canvas.paint(mapping.domain(), 1)
|
||||
canvas.unreg(visuals)
|
||||
self.writeInfo(dir, setime, visualInfo)
|
||||
if ftype != Graphics.FileCanvas.PNG:
|
||||
canvas.close()
|
||||
else:
|
||||
i1 = canvas.getImage()
|
||||
if not omitColorBar:
|
||||
self.paintColorBar(width, bgColor, trans, setime, cbv, i1)
|
||||
newI = self.paintLogo(i1)
|
||||
self.paintBorder(newI)
|
||||
self.writePng(dir, setime, visualInfo, newI)
|
||||
|
||||
def writeInfo(self, dir, setime, visualInfo):
|
||||
if len(visualInfo) > 0:
|
||||
fname = self.getFileName(dir, setime) + ".info"
|
||||
|
@ -339,8 +214,8 @@ class PngWriter:
|
|||
#mmgr = self.dm.mapMgr()
|
||||
mv = []
|
||||
mids = []
|
||||
height = self.getConfig('Png_height', 400.0, float)
|
||||
width = self.getConfig('Png_width', 400.0, float)
|
||||
height = self.getConfig('Png_height', None, int)
|
||||
width = self.getConfig('Png_width', None, int)
|
||||
localFlag = self.getConfig('Png_localTime', 0, int)
|
||||
snapshotTime = self.getConfig('Png_snapshotTime', 0, int)
|
||||
useLegend = self.getConfig('Png_legend', 1, int)
|
||||
|
@ -419,13 +294,18 @@ class PngWriter:
|
|||
overrideColors = {}
|
||||
for p in prms:
|
||||
pname = p.getParmID().compositeNameUI()
|
||||
if pname == self.ipn:
|
||||
overrideColors[pname] = "White"
|
||||
|
||||
color = self.getConfig(pname + "_Legend_color", None)
|
||||
if color:
|
||||
overrideColors[pname] = color
|
||||
lang = self.getConfig('Png_legendLanguage', '');
|
||||
viz.setupLegend(localTime, snapshotTime, snapshotFmt, descName, durFmt, startFmt, endFmt, overrideColors, lang)
|
||||
|
||||
bgColor = self.getConfig('bgColor', None)
|
||||
#TODO handle transparent background
|
||||
bgColor, trans = self.getBG()
|
||||
|
||||
if not omitColorbar:
|
||||
viz.enableColorbar()
|
||||
|
||||
|
@ -444,28 +324,30 @@ class PngWriter:
|
|||
fitToDataAlg = None
|
||||
for p in prms:
|
||||
pname = p.getParmID().compositeNameUI()
|
||||
if pname == self.ipn:
|
||||
colormap = self.getConfig(pname + '_defaultColorTable', None)
|
||||
colorMax = self.getConfig(pname + '_maxColorTableValue', None, float)
|
||||
colorMin = self.getConfig(pname + '_minColorTableValue', None, float)
|
||||
viz.addImageResource(pname, colormap=colormap, colorMin=colorMin, colorMax=colorMax, smooth=smooth)
|
||||
fitToDataAlg = self.getConfig(pname + '_fitToDataColorTable', None)
|
||||
if fitToDataAlg is not None:
|
||||
from com.raytheon.viz.gfe.rsc.colorbar import FitToData
|
||||
fit = FitToData(self.dm, p)
|
||||
if fitToDataAlg == 'All Grids':
|
||||
fit.fitToData()
|
||||
fitToDataAlg = None
|
||||
elif fitToDataAlg == 'All Grids over Area':
|
||||
fit.fitToData(self.dm.getRefManager().getActiveRefSet())
|
||||
fitToDataAlg = None
|
||||
colormap = self.getConfig(pname + '_defaultColorTable', None)
|
||||
colorMax = self.getConfig(pname + '_maxColorTableValue', None, float)
|
||||
colorMin = self.getConfig(pname + '_minColorTableValue', None, float)
|
||||
color = self.getConfig(pname + '_graphicColor', None)
|
||||
lineWidth = self.getConfig(pname + '_lineWidth', None, int)
|
||||
viz.addGfeResource(pname, colormap=colormap, colorMin=colorMin, colorMax=colorMax, \
|
||||
smooth=smooth, color=color, lineWidth=lineWidth)
|
||||
fitToDataAlg = self.getConfig(pname + '_fitToDataColorTable', None)
|
||||
if fitToDataAlg is not None:
|
||||
from com.raytheon.viz.gfe.rsc.colorbar import FitToData
|
||||
fit = FitToData(self.dm, p)
|
||||
if fitToDataAlg == 'All Grids':
|
||||
fit.fitToData()
|
||||
fitToDataAlg = None
|
||||
elif fitToDataAlg == 'All Grids over Area':
|
||||
fit.fitToData(self.dm.getRefManager().getActiveRefSet())
|
||||
fitToDataAlg = None
|
||||
|
||||
if pname == self.ipn:
|
||||
print "setting",pname,"to IMAGE"
|
||||
p.getDisplayAttributes().setVisMode(VisMode.IMAGE)
|
||||
else:
|
||||
graphicParms.append(pname)
|
||||
for gp in graphicParms:
|
||||
color = self.getConfig(gp + '_graphicColor', None)
|
||||
lineWidth = self.getConfig(gp + '_lineWidth', None, int)
|
||||
viz.addGraphicResource(gp, color=color, lineWidth=lineWidth)
|
||||
print "setting",pname,"to GRAPHIC"
|
||||
p.getDisplayAttributes().setVisMode(VisMode.GRAPHIC)
|
||||
|
||||
self.initSamples()
|
||||
|
||||
|
@ -477,24 +359,33 @@ class PngWriter:
|
|||
paintTime = t
|
||||
if paintTime and self.overlapsWithGrids(prms, paintTime):
|
||||
self.dm.getSpatialDisplayManager().setSpatialEditorTime(paintTime.javaDate())
|
||||
if fitToDataAlg:
|
||||
from com.raytheon.viz.gfe.edittool import GridID
|
||||
gridid = GridID(self.dm.getSpatialDisplayManager().getActivatedParm(), )
|
||||
if fitToDataAlg == 'Single Grid':
|
||||
fit.fitToData(gridid)
|
||||
elif fitToDataAlg == 'Single Grid over Area':
|
||||
fit.fitToData(gridid, self.dm.getRefManager().getActiveRefSet())
|
||||
viz.paint(paintTime, backgroundColor=bgColor)
|
||||
fname = self.getFileName(dir, t) + '.' + fexten
|
||||
viz.outputFiles(fname, showLogo, logoString)
|
||||
visualInfo = []
|
||||
for p in prms:
|
||||
griddata = p.overlappingGrid(paintTime.javaDate())
|
||||
if griddata is not None:
|
||||
info = (p.getParmID().toString(), AbsTime.AbsTime(griddata.getGridTime().getStart()),
|
||||
AbsTime.AbsTime(griddata.getGridTime().getEnd()),
|
||||
RGBColors.getColorName(p.getDisplayAttributes().getBaseColor()), p.getDisplayAttributes().getVisMode().toString() == 'Image')
|
||||
visualInfo.append(info)
|
||||
if griddata is None:
|
||||
continue
|
||||
|
||||
# fit to data special cases
|
||||
if p.getDisplayAttributes().getVisMode().toString() == 'Image':
|
||||
fitToDataAlg = self.getConfig(p.getParmID().compositeNameUI() + '_fitToDataColorTable', None)
|
||||
if fitToDataAlg:
|
||||
from com.raytheon.viz.gfe.rsc.colorbar import FitToData
|
||||
fit = FitToData(self.dm, p)
|
||||
from com.raytheon.viz.gfe.edittool import GridID
|
||||
gridid = GridID(p, paintTime.javaDate())
|
||||
if fitToDataAlg == 'Single Grid':
|
||||
fit.fitToData(gridid)
|
||||
elif fitToDataAlg == 'Single Grid over Area':
|
||||
fit.fitToData(gridid, self.dm.getRefManager().getActiveRefSet())
|
||||
|
||||
info = (p.getParmID().toString(), AbsTime.AbsTime(griddata.getGridTime().getStart()),
|
||||
AbsTime.AbsTime(griddata.getGridTime().getEnd()),
|
||||
RGBColors.getColorName(p.getDisplayAttributes().getBaseColor()), p.getDisplayAttributes().getVisMode().toString() == 'Image')
|
||||
visualInfo.append(info)
|
||||
|
||||
viz.paint(paintTime, backgroundColor=bgColor)
|
||||
fname = self.getFileName(dir, t) + '.' + fexten
|
||||
viz.outputFiles(fname, showLogo, logoString)
|
||||
self.writeInfo(dir, paintTime, visualInfo)
|
||||
else:
|
||||
LogStream.logEvent("No grids to generate for ", `t`)
|
||||
|
@ -521,43 +412,6 @@ class PngWriter:
|
|||
else:
|
||||
return 0
|
||||
|
||||
|
||||
def toscreen(self, point, wd, sd):
|
||||
x = int(((float(point.x) - wd.origin().x) * float(sd[0])) \
|
||||
/ wd.extent().x)
|
||||
y = int(((float(point.y) - wd.origin().y) * float(sd[1])) \
|
||||
/ float(wd.extent().y))
|
||||
return (x, sd[1] - y)
|
||||
|
||||
def toworld(self, point, wd, sd):
|
||||
x = (float(point[0]) * wd.extent().x) / float(sd[0])
|
||||
y = (float(point[1]) * wd.extent().y) / float(sd[1])
|
||||
return (wd.origin().x + x, wd.origin().y + y)
|
||||
|
||||
def _createVisual(self, vt, parm, gridTime):
|
||||
visType = vt.type()
|
||||
if visType == AFPS.VisualType.IMAGE:
|
||||
return Graphics.ImageVisual(parm, gridTime)
|
||||
elif visType == AFPS.VisualType.CONTOUR:
|
||||
return Graphics.ContourVisual(parm, gridTime)
|
||||
elif visType == AFPS.VisualType.WIND_BARB:
|
||||
size = self.getConfig('WindBarbDefaultSize', 60, int)
|
||||
size = self.getConfig(parm.parmID().compositeNameUI()
|
||||
+ '_windBarbDefaultSize', size, int)
|
||||
return Graphics.WindBarbGridVisual(parm, gridTime, size)
|
||||
elif visType == AFPS.VisualType.WIND_ARROW:
|
||||
size = self.getConfig('WindArrowDefaultSize', 60, int)
|
||||
size = self.getConfig(parm.parmID().compositeNameUI()
|
||||
+ '_windArrowDefaultSize', size, int)
|
||||
return Graphics.WindArrowGridVisual(parm, gridTime, size)
|
||||
elif visType == AFPS.VisualType.BOUNDED_AREA:
|
||||
return Graphics.BoundedAreaVisual(parm, gridTime)
|
||||
else:
|
||||
LogStream.logBug("PngWriter._createVisual() : ",
|
||||
"Unknown visual type : ", vt)
|
||||
return None
|
||||
|
||||
|
||||
def usage():
|
||||
msg = """
|
||||
usage: ifpIMAGE [-c config] [-u username] [-h host] [-p port] -o directory
|
||||
|
|
|
@ -5,6 +5,81 @@ 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 datetime
|
||||
|
||||
class LdadMesoPlotDelegate(PlotDelegate):
|
||||
def __init__(self):
|
||||
PlotDelegate.__init__(self)
|
||||
|
||||
def getSampleText(self, rec):
|
||||
s = rec.getString("stationId")
|
||||
s += ","
|
||||
s += str(datetime.datetime.utcfromtimestamp(rec.getLong("observationTime")/1000))
|
||||
s += ","
|
||||
s += getFloatAsString(rec, "temperature", "%.2f", 1.8, -459.67)
|
||||
s += ","
|
||||
s += getFloatAsString(rec, "dewpoint", "%.2f", 1.8, -459.67)
|
||||
s += ","
|
||||
s += getFloatAsString(rec, "relHumidity", "%.0f")
|
||||
s += ","
|
||||
s += getFloatAsString(rec, "wetBulbTemperature", "%.2f")
|
||||
s += ","
|
||||
s += getFloatAsString(rec, "windDir", "%.0f")
|
||||
s += ","
|
||||
s += getFloatAsString(rec, "windSpeed", "%.2f")
|
||||
s += ","
|
||||
s += getFloatAsString(rec, "windGust", "%.2f")
|
||||
s += ","
|
||||
s += getFloatAsString(rec, "pressure", "%.2f")
|
||||
s += ","
|
||||
s += getFloatAsString(rec, "stationPressure", "%.2f")
|
||||
s += ","
|
||||
s += getFloatAsString(rec, "altimeter", "%.2f")
|
||||
s += ","
|
||||
s += getFloatAsString(rec, "seaLevelPressure", "%.2f")
|
||||
s += ","
|
||||
s += getIntAsString(rec, "pressChangeChar", "%d")
|
||||
s += ","
|
||||
s += getFloatAsString(rec, "pressChange3Hour", "%.2f")
|
||||
s += ","
|
||||
s += getFloatAsString(rec, "precipAccum", "%.2f")
|
||||
s += ","
|
||||
s += getIntAsString(rec, "precipIntensity", "%d")
|
||||
s += ","
|
||||
s += getIntAsString(rec, "precipType", "%d")
|
||||
s += ","
|
||||
s += getFloatAsString(rec, "totalCloudCover", "%.2f")
|
||||
s += ","
|
||||
s += rec.getString("skyCover")
|
||||
s += ","
|
||||
s += getFloatAsString(rec, "skyLayerBase", "%.2f")
|
||||
s += ","
|
||||
s += getIntAsString(rec, "cloudBaseHeight", "%d")
|
||||
s += ","
|
||||
s += getFloatAsString(rec, "visibility", "%.2f")
|
||||
s += ","
|
||||
s += rec.getString("visibilityStatus")
|
||||
s += ","
|
||||
s += rec.getString("presWeather")
|
||||
return s
|
||||
|
||||
def getFloatAsString(rec, key, format, scale=1, offset=0):
|
||||
f = rec.getFloat(key)
|
||||
if f == -9999:
|
||||
return ""
|
||||
f = f*scale + offset
|
||||
return format % f
|
||||
|
||||
def getIntAsString(rec, key, format):
|
||||
f = rec.getInt(key)
|
||||
if f == -9999:
|
||||
return ""
|
||||
return format % f
|
||||
|
||||
plotDelegate = LdadMesoPlotDelegate()
|
||||
|
||||
</script>
|
||||
<style type="text/css">
|
||||
<![CDATA[
|
||||
@font-face { font-family: "WindSymbolFont";
|
||||
|
@ -57,15 +132,20 @@ xmlns:xlink="http://www.w3.org/1999/xlink" style="stroke: rgb(255,255,255);">
|
|||
</style>
|
||||
|
||||
<symbol overflow="visible" id="plotData" class="info">
|
||||
<text id="sampleParamsBasic" plotMode="sample" class="text" plotParam="stationId,observationTime" x="0" y="0"> </text>
|
||||
<text id="sampleParamsTemp" plotMode="sample" class="text" plotParam="temperature,dewpoint,relHumidity,wetBulbTemperature" x="0" y="0"> </text>
|
||||
<text id="sampleParamsWind" plotMode="sample" class="text" plotParam="windDir,windSpeed,windGust" x="0" y="0"> </text>
|
||||
<text id="sampleParamsPress" plotMode="sample" class="text" plotParam="pressure,stationPressure,altimeter,seaLevelPressure,pressChangeChar,pressChange3Hour" x="0" y="0"> </text>
|
||||
<text id="sampleParamsPrecip" plotMode="sample" class="text" plotParam="precipAccum,precipIntensity,precipType" x="0" y="0"> </text>
|
||||
<text id="sampleParamsOther" plotMode="sample" class="text" plotParam="totalCloudCover,skyCover,skyLayerBase,cloudBaseHeight,visibility,visibilityStatus,presWeather" x="0" y="0"> </text>
|
||||
<g id="windVaneText" plotMode="barb" plotParam="windSpeed,windDir,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="windVaneText" class="arrow" x="0" y="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>
|
||||
<text id="windGustText" class="text" x="0" y="32" style="text-anchor: middle"> </text>
|
||||
</g>
|
||||
<text id="tempText" plotMode="text" plotParam="temperature" plotUnit="°F" plotFormat="%3.0f" style="text-anchor: end;" x="-10px" y="-10px">75</text>
|
||||
<text id="dewText" plotMode="text" plotParam="DpT" plotUnit="°F" plotFormat="%3.0f" style="text-anchor: end;" x="-10px" y="10px">59</text>
|
||||
<text id="pressure" plotMode="text" plotParam="seaLevelPressure" plotUnit="dPa" plotFormat="%5.0f" plotTrim="2" style="text-anchor: start;" x="10px" y="-10px">018</text>
|
||||
<text id="sample" plotMode="sample" plotParam="rawMessage" x="0" y="0">018</text>
|
||||
</symbol>
|
||||
</defs>
|
||||
<use id="wind" x="40" y="40" width="80" height="80" visibility="visible" xlink:href="#plotData"/>
|
||||
|
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
@ -21,7 +21,7 @@
|
|||
from com.raytheon.uf.viz.core import RGBColors
|
||||
from com.raytheon.uf.viz.core.map import MapDescriptor
|
||||
from com.raytheon.uf.viz.core.rsc.capabilities import ColorableCapability,\
|
||||
OutlineCapability, LabelableCapability, MagnificationCapability
|
||||
OutlineCapability, LabelableCapability, MagnificationCapability, ColorMapCapability
|
||||
from com.raytheon.viz.core import ColorUtil
|
||||
from com.raytheon.viz.gfe.core import DataManager, GFEMapRenderableDisplay
|
||||
from com.raytheon.viz.gfe.ifpimage import GfeImageUtil, ImageLegendResource
|
||||
|
@ -32,6 +32,7 @@ from com.raytheon.viz.gfe.core.parm import ParmDisplayAttributes_VisualizationTy
|
|||
from com.raytheon.uf.common.dataplugin.gfe.reference import ReferenceID
|
||||
|
||||
from java.lang import Double
|
||||
from java.lang import Integer
|
||||
from javax.imageio import ImageIO
|
||||
from java.util import HashSet
|
||||
|
||||
|
@ -50,13 +51,9 @@ from java.util import HashSet
|
|||
|
||||
import VizPainter
|
||||
|
||||
GRAPHIC = VisMode.valueOf('GRAPHIC')
|
||||
IMAGE = VisMode.valueOf('IMAGE')
|
||||
EDITOR = EditorType.valueOf('SPATIAL')
|
||||
|
||||
class GFEPainter(VizPainter.VizPainter):
|
||||
|
||||
def __init__(self, imageWidth=400.0, imageHeight=400.0, expandLeft=25.0, expandRight=25.0, expandTop=25.0, expandBottom=25.0, mask=None, wholeDomain=0):
|
||||
def __init__(self, imageWidth=None, imageHeight=None, expandLeft=25.0, expandRight=25.0, expandTop=25.0, expandBottom=25.0, mask=None, wholeDomain=0):
|
||||
self.dataMgr = DataManager.getInstance(None)
|
||||
self.refId = None
|
||||
envelope = None
|
||||
|
@ -66,7 +63,11 @@ class GFEPainter(VizPainter.VizPainter):
|
|||
self.refId = ReferenceID(mask)
|
||||
if wholeDomain == 0:
|
||||
envelope = self.dataMgr.getRefManager().loadRefSet(self.refId).overallDomain(CoordinateType.LATLON)
|
||||
geom = GfeImageUtil.getLocationGeometry(gloc, envelope, float(imageWidth), float(imageHeight), expandLeft / 100.0, expandRight / 100.0, expandTop / 100.0, expandBottom / 100.0)
|
||||
if imageWidth is not None:
|
||||
imageWidth = Integer(int(imageWidth))
|
||||
if imageHeight is not None:
|
||||
imageHeight = Integer(int(imageHeight))
|
||||
geom = GfeImageUtil.getLocationGeometry(gloc, envelope, imageWidth, imageHeight, expandLeft / 100.0, expandRight / 100.0, expandTop / 100.0, expandBottom / 100.0)
|
||||
display = GFEMapRenderableDisplay(MapDescriptor(geom))
|
||||
desc = display.getDescriptor()
|
||||
self.dataMgr.getSpatialDisplayManager().setDescriptor(desc)
|
||||
|
@ -103,17 +104,25 @@ class GFEPainter(VizPainter.VizPainter):
|
|||
self.addVizResource(colorBar)
|
||||
self.getDescriptor().getResourceList().getProperties(colorBar).setSystemResource(True)
|
||||
|
||||
def addImageResource(self, parmName, colormap=None, colorMin=None, colorMax=None, smooth=False):
|
||||
from com.raytheon.uf.viz.core.rsc.capabilities import ColorMapCapability
|
||||
def __makeGFEResource(self, parmName):
|
||||
parm = self.dataMgr.getParmManager().getParmInExpr(parmName, False)
|
||||
parm.getParmState().setPickUpValue(None)
|
||||
gfeRsc = GFEResource(parm, self.dataMgr)
|
||||
self.addVizResource(gfeRsc)
|
||||
if not parm.getDisplayAttributes().getBaseColor():
|
||||
from com.raytheon.viz.core import ColorUtil
|
||||
parm.getDisplayAttributes().setBaseColor(ColorUtil.getNewColor(self.getDescriptor()))
|
||||
return gfeRsc, parm
|
||||
|
||||
def addGfeResource(self, parmName, colormap=None, colorMin=None, colorMax=None, smooth=False, color=None, lineWidth=None):
|
||||
gfeRsc, parm = self.__makeGFEResource(parmName)
|
||||
jvisType = VisualizationType.valueOf('IMAGE')
|
||||
jset = HashSet()
|
||||
jset.add(jvisType)
|
||||
parm.getDisplayAttributes().setVisualizationType(EDITOR, IMAGE, jset)
|
||||
parm.getDisplayAttributes().setVisMode(IMAGE)
|
||||
# jvisType = VisualizationType.valueOf('IMAGE')
|
||||
# jset = HashSet()
|
||||
# jset.add(jvisType)
|
||||
# parm.getDisplayAttributes().setVisualizationType(EDITOR, IMAGE, jset)
|
||||
# parm.getDisplayAttributes().setVisMode(IMAGE)
|
||||
if self.refId is not None:
|
||||
parm.getDisplayAttributes().setDisplayMask(self.refId)
|
||||
self.dataMgr.getSpatialDisplayManager().activateParm(parm)
|
||||
self.primaryRsc = gfeRsc
|
||||
params = gfeRsc.getCapability(ColorMapCapability).getColorMapParameters()
|
||||
if colormap is not None:
|
||||
|
@ -127,24 +136,6 @@ class GFEPainter(VizPainter.VizPainter):
|
|||
if smooth:
|
||||
from com.raytheon.uf.viz.core.rsc.capabilities import ImagingCapability
|
||||
gfeRsc.getCapability(ImagingCapability).setInterpolationState(True)
|
||||
|
||||
def __makeGFEResource(self, parmName):
|
||||
parm = self.dataMgr.getParmManager().getParmInExpr(parmName, False)
|
||||
parm.getParmState().setPickUpValue(None)
|
||||
gfeRsc = GFEResource(parm, self.dataMgr)
|
||||
self.addVizResource(gfeRsc)
|
||||
if not parm.getDisplayAttributes().getBaseColor():
|
||||
from com.raytheon.viz.core import ColorUtil
|
||||
parm.getDisplayAttributes().setBaseColor(ColorUtil.getNewColor(self.getDescriptor()))
|
||||
return gfeRsc, parm
|
||||
|
||||
def addGraphicResource(self, parmName, visType=None, color=None, lineWidth=None):
|
||||
gfeRsc, parm = self.__makeGFEResource(parmName)
|
||||
if visType is not None:
|
||||
jvisType = VisualizationType.valueOf(visType)
|
||||
jset = HashSet()
|
||||
jset.add(jvisType)
|
||||
parm.getDisplayAttributes().setVisualizationType(EDITOR, GRAPHIC, jset)
|
||||
if color is None:
|
||||
color = ColorUtil.getNewColor(self.getDescriptor())
|
||||
else:
|
||||
|
@ -153,7 +144,6 @@ class GFEPainter(VizPainter.VizPainter):
|
|||
if lineWidth is not None:
|
||||
gfeRsc.getCapability(OutlineCapability).setOutlineWidth(lineWidth)
|
||||
|
||||
|
||||
def addMapBackground(self, mapName, color=None, lineWidth=None,
|
||||
linePattern=None, xOffset=None, yOffset=None,
|
||||
labelAttribute=None, fontOffset=None):
|
||||
|
@ -201,7 +191,10 @@ class GFEPainter(VizPainter.VizPainter):
|
|||
from com.raytheon.uf.viz.core.font import FontAdapter
|
||||
graphics.setColor(Color.BLACK)
|
||||
graphics.setFont(FontAdapter.getAWTFont(self.getTarget().getDefaultFont()))
|
||||
graphics.drawString(logoText, (rendered.getWidth() - len(logoText) * 6) / 2, rendered.getHeight() + (noaaImage.getHeight() / 2))
|
||||
fm = graphics.getFontMetrics()
|
||||
textBounds = fm.getStringBounds(logoText, graphics)
|
||||
graphics.drawString(logoText, int((rendered.getWidth() - textBounds.getWidth()) / 2), \
|
||||
int(rendered.getHeight() + (noaaImage.getHeight() / 2) + textBounds.getHeight() / 2))
|
||||
graphics.drawImage(nwsImage, finalBuf.getWidth() - nwsImage.getWidth(), rendered.getHeight(), None)
|
||||
finalBuf.flush()
|
||||
self.outputImage(finalBuf, filename)
|
||||
|
|
|
@ -1344,13 +1344,16 @@ public class AlertVisConfigDlg extends Dialog implements
|
|||
}
|
||||
|
||||
private void saveWithConfirmDlg() {
|
||||
if (ConfigurationManager.isDefaultConfig(configContext)) {
|
||||
if (!ConfigurationFileDlg.confirmDefaultChange(shell, "save",
|
||||
configContext.toString())) {
|
||||
return;
|
||||
if (ConfigurationFileDlg.validateNotDelivered(shell,
|
||||
configContext.getName())) {
|
||||
if (ConfigurationManager.isDefaultConfig(configContext)) {
|
||||
if (!ConfigurationFileDlg.confirmDefaultChange(shell, "save",
|
||||
configContext.toString())) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
save();
|
||||
}
|
||||
save();
|
||||
}
|
||||
|
||||
private void save() {
|
||||
|
@ -1445,7 +1448,7 @@ public class AlertVisConfigDlg extends Dialog implements
|
|||
saveNeeded(false);
|
||||
|
||||
if (fetchLog) {
|
||||
// System.err.println("Need to fetch log here");
|
||||
// System.err.println("Need to fetch log here");
|
||||
fetchLog = false;
|
||||
alertMsgDlg.resetTabControl();
|
||||
}
|
||||
|
|
|
@ -77,6 +77,11 @@ public class ConfigurationFileDlg extends Dialog {
|
|||
|
||||
private static final String CHANGING_DEFAULT_TITLE = "AlertViz: Default Config Action ";
|
||||
|
||||
private static final String INVALID_FILE_NAME_TITLE = "AlertViz: Invalid File Name ";
|
||||
|
||||
private static final String NO_DELIVERED_IN_NAME_MSG = "You may not Save or Delete a "
|
||||
+ "Configuration file with \"delivered\" in the name. This is a reserved term.";
|
||||
|
||||
private static final String CONFIRM_MSG = "Are you sure you want to %1$s the configuration, %2$s?";
|
||||
|
||||
private static final String CONFIRM_TITLE = "Confirmation";
|
||||
|
@ -329,15 +334,19 @@ public class ConfigurationFileDlg extends Dialog {
|
|||
.get(configurationList.getSelectionIndex());
|
||||
|
||||
if (function == Function.DELETE) {
|
||||
if (ConfigurationManager.isDefaultConfig(rval)) {
|
||||
if (!confirmDefaultChange(shell, "delete",
|
||||
rval.toString())) {
|
||||
rval = null;
|
||||
if (validateNotDelivered(shell, rval.getName())) {
|
||||
if (ConfigurationManager.isDefaultConfig(rval)) {
|
||||
if (!confirmDefaultChange(shell, "delete",
|
||||
rval.toString())) {
|
||||
rval = null;
|
||||
}
|
||||
} else {
|
||||
if (!confirm(shell, "delete", rval.toString())) {
|
||||
rval = null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!confirm(shell, "delete", rval.toString())) {
|
||||
rval = null;
|
||||
}
|
||||
rval = null;
|
||||
}
|
||||
} else if (function == Function.RETRIEVE_WITH_UNSAVED_CHANGES) {
|
||||
if (!confirmLeaveWithUnsavedChanges(shell, rval.toString())) {
|
||||
|
@ -353,27 +362,31 @@ public class ConfigurationFileDlg extends Dialog {
|
|||
case SAVE: {
|
||||
String name = configurationText.getText();
|
||||
String level = configurationLevel.getText();
|
||||
rval = ("".equals(name)) ? null : new ConfigContext(name,
|
||||
LocalizationLevel.valueOf(level));
|
||||
LocalizationLevel enteredLevel = LocalizationLevel.valueOf(level);
|
||||
boolean isFound = false;
|
||||
for (ConfigContext config : configurations) {
|
||||
isFound = config.getName().equals(name)
|
||||
&& enteredLevel.equals(config.getLevel());
|
||||
if (isFound) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (rval != null && isFound) {
|
||||
// we are overwriting a current configuration
|
||||
if (ConfigurationManager.isDefaultConfig(rval)) {
|
||||
if (!confirmDefaultChange(shell, "overwrite",
|
||||
rval.toString())) {
|
||||
rval = null;
|
||||
|
||||
if (validateNotDelivered(shell, name)) {
|
||||
rval = ("".equals(name)) ? null : new ConfigContext(name,
|
||||
LocalizationLevel.valueOf(level));
|
||||
LocalizationLevel enteredLevel = LocalizationLevel
|
||||
.valueOf(level);
|
||||
boolean isFound = false;
|
||||
for (ConfigContext config : configurations) {
|
||||
isFound = config.getName().equals(name)
|
||||
&& enteredLevel.equals(config.getLevel());
|
||||
if (isFound) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (!confirm(shell, "overwrite", rval.toString())) {
|
||||
rval = null;
|
||||
}
|
||||
if (rval != null && isFound) {
|
||||
// we are overwriting a current configuration
|
||||
if (ConfigurationManager.isDefaultConfig(rval)) {
|
||||
if (!confirmDefaultChange(shell, "overwrite",
|
||||
rval.toString())) {
|
||||
rval = null;
|
||||
}
|
||||
} else {
|
||||
if (!confirm(shell, "overwrite", rval.toString())) {
|
||||
rval = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -385,6 +398,16 @@ public class ConfigurationFileDlg extends Dialog {
|
|||
}
|
||||
}
|
||||
|
||||
public static boolean validateNotDelivered(Shell shell, String name) {
|
||||
if (name.contains("delivered")) {
|
||||
MessageDialog.openInformation(shell, INVALID_FILE_NAME_TITLE,
|
||||
NO_DELIVERED_IN_NAME_MSG);
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean confirmDefaultChange(Shell shell, String action,
|
||||
String contextName) {
|
||||
return MessageDialog.openConfirm(shell, CHANGING_DEFAULT_TITLE,
|
||||
|
|
|
@ -336,10 +336,8 @@ public class PriorityControls {
|
|||
actionChk.addSelectionListener(new SelectionAdapter() {
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
updateActionChangeButton();
|
||||
if (actionChk.getSelection()) {
|
||||
needsSaveListener.saveNeeded(true);
|
||||
alertMetadata.setPythonEnabled(actionChk.getSelection());
|
||||
}
|
||||
needsSaveListener.saveNeeded(true);
|
||||
alertMetadata.setPythonEnabled(actionChk.getSelection());
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -493,6 +491,7 @@ public class PriorityControls {
|
|||
* Select the audio file.
|
||||
*/
|
||||
private void selectAudioFile() {
|
||||
boolean saveNeeded = false;
|
||||
String audioFile = alertMetadata.getAudioFile();
|
||||
|
||||
audioDlg = new FileSelectDlg(parentComp.getShell(),
|
||||
|
@ -501,16 +500,20 @@ public class PriorityControls {
|
|||
Boolean retVal = (Boolean) audioDlg.open("Audio Selection File",
|
||||
audioFile);
|
||||
|
||||
if (retVal == null) {
|
||||
if (retVal == null && audioFile != null) {
|
||||
audioChk.setSelection(false);
|
||||
changeAudioBtn.setEnabled(false);
|
||||
audioChk.setToolTipText("");
|
||||
} else if (retVal != null && retVal == true) {
|
||||
File selectedFile = audioDlg.getSelectedFile();
|
||||
|
||||
if (selectedFile != null) {
|
||||
alertMetadata.setAudioFile(selectedFile.getName());
|
||||
audioChk.setToolTipText(selectedFile.getName());
|
||||
if (selectedFile == null && audioFile == null) {
|
||||
// do nothing
|
||||
} else if (selectedFile != null) {
|
||||
String selectedFileName = selectedFile.getName();
|
||||
saveNeeded = !selectedFileName.equals(audioFile);
|
||||
alertMetadata.setAudioFile(selectedFileName);
|
||||
audioChk.setToolTipText(selectedFileName);
|
||||
} else {
|
||||
alertMetadata.setAudioFile(null);
|
||||
alertMetadata.setAudioEnabled(false);
|
||||
|
@ -519,6 +522,9 @@ public class PriorityControls {
|
|||
changeAudioBtn.setEnabled(false);
|
||||
}
|
||||
}
|
||||
if (saveNeeded) {
|
||||
needsSaveListener.saveNeeded(saveNeeded);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -734,6 +740,7 @@ public class PriorityControls {
|
|||
* Select the audio file.
|
||||
*/
|
||||
private void selectActionFile() {
|
||||
boolean saveNeeded = false;
|
||||
String actionFile = alertMetadata.getPythonScript();
|
||||
|
||||
Map<String, String> filteredExtensions = new HashMap<String, String>();
|
||||
|
@ -748,15 +755,19 @@ public class PriorityControls {
|
|||
Boolean retVal = (Boolean) actionDlg.open("Action Selection File",
|
||||
actionFile);
|
||||
|
||||
if (retVal == null) {
|
||||
if (retVal == null && actionFile != null) {
|
||||
actionChk.setSelection(false);
|
||||
changeActionBtn.setEnabled(false);
|
||||
} else if (retVal == true) {
|
||||
} else if (retVal != null && retVal == true) {
|
||||
File selectedFile = actionDlg.getSelectedFile();
|
||||
|
||||
if (selectedFile != null) {
|
||||
alertMetadata.setPythonScript(selectedFile.getName());
|
||||
actionChk.setToolTipText(selectedFile.getName());
|
||||
if (selectedFile == null && actionFile == null) {
|
||||
// do nothing
|
||||
} else if (selectedFile != null) {
|
||||
String selectedFileName = selectedFile.getName();
|
||||
saveNeeded = !selectedFileName.equals(actionFile);
|
||||
alertMetadata.setPythonScript(selectedFileName);
|
||||
actionChk.setToolTipText(selectedFileName);
|
||||
} else {
|
||||
alertMetadata.setAudioFile(null);
|
||||
alertMetadata.setAudioEnabled(false);
|
||||
|
@ -765,6 +776,9 @@ public class PriorityControls {
|
|||
changeActionBtn.setEnabled(false);
|
||||
}
|
||||
}
|
||||
if (saveNeeded) {
|
||||
needsSaveListener.saveNeeded(saveNeeded);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -80,7 +80,7 @@ public class SimpleDetailsComp extends Composite {
|
|||
setLayout(new GridLayout(1, false));
|
||||
setLayoutData(gd);
|
||||
|
||||
gd = new GridData(SWT.FILL, SWT.DEFAULT, false, false);
|
||||
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
gd.heightHint = 250;
|
||||
st = new StyledText(this, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
|
||||
st.setEditable(false);
|
||||
|
|
|
@ -129,7 +129,7 @@ public class SimpleLogViewer extends Dialog {
|
|||
Shell parent = getParent();
|
||||
// shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.MIN | SWT.RESIZE);
|
||||
shell = new Shell(parent.getDisplay(), SWT.DIALOG_TRIM | SWT.MIN
|
||||
| SWT.TITLE);
|
||||
| SWT.TITLE | SWT.RESIZE);
|
||||
shell.setText(getText());
|
||||
|
||||
/* TODO: Max Code: */
|
||||
|
@ -138,7 +138,7 @@ public class SimpleLogViewer extends Dialog {
|
|||
mainLayout.marginWidth = 0;
|
||||
mainLayout.verticalSpacing = 0;
|
||||
shell.setLayout(mainLayout);
|
||||
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, true);
|
||||
shell.setLayoutData(gd);
|
||||
|
||||
// shell.setLayout(new GridLayout(1, false));
|
||||
|
@ -161,7 +161,7 @@ public class SimpleLogViewer extends Dialog {
|
|||
// | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL
|
||||
// | GridData.VERTICAL_ALIGN_FILL));
|
||||
|
||||
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
|
||||
gd = new GridData(SWT.FILL, SWT.FILL, true, true);
|
||||
gd.widthHint = 800;
|
||||
gd.heightHint = 400;
|
||||
table.setLayoutData(gd);
|
||||
|
|
|
@ -108,8 +108,12 @@ public class TabControlDlg extends Dialog {
|
|||
*/
|
||||
private StyledText detailsText;
|
||||
|
||||
private static Rectangle bounds;
|
||||
|
||||
private static int[] weights = { 50, 50 };
|
||||
|
||||
private static boolean visible = false;
|
||||
|
||||
/**
|
||||
* Get the instance of the TabControl dialog
|
||||
*
|
||||
|
@ -148,6 +152,10 @@ public class TabControlDlg extends Dialog {
|
|||
|
||||
shell = new Shell(parent, SWT.TITLE | SWT.RESIZE);
|
||||
|
||||
if (bounds != null) {
|
||||
shell.setBounds(bounds);
|
||||
shell.setFocus();
|
||||
}
|
||||
GridLayout mainLayout = new GridLayout(1, false);
|
||||
shell.setLayout(mainLayout);
|
||||
|
||||
|
@ -161,15 +169,34 @@ public class TabControlDlg extends Dialog {
|
|||
mainComp = new Composite(shell, SWT.NONE);
|
||||
mainComp.setLayout(new GridLayout(1, false));
|
||||
|
||||
shell.addDisposeListener(new DisposeListener() {
|
||||
|
||||
@Override
|
||||
public void widgetDisposed(DisposeEvent e) {
|
||||
cacheDimensions();
|
||||
}
|
||||
});
|
||||
|
||||
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
|
||||
gd.widthHint = 800;
|
||||
if (bounds == null) {
|
||||
gd.widthHint = 800;
|
||||
gd.heightHint = 285;
|
||||
} else {
|
||||
gd.widthHint = bounds.width;
|
||||
gd.heightHint = bounds.height;
|
||||
}
|
||||
mainComp.setLayoutData(gd);
|
||||
|
||||
topComp = new SashForm(mainComp, SWT.HORIZONTAL);
|
||||
topComp.setLayout(new GridLayout(2, false));
|
||||
gd = new GridData(SWT.FILL, SWT.FILL, true, true);
|
||||
gd.widthHint = 400;
|
||||
gd.heightHint = 285;
|
||||
if (bounds == null) {
|
||||
gd.widthHint = 400;
|
||||
gd.heightHint = 285;
|
||||
} else {
|
||||
gd.widthHint = bounds.width;
|
||||
gd.heightHint = bounds.height;
|
||||
}
|
||||
topComp.setLayoutData(gd);
|
||||
|
||||
tabFolder = new TabFolder(topComp, SWT.BORDER);
|
||||
|
@ -205,9 +232,13 @@ public class TabControlDlg extends Dialog {
|
|||
detailsText.setLayoutData(gd);
|
||||
detailsText.setEditable(false);
|
||||
|
||||
detailsText.setVisible(false);
|
||||
detailsText.setVisible(visible);
|
||||
((GridData) detailsText.getLayoutData()).exclude = true;
|
||||
|
||||
if (visible) {
|
||||
topComp.setWeights(weights);
|
||||
}
|
||||
|
||||
createBottomButtons();
|
||||
}
|
||||
|
||||
|
@ -281,24 +312,21 @@ public class TabControlDlg extends Dialog {
|
|||
showHide.setLayoutData(gd);
|
||||
// TODO: Make this work, right now not working
|
||||
showHide.addSelectionListener(new SelectionAdapter() {
|
||||
boolean visible = false;
|
||||
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
// if now visible then use cache weights
|
||||
// if NOT visible, save weights, set to hidden
|
||||
visible = !visible;
|
||||
detailsText.setVisible(visible);
|
||||
SashForm sf = (SashForm) topComp;
|
||||
if (visible == true) {
|
||||
showHide.setText("Hide Details...");
|
||||
sf.setWeights(weights);
|
||||
} else {
|
||||
showHide.setText("Show Details");
|
||||
}
|
||||
detailsText.setVisible(visible);
|
||||
|
||||
SashForm sf = (SashForm) topComp;
|
||||
if (!visible) {
|
||||
cacheCurrentWeights();
|
||||
cacheDimensions();
|
||||
sf.setWeights(new int[] { 100, 0 });
|
||||
} else {
|
||||
sf.setWeights(weights);
|
||||
}
|
||||
topComp.layout();
|
||||
mainComp.layout();
|
||||
|
@ -306,10 +334,13 @@ public class TabControlDlg extends Dialog {
|
|||
});
|
||||
}
|
||||
|
||||
private void cacheCurrentWeights() {
|
||||
private void cacheDimensions() {
|
||||
int[] currentWeights = topComp.getWeights();
|
||||
weights[0] = currentWeights[0];
|
||||
weights[1] = currentWeights[1];
|
||||
bounds = topComp.getParent().getBounds();
|
||||
bounds.x = shell.getParent().getBounds().x;
|
||||
bounds.y = shell.getParent().getBounds().y;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -33,6 +33,7 @@ import javax.jms.Queue;
|
|||
import javax.jms.Session;
|
||||
import javax.jms.TextMessage;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import javax.xml.bind.Marshaller;
|
||||
|
||||
import org.apache.activemq.command.ActiveMQTextMessage;
|
||||
|
@ -87,6 +88,8 @@ public class AlertVizClient implements MessageListener {
|
|||
|
||||
private CopyOnWriteArrayList<IAlertVizMessageCallback> listeners;
|
||||
|
||||
private Marshaller marshaller;
|
||||
|
||||
private static AlertVizClient instance;
|
||||
|
||||
public AlertVizClient(String host, boolean retry) {
|
||||
|
@ -131,9 +134,14 @@ public class AlertVizClient implements MessageListener {
|
|||
this.consumer.setMessageListener(this);
|
||||
reconnect = false;
|
||||
lastReconnectTime = System.currentTimeMillis();
|
||||
JAXBContext context = JAXBContext.newInstance(StatusMessage.class);
|
||||
marshaller = context.createMarshaller();
|
||||
} catch (JMSException e) {
|
||||
reconnect = true;
|
||||
throw new AlertvizException("Unable to connect to notification", e);
|
||||
} catch (JAXBException e) {
|
||||
reconnect = true;
|
||||
throw new AlertvizException("Unable to connect to notification", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -151,10 +159,6 @@ public class AlertVizClient implements MessageListener {
|
|||
printToConsole(statusMessage);
|
||||
} else {
|
||||
try {
|
||||
JAXBContext context = JAXBContext
|
||||
.newInstance(StatusMessage.class);
|
||||
Marshaller marshaller = context.createMarshaller();
|
||||
|
||||
StringWriter sw = new StringWriter();
|
||||
marshaller.marshal(statusMessage, sw);
|
||||
ActiveMQTextMessage message = new ActiveMQTextMessage();
|
||||
|
|
|
@ -80,10 +80,16 @@ public class Container implements IConfigurationChangedListener {
|
|||
|
||||
private static final int UI_FLOOD_THRESHOLD = 50;
|
||||
|
||||
private static final int SHOTGUN_MESSAGE_MILLISECOND_THRESHOLD = 1000;
|
||||
|
||||
private String lastErrorDialogMessage;
|
||||
|
||||
private long lastErrorDialogTime;
|
||||
|
||||
private int shotgunMessageCount;
|
||||
|
||||
private long shotgunMessageStartTime;
|
||||
|
||||
public Container(Set<IAlertArrivedCallback> callbacks) {
|
||||
configurationChanged();
|
||||
forcedConfiguration = ConfigurationManager.getInstance()
|
||||
|
@ -179,7 +185,7 @@ public class Container implements IConfigurationChangedListener {
|
|||
* @param message
|
||||
* @return
|
||||
*/
|
||||
public boolean isShotGun(StatusMessage message) {
|
||||
private boolean isShotGun(StatusMessage message) {
|
||||
boolean retVal = false;
|
||||
if (lastMessage != null) {
|
||||
if (this.lastMessage.getCategory().equals(message.getCategory())
|
||||
|
@ -187,8 +193,33 @@ public class Container implements IConfigurationChangedListener {
|
|||
&& this.lastMessage.getMessage().equals(
|
||||
message.getMessage())
|
||||
&& Math.abs(this.lastMessage.getEventTime().getTime()
|
||||
- message.getEventTime().getTime()) < 1000) {
|
||||
- message.getEventTime().getTime()) < SHOTGUN_MESSAGE_MILLISECOND_THRESHOLD) {
|
||||
retVal = true;
|
||||
++this.shotgunMessageCount;
|
||||
if (this.shotgunMessageStartTime == 0) {
|
||||
this.shotgunMessageStartTime = message.getEventTime()
|
||||
.getTime();
|
||||
}
|
||||
} else {
|
||||
if (this.shotgunMessageCount != 0) {
|
||||
StringBuilder sb = new StringBuilder("Received ")
|
||||
.append(this.shotgunMessageCount)
|
||||
.append(" duplicate messages in ")
|
||||
.append(message.getEventTime().getTime()
|
||||
- this.shotgunMessageStartTime)
|
||||
.append(" milliseconds. For message: ")
|
||||
.append(this.lastMessage.getCategory()).append(":")
|
||||
.append(this.lastMessage.getSourceKey())
|
||||
.append(" ").append(this.lastMessage.getMessage());
|
||||
this.shotgunMessageStartTime = 0;
|
||||
this.shotgunMessageCount = 0;
|
||||
StatusMessage sm = new StatusMessage(
|
||||
this.lastMessage.getSourceKey(), "GDN_ADMIN",
|
||||
this.lastMessage.getPriority(),
|
||||
this.lastMessage.getPlugin(), sb.toString(), null);
|
||||
sm.setEventTime(SimulatedTime.getSystemTime().getTime());
|
||||
messageReceived(sm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,9 @@ import com.raytheon.uf.viz.alertviz.config.TrayConfiguration.TrayMode;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 9, 2008 1433 chammack Initial creation
|
||||
* May 3, 2011 9067 cjeanbap Add isMonitorLayoutChanged() method.
|
||||
* Apr 27 2012 13744 Xiaochuan Update isMonitorLayoutChanged() to compare
|
||||
* source size in Previous and current.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
|
@ -409,57 +412,70 @@ public class Configuration implements ISerializableObject {
|
|||
* @param configData the current save Configuration Data.
|
||||
* @return boolean, true if either Monitor and/or Layout was changed otherwise false.
|
||||
*/
|
||||
public boolean isMonitorLayoutChanged(Configuration configData) {
|
||||
boolean modified = false;
|
||||
public boolean isMonitorLayoutChanged(Configuration configData) {
|
||||
boolean modified = false;
|
||||
|
||||
TrayMode prevLayoutMode = configData.getGlobalConfiguration().getMode();
|
||||
if (!prevLayoutMode.equals(this.getGlobalConfiguration().getMode())) {
|
||||
modified = true;
|
||||
}
|
||||
TrayMode prevLayoutMode = configData.getGlobalConfiguration().getMode();
|
||||
if (!prevLayoutMode.equals(this.getGlobalConfiguration().getMode())) {
|
||||
modified = true;
|
||||
}
|
||||
|
||||
Map<String, Category> prevCategoryMap = configData.getCategories();
|
||||
for (Iterator<String> categories = this.getCategories().keySet().iterator(); categories.hasNext() && !modified;) {
|
||||
String categoryName = categories.next();
|
||||
Category prevCategory = prevCategoryMap.get(categoryName);
|
||||
Category newCategory = this.getCategories().get(categoryName);
|
||||
if (prevCategory != null && newCategory == null) {
|
||||
modified = true;
|
||||
} else if (prevCategory == null && newCategory != null) {
|
||||
modified = true;
|
||||
} else if (prevCategory != null && newCategory != null) {
|
||||
if (prevCategory.getTextBox() != newCategory.getTextBox()) {
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Map<String, Category> prevCategoryMap = configData.getCategories();
|
||||
for (Iterator<String> categories = this.getCategories().keySet()
|
||||
.iterator(); categories.hasNext() && !modified;) {
|
||||
String categoryName = categories.next();
|
||||
Category prevCategory = prevCategoryMap.get(categoryName);
|
||||
Category newCategory = this.getCategories().get(categoryName);
|
||||
if (prevCategory != null && newCategory == null) {
|
||||
modified = true;
|
||||
} else if (prevCategory == null && newCategory != null) {
|
||||
modified = true;
|
||||
} else if (prevCategory != null && newCategory != null) {
|
||||
if (prevCategory.getTextBox() != newCategory.getTextBox()) {
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, Source> prevSources = configData.getSources();
|
||||
for (Iterator<String> sources = this.getSources().keySet().iterator(); sources.hasNext() && !modified; ) {
|
||||
String sourceName = sources.next();
|
||||
Source prevSource = prevSources.get(sourceName);
|
||||
Source newSource = this.getSources().get(sourceName);
|
||||
if (prevSource != null && newSource == null) {
|
||||
modified = true;
|
||||
}
|
||||
Map<String, Source> prevSources = configData.getSources();
|
||||
|
||||
if (prevSource != null && newSource != null) {
|
||||
MonitorMetadata newMonitorMetadata = newSource.getConfigurationMonitor().getMonitorMetadata();
|
||||
MonitorMetadata prevMonitorMetadata = prevSource.getConfigurationMonitor().getMonitorMetadata();
|
||||
if (prevSources.size() != this.getSources().size()) {
|
||||
modified = true;
|
||||
} else {
|
||||
for (Iterator<String> sources = this.getSources().keySet()
|
||||
.iterator(); sources.hasNext() && !modified;) {
|
||||
String sourceName = sources.next();
|
||||
Source prevSource = prevSources.get(sourceName);
|
||||
Source newSource = this.getSources().get(sourceName);
|
||||
if (prevSource == null) {
|
||||
modified = true;
|
||||
} else if (prevSource != null && newSource != null) {
|
||||
MonitorMetadata newMonitorMetadata = newSource
|
||||
.getConfigurationMonitor().getMonitorMetadata();
|
||||
MonitorMetadata prevMonitorMetadata = prevSource
|
||||
.getConfigurationMonitor().getMonitorMetadata();
|
||||
|
||||
if (newMonitorMetadata != null && prevMonitorMetadata == null) {
|
||||
modified = true;
|
||||
} else if ((newMonitorMetadata.getOmit()) && (prevMonitorMetadata.getOmit() == false)) {
|
||||
modified = true;
|
||||
} if ((newMonitorMetadata.getOmit() == false) && (prevMonitorMetadata.getOmit() == true)) {
|
||||
modified = true;
|
||||
} else if (newMonitorMetadata.getImageFile() != null && prevMonitorMetadata.getImageFile() == null) {
|
||||
modified = true;
|
||||
} else if (newMonitorMetadata.getImageFile() == null && prevMonitorMetadata.getImageFile() != null) {
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (newMonitorMetadata != null
|
||||
&& prevMonitorMetadata == null) {
|
||||
modified = true;
|
||||
} else if ((newMonitorMetadata.getOmit())
|
||||
&& (prevMonitorMetadata.getOmit() == false)) {
|
||||
modified = true;
|
||||
}
|
||||
if ((newMonitorMetadata.getOmit() == false)
|
||||
&& (prevMonitorMetadata.getOmit() == true)) {
|
||||
modified = true;
|
||||
} else if (newMonitorMetadata.getImageFile() != null
|
||||
&& prevMonitorMetadata.getImageFile() == null) {
|
||||
modified = true;
|
||||
} else if (newMonitorMetadata.getImageFile() == null
|
||||
&& prevMonitorMetadata.getImageFile() != null) {
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return modified;
|
||||
}
|
||||
return modified;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -465,6 +465,7 @@ public class DbPointMapResource extends
|
|||
font = aTarget.initializeFont(aTarget.getDefaultFont()
|
||||
.getFontName(), (float) (10 * magnification), null);
|
||||
font.setSmoothing(false);
|
||||
font.setScaleFont(false);
|
||||
}
|
||||
|
||||
Rectangle2D charSize = aTarget.getStringBounds(font, "N");
|
||||
|
|
|
@ -94,7 +94,7 @@ public class VizApp {
|
|||
userName);
|
||||
}
|
||||
|
||||
wsId = new WsId(null, null, Platform.getProduct().getName(), 0);
|
||||
wsId = new WsId(null, null, Platform.getProduct().getName());
|
||||
}
|
||||
|
||||
return wsId;
|
||||
|
|
|
@ -1501,8 +1501,6 @@ public class TimeMatcher {
|
|||
loadTimes = doValTimOverlay(filteredTimes.toArray(new DataTime[0]),
|
||||
frameTimes, deltaTime, mode, latest, tolerance);
|
||||
break;
|
||||
case ANALYSIS_LOOP:
|
||||
forecast = 0; // intentional fall thru
|
||||
case SLOT:
|
||||
filteredTimes = filterByForecast(depictTimes, forecast);
|
||||
if (!filteredTimes.isEmpty()) {
|
||||
|
@ -1512,6 +1510,8 @@ public class TimeMatcher {
|
|||
filteredTimes.get(filteredTimes.size() - 1));
|
||||
}
|
||||
break;
|
||||
case ANALYSIS_LOOP:
|
||||
forecast = 0; // intentional fall thru
|
||||
case INVENTORY:
|
||||
case PROG_LOOP:
|
||||
filteredTimes = filterByForecast(depictTimes, forecast);
|
||||
|
|
|
@ -101,8 +101,7 @@ public class D2DNSharpDisplay extends NsharpSkewTDisplay implements
|
|||
* handled by a separate manager or something.T
|
||||
*/
|
||||
NsharpSkewTResource skewRsc = getDescriptor().getSkewtResource();
|
||||
if (activeNativeResource != null
|
||||
&& activeNativeResource.get() != skewRsc
|
||||
if ((activeNativeResource == null || activeNativeResource.get() != skewRsc)
|
||||
&& skewRsc.getSoundingLys() != null) {
|
||||
// TODO we need a better way of tracking what is in native.
|
||||
List<NcSoundingLayer> soundingLys = skewRsc.getSoundingLys();
|
||||
|
|
|
@ -19,14 +19,12 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.d2d.ui.dialogs;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.geom.AffineTransform;
|
||||
import java.awt.image.AffineTransformOp;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.awt.image.ByteLookupTable;
|
||||
import java.awt.image.ComponentColorModel;
|
||||
import java.awt.image.IndexColorModel;
|
||||
import java.awt.image.LookupOp;
|
||||
import java.awt.image.LookupTable;
|
||||
import java.awt.image.WritableRaster;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -129,8 +127,6 @@ public class PrintDialog extends CaveSWTDialog {
|
|||
|
||||
private BufferedImage bi;
|
||||
|
||||
private LookupTable lookupTable = null;
|
||||
|
||||
private MagnificationInformationStorage magnificationInformationStorage = null;
|
||||
|
||||
private DensityInformationStorage densityInformationStorage = null;
|
||||
|
@ -668,8 +664,19 @@ public class PrintDialog extends CaveSWTDialog {
|
|||
}
|
||||
|
||||
if (printerSettings.invert) {
|
||||
reverseLUT();
|
||||
applyFilter();
|
||||
// Only invert gray pixels, not colored pixels, awt doesn not have a
|
||||
// good filter for this.
|
||||
for (int x = 0; x < bi.getWidth(); x += 1) {
|
||||
for (int y = 0; y < bi.getHeight(); y += 1) {
|
||||
Color color = new Color(bi.getRGB(x, y));
|
||||
if (color.getRed() == color.getBlue()
|
||||
&& color.getBlue() == color.getGreen()) {
|
||||
color = new Color(255 - color.getRed(),
|
||||
255 - color.getGreen(), 255 - color.getBlue());
|
||||
bi.setRGB(x, y, color.getRGB());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ImageData imageData = convertToSWT(bi);
|
||||
Image image = null;
|
||||
|
@ -824,22 +831,4 @@ public class PrintDialog extends CaveSWTDialog {
|
|||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* Create reverse lookup table for image
|
||||
*/
|
||||
private void reverseLUT() {
|
||||
byte reverse[] = new byte[256];
|
||||
for (int i = 0; i < 256; i++) {
|
||||
reverse[i] = (byte) (255 - i);
|
||||
}
|
||||
lookupTable = new ByteLookupTable(0, reverse);
|
||||
}
|
||||
|
||||
/*
|
||||
* Apply lookup table filter to image
|
||||
*/
|
||||
private void applyFilter() {
|
||||
LookupOp lop = new LookupOp(lookupTable, null);
|
||||
lop.filter(bi, bi);
|
||||
}
|
||||
}
|
|
@ -50,7 +50,6 @@ import org.eclipse.swt.widgets.Label;
|
|||
import org.eclipse.swt.widgets.Layout;
|
||||
import org.eclipse.swt.widgets.List;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.IEditorPart;
|
||||
|
||||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
import com.raytheon.uf.common.localization.LocalizationContext;
|
||||
|
@ -78,7 +77,6 @@ import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
|
|||
import com.raytheon.uf.viz.core.rsc.AbstractResourceData;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
|
||||
import com.raytheon.uf.viz.d2d.ui.dialogs.procedures.ProcedureComm.BundlePair;
|
||||
import com.raytheon.viz.ui.EditorUtil;
|
||||
import com.raytheon.viz.ui.HistoryList;
|
||||
import com.raytheon.viz.ui.UiUtil;
|
||||
import com.raytheon.viz.ui.actions.SaveBundle;
|
||||
|
@ -381,13 +379,6 @@ public class ProcedureDlg extends CaveSWTDialog {
|
|||
for (BundlePair b : bp) {
|
||||
Bundle bundle = Bundle.unmarshalBundle(b.xml, null);
|
||||
|
||||
// check if loop properties need to be saved
|
||||
IEditorPart editorPart = EditorUtil.getActiveEditor();
|
||||
if (editorPart instanceof AbstractEditor) {
|
||||
bundle.setLoopProperties(((AbstractEditor) editorPart)
|
||||
.getLoopProperties());
|
||||
}
|
||||
|
||||
if (!frozen) {
|
||||
for (AbstractRenderableDisplay display : bundle
|
||||
.getDisplays()) {
|
||||
|
|
|
@ -241,6 +241,8 @@ public class GribCSAdapter extends AbstractCrossSectionAdapter<GribRecord> {
|
|||
while (dataLists.size() < results.length) {
|
||||
dataLists.add(new ArrayList<XYData>());
|
||||
}
|
||||
double speed = Float.NaN;
|
||||
double direction = Double.NaN;
|
||||
for (int c = 0; c < results.length; c++) {
|
||||
FloatDataRecord xRec = (FloatDataRecord) results[c];
|
||||
float xVal = InterpUtils.getInterpolatedData(requestArea,
|
||||
|
@ -248,6 +250,21 @@ public class GribCSAdapter extends AbstractCrossSectionAdapter<GribRecord> {
|
|||
if (xVal <= -9999) {
|
||||
continue;
|
||||
}
|
||||
// these cases handle rotating a vector to be oriented
|
||||
// towards the north pole rather than the up direction of a
|
||||
// grid.
|
||||
if (c == 0) {
|
||||
speed = xVal;
|
||||
} else if (c == 1) {
|
||||
direction = xVal - 180
|
||||
+ MapUtil.rotation(coordinates[i], area);
|
||||
xVal = (float) direction;
|
||||
direction = Math.toRadians(direction);
|
||||
} else if (c == 2) {
|
||||
xVal = (float) (-speed * Math.sin(direction));
|
||||
} else if (c == 3) {
|
||||
xVal = (float) (-speed * Math.cos(direction));
|
||||
}
|
||||
dataLists.get(c).add(new XYData(xVal, yVal));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ def execute(GHxSM, TxSM, P, dx, dy, coriolis):
|
|||
# Now calculate the QG frontogensis function for this level.
|
||||
# Fgen = 2(Qx * d(theta)/dx + Qy * d(theta)/dy)
|
||||
result = slqx * dtdx
|
||||
result += slqy * dtdy
|
||||
result *= (-1) * t2th
|
||||
result -= slqy * dtdy
|
||||
result *= t2th
|
||||
|
||||
return result
|
||||
|
|
|
@ -24,7 +24,7 @@ def execute(height_up, height_lo, pressure_up, pressure_lo, dx, dy, coriolis):
|
|||
qx, qy, dtdx, dtdy = lyrQvec(height_up, height_lo, pressure_up, pressure_lo, dx, dy, coriolis)
|
||||
|
||||
fgen = qx * dtdx
|
||||
fgen += qy * dtdy
|
||||
fgen -= qy * dtdy
|
||||
fgen *= 2
|
||||
|
||||
return fgen
|
||||
|
|
|
@ -58,6 +58,12 @@
|
|||
<Method name="Supplement" models="mesoEta212 mesoEta215">
|
||||
<Field abbreviation="TP3hr"/>
|
||||
</Method>
|
||||
<Method name="Supplement" models="HiResW-ARW-East HiResW-ARW-West HiResW-ARW-AK HiResW-ARW-SJU HiResW-ARW-HI HiResW-ARW-GU">
|
||||
<Field abbreviation="TP3hr"/>
|
||||
</Method>
|
||||
<Method name="Supplement" models="HiResW-NMM-East HiResW-NMM-West HiResW-NMM-AK HiResW-NMM-SJU HiResW-NMM-HI HiResW-NMM-GU">
|
||||
<Field abbreviation="TP3hr"/>
|
||||
</Method>
|
||||
<Method name="Alias">
|
||||
<Field abbreviation="TP3hr"/>
|
||||
</Method>
|
||||
|
|
|
@ -102,20 +102,20 @@ be put in localization.
|
|||
<defaultColormap>ffmp/qpe</defaultColormap>
|
||||
<dataMapping>
|
||||
<entry displayValue='-9999.0' pixelValue='0' label='' />
|
||||
<entry displayValue='0.0' pixelValue='15'/>
|
||||
<entry displayValue='0.1' pixelValue='31'/>
|
||||
<entry displayValue='0.2' pixelValue='47'/>
|
||||
<entry displayValue='0.4' pixelValue='63'/>
|
||||
<entry displayValue='0.6' pixelValue='79'/>
|
||||
<entry displayValue='0.8' pixelValue='95'/>
|
||||
<entry displayValue='1.0' pixelValue='111'/>
|
||||
<entry displayValue='1.25' pixelValue='127'/>
|
||||
<entry displayValue='1.5' pixelValue='143'/>
|
||||
<entry displayValue='1.75' pixelValue='159'/>
|
||||
<entry displayValue='2.0' pixelValue='175'/>
|
||||
<entry displayValue='2.5' pixelValue='191'/>
|
||||
<entry displayValue='3.0' pixelValue='207'/>
|
||||
<entry displayValue='4.0' pixelValue='223'/>
|
||||
<entry displayValue='0.0' pixelValue='16'/>
|
||||
<entry displayValue='0.1' pixelValue='32'/>
|
||||
<entry displayValue='0.2' pixelValue='48'/>
|
||||
<entry displayValue='0.4' pixelValue='64'/>
|
||||
<entry displayValue='0.6' pixelValue='80'/>
|
||||
<entry displayValue='0.8' pixelValue='96'/>
|
||||
<entry displayValue='1.0' pixelValue='112'/>
|
||||
<entry displayValue='1.25' pixelValue='128'/>
|
||||
<entry displayValue='1.5' pixelValue='144'/>
|
||||
<entry displayValue='1.75' pixelValue='160'/>
|
||||
<entry displayValue='2.0' pixelValue='176'/>
|
||||
<entry displayValue='2.5' pixelValue='192'/>
|
||||
<entry displayValue='3.0' pixelValue='208'/>
|
||||
<entry displayValue='4.0' pixelValue='224'/>
|
||||
<entry displayValue='5.0' pixelValue='240'/>
|
||||
<entry displayValue='9999.0' pixelValue='255' label='' />
|
||||
</dataMapping>
|
||||
|
@ -131,20 +131,20 @@ be put in localization.
|
|||
<defaultColormap>ffmp/qpe6</defaultColormap>
|
||||
<dataMapping>
|
||||
<entry displayValue='-9999.0' pixelValue='0' label='' />
|
||||
<entry displayValue='0.0' pixelValue='15'/>
|
||||
<entry displayValue='0.1' pixelValue='31'/>
|
||||
<entry displayValue='0.25' pixelValue='47'/>
|
||||
<entry displayValue='0.5' pixelValue='63'/>
|
||||
<entry displayValue='0.75' pixelValue='79'/>
|
||||
<entry displayValue='1.0' pixelValue='95'/>
|
||||
<entry displayValue='1.25' pixelValue='111'/>
|
||||
<entry displayValue='1.75' pixelValue='127'/>
|
||||
<entry displayValue='2.0' pixelValue='143'/>
|
||||
<entry displayValue='2.5' pixelValue='159'/>
|
||||
<entry displayValue='3.0' pixelValue='175'/>
|
||||
<entry displayValue='4.0' pixelValue='191'/>
|
||||
<entry displayValue='6.0' pixelValue='207'/>
|
||||
<entry displayValue='8.0' pixelValue='223'/>
|
||||
<entry displayValue='0.0' pixelValue='16'/>
|
||||
<entry displayValue='0.1' pixelValue='32'/>
|
||||
<entry displayValue='0.25' pixelValue='48'/>
|
||||
<entry displayValue='0.5' pixelValue='64'/>
|
||||
<entry displayValue='0.75' pixelValue='80'/>
|
||||
<entry displayValue='1.0' pixelValue='96'/>
|
||||
<entry displayValue='1.25' pixelValue='112'/>
|
||||
<entry displayValue='1.75' pixelValue='128'/>
|
||||
<entry displayValue='2.0' pixelValue='144'/>
|
||||
<entry displayValue='2.5' pixelValue='160'/>
|
||||
<entry displayValue='3.0' pixelValue='176'/>
|
||||
<entry displayValue='4.0' pixelValue='192'/>
|
||||
<entry displayValue='6.0' pixelValue='208'/>
|
||||
<entry displayValue='8.0' pixelValue='224'/>
|
||||
<entry displayValue='10.0' pixelValue='240'/>
|
||||
<entry displayValue='9999.0' pixelValue='255' label='' />
|
||||
</dataMapping>
|
||||
|
@ -160,20 +160,20 @@ be put in localization.
|
|||
<defaultColormap>ffmp/qpe12</defaultColormap>
|
||||
<dataMapping>
|
||||
<entry displayValue='-9999.0' pixelValue='0' label='' />
|
||||
<entry displayValue='0.0' pixelValue='15'/>
|
||||
<entry displayValue='0.3' pixelValue='31'/>
|
||||
<entry displayValue='0.6' pixelValue='47'/>
|
||||
<entry displayValue='1.0' pixelValue='63'/>
|
||||
<entry displayValue='1.5' pixelValue='79'/>
|
||||
<entry displayValue='2.0' pixelValue='95'/>
|
||||
<entry displayValue='2.5' pixelValue='111'/>
|
||||
<entry displayValue='3.0' pixelValue='127'/>
|
||||
<entry displayValue='4.0' pixelValue='143'/>
|
||||
<entry displayValue='5.0' pixelValue='159'/>
|
||||
<entry displayValue='6.0' pixelValue='175'/>
|
||||
<entry displayValue='8.0' pixelValue='191'/>
|
||||
<entry displayValue='10.0' pixelValue='207'/>
|
||||
<entry displayValue='12.0' pixelValue='223'/>
|
||||
<entry displayValue='0.0' pixelValue='16'/>
|
||||
<entry displayValue='0.3' pixelValue='32'/>
|
||||
<entry displayValue='0.6' pixelValue='48'/>
|
||||
<entry displayValue='1.0' pixelValue='64'/>
|
||||
<entry displayValue='1.5' pixelValue='80'/>
|
||||
<entry displayValue='2.0' pixelValue='96'/>
|
||||
<entry displayValue='2.5' pixelValue='112'/>
|
||||
<entry displayValue='3.0' pixelValue='128'/>
|
||||
<entry displayValue='4.0' pixelValue='144'/>
|
||||
<entry displayValue='5.0' pixelValue='160'/>
|
||||
<entry displayValue='6.0' pixelValue='176'/>
|
||||
<entry displayValue='8.0' pixelValue='192'/>
|
||||
<entry displayValue='10.0' pixelValue='208'/>
|
||||
<entry displayValue='12.0' pixelValue='224'/>
|
||||
<entry displayValue='15.0' pixelValue='240'/>
|
||||
<entry displayValue='9999.0' pixelValue='255' label='' />
|
||||
</dataMapping>
|
||||
|
@ -189,19 +189,19 @@ be put in localization.
|
|||
<defaultColormap>ffmp/rate</defaultColormap>
|
||||
<dataMapping>
|
||||
<entry displayValue='-9999.0' pixelValue='0' label='' />
|
||||
<entry displayValue='0.0' pixelValue='15'/>
|
||||
<entry displayValue='0.1' pixelValue='31'/>
|
||||
<entry displayValue='0.2' pixelValue='47'/>
|
||||
<entry displayValue='0.4' pixelValue='63'/>
|
||||
<entry displayValue='0.6' pixelValue='79'/>
|
||||
<entry displayValue='0.8' pixelValue='95'/>
|
||||
<entry displayValue='1.0' pixelValue='111'/>
|
||||
<entry displayValue='1.25' pixelValue='127'/>
|
||||
<entry displayValue='1.5' pixelValue='143'/>
|
||||
<entry displayValue='1.75' pixelValue='159'/>
|
||||
<entry displayValue='2.0' pixelValue='175'/>
|
||||
<entry displayValue='3.0' pixelValue='191'/>
|
||||
<entry displayValue='4.0' pixelValue='207'/>
|
||||
<entry displayValue='0.0' pixelValue='16'/>
|
||||
<entry displayValue='0.1' pixelValue='32'/>
|
||||
<entry displayValue='0.2' pixelValue='48'/>
|
||||
<entry displayValue='0.4' pixelValue='64'/>
|
||||
<entry displayValue='0.6' pixelValue='80'/>
|
||||
<entry displayValue='0.8' pixelValue='96'/>
|
||||
<entry displayValue='1.0' pixelValue='112'/>
|
||||
<entry displayValue='1.25' pixelValue='128'/>
|
||||
<entry displayValue='1.5' pixelValue='144'/>
|
||||
<entry displayValue='1.75' pixelValue='160'/>
|
||||
<entry displayValue='2.0' pixelValue='176'/>
|
||||
<entry displayValue='3.0' pixelValue='192'/>
|
||||
<entry displayValue='4.0' pixelValue='208'/>
|
||||
<entry displayValue='5.0' pixelValue='223'/>
|
||||
<entry displayValue='6.0' pixelValue='240'/>
|
||||
<entry displayValue='9999.0' pixelValue='255' label='' />
|
||||
|
@ -218,19 +218,19 @@ be put in localization.
|
|||
<defaultColormap>ffmp/ratio</defaultColormap>
|
||||
<dataMapping>
|
||||
<entry displayValue='-9999.0' pixelValue='0' label=''/>
|
||||
<entry displayValue='0.0' pixelValue='15'/>
|
||||
<entry displayValue='10.0' pixelValue='31'/>
|
||||
<entry displayValue='20.0' pixelValue='47'/>
|
||||
<entry displayValue='30.0' pixelValue='63'/>
|
||||
<entry displayValue='40.0' pixelValue='79'/>
|
||||
<entry displayValue='50.0' pixelValue='95'/>
|
||||
<entry displayValue='60.0' pixelValue='111'/>
|
||||
<entry displayValue='70.0' pixelValue='127'/>
|
||||
<entry displayValue='75.0' pixelValue='143'/>
|
||||
<entry displayValue='80.0' pixelValue='159'/>
|
||||
<entry displayValue='85.0' pixelValue='175'/>
|
||||
<entry displayValue='90.0' pixelValue='191'/>
|
||||
<entry displayValue='95.0' pixelValue='207'/>
|
||||
<entry displayValue='0.0' pixelValue='16'/>
|
||||
<entry displayValue='10.0' pixelValue='32'/>
|
||||
<entry displayValue='20.0' pixelValue='48'/>
|
||||
<entry displayValue='30.0' pixelValue='64'/>
|
||||
<entry displayValue='40.0' pixelValue='80'/>
|
||||
<entry displayValue='50.0' pixelValue='96'/>
|
||||
<entry displayValue='60.0' pixelValue='112'/>
|
||||
<entry displayValue='70.0' pixelValue='128'/>
|
||||
<entry displayValue='75.0' pixelValue='144'/>
|
||||
<entry displayValue='80.0' pixelValue='160'/>
|
||||
<entry displayValue='85.0' pixelValue='176'/>
|
||||
<entry displayValue='90.0' pixelValue='192'/>
|
||||
<entry displayValue='95.0' pixelValue='208'/>
|
||||
<entry displayValue='100.0' pixelValue='223'/>
|
||||
<entry displayValue='200.0' pixelValue='240'/>
|
||||
<entry displayValue='9999.0' pixelValue='255' label=''/>
|
||||
|
@ -247,20 +247,20 @@ be put in localization.
|
|||
<defaultColormap>ffmp/diff</defaultColormap>
|
||||
<dataMapping>
|
||||
<entry displayValue='-999' pixelValue='0' label=''/>
|
||||
<entry displayValue='-7' pixelValue='15'/>
|
||||
<entry displayValue='-6' pixelValue='31'/>
|
||||
<entry displayValue='-5' pixelValue='47'/>
|
||||
<entry displayValue='-4' pixelValue='63'/>
|
||||
<entry displayValue='-3' pixelValue='79'/>
|
||||
<entry displayValue='-2' pixelValue='95'/>
|
||||
<entry displayValue='-1' pixelValue='111'/>
|
||||
<entry displayValue='0' pixelValue='127'/>
|
||||
<entry displayValue='1' pixelValue='143'/>
|
||||
<entry displayValue='2' pixelValue='159'/>
|
||||
<entry displayValue='3' pixelValue='175'/>
|
||||
<entry displayValue='4' pixelValue='191'/>
|
||||
<entry displayValue='5' pixelValue='207'/>
|
||||
<entry displayValue='6' pixelValue='223'/>
|
||||
<entry displayValue='-7' pixelValue='16'/>
|
||||
<entry displayValue='-6' pixelValue='32'/>
|
||||
<entry displayValue='-5' pixelValue='48'/>
|
||||
<entry displayValue='-4' pixelValue='64'/>
|
||||
<entry displayValue='-3' pixelValue='80'/>
|
||||
<entry displayValue='-2' pixelValue='96'/>
|
||||
<entry displayValue='-1' pixelValue='112'/>
|
||||
<entry displayValue='0' pixelValue='128'/>
|
||||
<entry displayValue='1' pixelValue='144'/>
|
||||
<entry displayValue='2' pixelValue='160'/>
|
||||
<entry displayValue='3' pixelValue='176'/>
|
||||
<entry displayValue='4' pixelValue='192'/>
|
||||
<entry displayValue='5' pixelValue='208'/>
|
||||
<entry displayValue='6' pixelValue='224'/>
|
||||
<entry displayValue='7' pixelValue='240'/>
|
||||
<entry displayValue='999' pixelValue='255' label=''/>
|
||||
</dataMapping>
|
||||
|
|
|
@ -137,7 +137,6 @@ public class FFMPMonitor extends ResourceMonitor implements
|
|||
|
||||
public ArrayList<Date> dataTimes = null;
|
||||
|
||||
private FFMPTimeWindow rateWindow = null;
|
||||
private FFMPTimeWindow qpfWindow = null;
|
||||
private FFMPTimeWindow qpeWindow = null;
|
||||
//DR 14511: Data retrieval uses Job. VizApp.runAsync() uses GUI thread
|
||||
|
@ -1606,20 +1605,12 @@ public class FFMPMonitor extends ResourceMonitor implements
|
|||
String siteKey) {
|
||||
FFMPTimeWindow window = new FFMPTimeWindow();
|
||||
long lwindow = getSourceTimeWindow(sourceName, siteKey);
|
||||
window.setAfterTime(new Date(date.getTime() + lwindow));
|
||||
window.setBeforeTime(new Date(date.getTime() - lwindow));
|
||||
window.setAfterTime(new Date(date.getTime() - lwindow));
|
||||
window.setBeforeTime(new Date(date.getTime() + lwindow));
|
||||
|
||||
return window;
|
||||
}
|
||||
|
||||
public FFMPTimeWindow getRateWindow() {
|
||||
return rateWindow;
|
||||
}
|
||||
|
||||
public void setRateWindow(FFMPTimeWindow rateWindow) {
|
||||
this.rateWindow = rateWindow;
|
||||
}
|
||||
|
||||
public FFMPTimeWindow getQpfWindow() {
|
||||
return qpfWindow;
|
||||
}
|
||||
|
|
|
@ -309,6 +309,8 @@ public class AttributesDlg extends CaveSWTDialog {
|
|||
for (Button button: qpfRdoBtns) {
|
||||
if (button.getSelection()) {
|
||||
qpfType = button.getText();
|
||||
// split window requires redraw on change
|
||||
updateData = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -569,6 +569,9 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
});
|
||||
if (sourceMenuItems.contains(guidMenu.getText()) == false) {
|
||||
sourceMenuItems.add(guidMenu);
|
||||
// selects at least one as default
|
||||
ffmpConfig.getFFMPConfigData().setGuidSrc(guidMenu.getText());
|
||||
fireConfigUpdateEvent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1186,7 +1189,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
shell.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
|
||||
updateTimeDurationLabel(val, split);
|
||||
if (dialogInitialized) {
|
||||
fireTimeChangedEvent(val);
|
||||
fireTimeChangedEvent(val, split);
|
||||
}
|
||||
updateD2DRefresh();
|
||||
}
|
||||
|
@ -1314,7 +1317,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
ffmpListeners.remove(fl);
|
||||
}
|
||||
|
||||
public void fireTimeChangedEvent(double newTime) {
|
||||
public void fireTimeChangedEvent(double newTime, boolean split) {
|
||||
|
||||
FFMPRecord.FIELDS field = FFMPRecord.FIELDS.QPE;
|
||||
|
||||
|
@ -1326,7 +1329,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
}
|
||||
|
||||
if (time != newTime) {
|
||||
FFMPTimeChangeEvent ftce = new FFMPTimeChangeEvent(newTime);
|
||||
FFMPTimeChangeEvent ftce = new FFMPTimeChangeEvent(newTime, split);
|
||||
Iterator<FFMPListener> iter = ffmpListeners.iterator();
|
||||
while (iter.hasNext()) {
|
||||
try {
|
||||
|
@ -1404,7 +1407,9 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
if (!selected) {
|
||||
cwas.remove(cwa);
|
||||
} else {
|
||||
cwas.add(cwa);
|
||||
if (!cwas.contains(cwa)) {
|
||||
cwas.add(cwa);
|
||||
}
|
||||
}
|
||||
|
||||
FFMPCWAChangeEvent fcce = new FFMPCWAChangeEvent(cwas);
|
||||
|
@ -1654,20 +1659,20 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
|
||||
if (!ffmpTable.isDisposed()) {
|
||||
this.mainTableData = tData;
|
||||
System.out.println("---" + tData.getTableRows().size());
|
||||
//System.out.println("---" + tData.getTableRows().size());
|
||||
ffmpTable.clearTableSelection();
|
||||
long time = System.currentTimeMillis();
|
||||
//long time = System.currentTimeMillis();
|
||||
ffmpTable
|
||||
.setCenteredAggregationKey(resource.centeredAggregationKey);
|
||||
ffmpTable.setTableData(mainTableData);
|
||||
long time1 = System.currentTimeMillis();
|
||||
//long time1 = System.currentTimeMillis();
|
||||
|
||||
resetCursor();
|
||||
shell.pack();
|
||||
shell.redraw();
|
||||
|
||||
System.out
|
||||
.println("Time to load Data into table " + (time1 - time));
|
||||
//System.out
|
||||
// .println("Time to load Data into table " + (time1 - time));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1764,7 +1769,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements
|
|||
*/
|
||||
timeDurScale.setTimeDurationAndUpdate(ffmpConfig.getFFMPConfigData()
|
||||
.getTimeFrame());
|
||||
fireTimeChangedEvent(ffmpConfig.getFFMPConfigData().getTimeFrame());
|
||||
fireTimeChangedEvent(ffmpConfig.getFFMPConfigData().getTimeFrame(), false);
|
||||
|
||||
/*
|
||||
* Layer
|
||||
|
|
|
@ -21,6 +21,8 @@ package com.raytheon.uf.viz.monitor.ffmp.ui.listeners;
|
|||
|
||||
import java.util.EventObject;
|
||||
|
||||
import com.raytheon.uf.viz.monitor.ffmp.ui.rsc.FFMPTime;
|
||||
|
||||
/**
|
||||
*
|
||||
* Hour slider Update Event
|
||||
|
@ -43,7 +45,7 @@ public class FFMPTimeChangeEvent extends EventObject {
|
|||
*/
|
||||
private static final long serialVersionUID = 189898618L;
|
||||
|
||||
public FFMPTimeChangeEvent(double time) {
|
||||
super(time);
|
||||
public FFMPTimeChangeEvent(double time, boolean split) {
|
||||
super(new FFMPTime(time, split));
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -207,7 +207,7 @@ public class FFMPResource extends
|
|||
private IShadedShape streamShadedShape = null;
|
||||
|
||||
/** always the same vertexes, one for each CWA **/
|
||||
private FFMPShapeContainer shadedShapes = new FFMPShapeContainer();
|
||||
private FFMPShapeContainer shadedShapes = new FFMPShapeContainer();
|
||||
|
||||
/** Basin shaded shape **/
|
||||
protected ConcurrentHashMap<DataTime, FFMPDrawable> drawables = new ConcurrentHashMap<DataTime, FFMPDrawable>();
|
||||
|
@ -298,6 +298,9 @@ public class FFMPResource extends
|
|||
/** show ffmp color display */
|
||||
private boolean showFfmpData = true;
|
||||
|
||||
/** qpf split window */
|
||||
private boolean isSplit = false;
|
||||
|
||||
/** aggregation for centering **/
|
||||
public Object centeredAggregationKey = null;
|
||||
|
||||
|
@ -1275,7 +1278,7 @@ public class FFMPResource extends
|
|||
}
|
||||
|
||||
// the product string
|
||||
if (isFfmpDataToggle()) {
|
||||
if (isFfmpDataToggle() && fieldDescString != null) {
|
||||
paintProductString(aTarget, paintProps);
|
||||
}
|
||||
}
|
||||
|
@ -1463,7 +1466,13 @@ public class FFMPResource extends
|
|||
|
||||
@Override
|
||||
public void project(CoordinateReferenceSystem mapData) throws VizException {
|
||||
clear();
|
||||
|
||||
if (shadedShapes != null) {
|
||||
shadedShapes.clear();
|
||||
}
|
||||
|
||||
setQuery(true);
|
||||
refresh();
|
||||
}
|
||||
|
||||
protected String getGeometryType() {
|
||||
|
@ -1534,8 +1543,13 @@ public class FFMPResource extends
|
|||
try {
|
||||
FFMPBasinMetaData metaBasin = monitor.getTemplates(getSiteKey())
|
||||
.findBasinByLatLon(getSiteKey(), coord.asLatLon());
|
||||
if (getHuc().equals("ALL") || (centeredAggregationKey != null)) {
|
||||
if (getHuc().equals("ALL") || centeredAggregationKey != null) {
|
||||
pfaf = metaBasin.getPfaf();
|
||||
if (isMaintainLayer) {
|
||||
pfaf = monitor.getTemplates(getSiteKey()).findAggregatedPfaf(
|
||||
pfaf, getSiteKey(), getHuc());
|
||||
aggregate = true;
|
||||
}
|
||||
} else {
|
||||
pfaf = monitor.getTemplates(getSiteKey()).findAggregatedPfaf(
|
||||
metaBasin.getPfaf(), getSiteKey(), getHuc());
|
||||
|
@ -1956,6 +1970,8 @@ public class FFMPResource extends
|
|||
for (Entry<DataTime, FFMPDrawable> entry : drawables.entrySet()) {
|
||||
entry.getValue().dispose();
|
||||
}
|
||||
|
||||
drawables.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2502,11 +2518,11 @@ public class FFMPResource extends
|
|||
// the
|
||||
// the basin when the color map changes.
|
||||
if (globalRegen || drawable.genCwa(cwa)) {
|
||||
// System.out
|
||||
// .println("Regenerating the entire image: CWA: +"
|
||||
// + cwa
|
||||
// + " Table:"
|
||||
// + resourceData.tableLoad);
|
||||
//System.out
|
||||
//.println("Regenerating the entire image: CWA: +"
|
||||
//+ cwa
|
||||
//+ " Table:"
|
||||
//+ resourceData.tableLoad);
|
||||
// get base aggr basins that are in screen area
|
||||
Set<Long> cwaPfafs = null;
|
||||
cwaPfafs = getAreaBasins(cwa, req, phuc);
|
||||
|
@ -2980,7 +2996,6 @@ public class FFMPResource extends
|
|||
}
|
||||
|
||||
updateDialog();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -2990,18 +3005,25 @@ public class FFMPResource extends
|
|||
centeredAggregationKey = null;
|
||||
centeredAggregatePfafList = null;
|
||||
|
||||
hucChanged();
|
||||
if (isAutoRefresh) {
|
||||
hucChanged();
|
||||
refresh();
|
||||
}
|
||||
|
||||
updateDialog();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void timeChanged(FFMPTimeChangeEvent fhce, FFMPRecord.FIELDS fieldArg)
|
||||
throws VizException {
|
||||
|
||||
if ((Double) fhce.getSource() != time) {
|
||||
FFMPTime ffmpTime = (FFMPTime) fhce.getSource();
|
||||
|
||||
setTime((Double) fhce.getSource());
|
||||
if (ffmpTime.getTime() != time || isSplit != ffmpTime.isSplit()) {
|
||||
|
||||
isSplit = ffmpTime.isSplit();
|
||||
setTime(ffmpTime.getTime());
|
||||
setTableTime();
|
||||
if (interpolationMap != null) {
|
||||
interpolationMap.clear();
|
||||
|
@ -3824,6 +3846,10 @@ public class FFMPResource extends
|
|||
return isLinkToFrame;
|
||||
}
|
||||
|
||||
public boolean isSplit() {
|
||||
return isSplit;
|
||||
}
|
||||
|
||||
/**
|
||||
* gets the list of the current centered agg
|
||||
*
|
||||
|
|
|
@ -107,4 +107,12 @@ public class FFMPShapeContainer {
|
|||
return shape;
|
||||
}
|
||||
|
||||
/**
|
||||
* clears the shapes
|
||||
* @return
|
||||
*/
|
||||
public void clear() {
|
||||
shadedShapes.clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ public class FFMPTableDataLoader implements Runnable {
|
|||
}
|
||||
if (drawable.getTableData(iHuc) != null) {
|
||||
|
||||
System.out.println(" Cache HITTTTTTTTT!!!!!");
|
||||
//System.out.println(" Cache HITTTTTTTTT!!!!!");
|
||||
tData = drawable.getTableData(iHuc);
|
||||
}
|
||||
}
|
||||
|
@ -140,8 +140,8 @@ public class FFMPTableDataLoader implements Runnable {
|
|||
iHuc = "ALL";
|
||||
}
|
||||
|
||||
System.out
|
||||
.println(" Cache MISSSSSSSSSSSS!!!!!");
|
||||
//System.out
|
||||
// .println(" Cache MISSSSSSSSSSSS!!!!!");
|
||||
FFMPDataGenerator dg = new FFMPDataGenerator(
|
||||
ffmp, resource);
|
||||
tData = dg.generateFFMPData();
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
package com.raytheon.uf.viz.monitor.ffmp.ui.rsc;
|
||||
|
||||
/**
|
||||
* Time object
|
||||
*
|
||||
* <pre>
|
||||
* SOFTWARE HISTORY
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 22 April, 2012 2521 dhladky Initial creation
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
|
||||
public class FFMPTime {
|
||||
|
||||
public double time = 0.0;
|
||||
public boolean split = false;
|
||||
|
||||
public FFMPTime(double time, boolean split) {
|
||||
this.time = time;
|
||||
this.split = split;
|
||||
}
|
||||
|
||||
public double getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public boolean isSplit() {
|
||||
return split;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -113,7 +113,6 @@ public class AreaContainer {
|
|||
|
||||
if (report == null) {
|
||||
report = new ObReport();
|
||||
report.init();
|
||||
}
|
||||
|
||||
return report;
|
||||
|
|
|
@ -175,11 +175,11 @@ public class ObReport {
|
|||
|
||||
// Public constructor
|
||||
public ObReport() {
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
// Initializer of report
|
||||
public void init() {
|
||||
private void init() {
|
||||
|
||||
Date now = SimulatedTime.getSystemTime().getTime();
|
||||
Calendar deltaTime = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
|
||||
|
|
|
@ -87,7 +87,6 @@ public class ObStnHourReports {
|
|||
ObReport report = null;
|
||||
if ( stnReports.isEmpty() ) { // empty report for empty/default row in station table
|
||||
report = new ObReport();
|
||||
report.init();
|
||||
} else {
|
||||
report = stnReports.get(stnReports.lastKey());
|
||||
}
|
||||
|
|
|
@ -91,7 +91,6 @@ public class ObZoneHourReports {
|
|||
|
||||
private void InitWorstValues() {
|
||||
worstValues = new ObReport();
|
||||
worstValues.init();
|
||||
worstValues.setZoneId(zone); // the ObReport's init() sets "zone id" to "" !!!
|
||||
}
|
||||
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.raytheon.uf.viz.npp.feature</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.FeatureBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.FeatureNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -1 +0,0 @@
|
|||
bin.includes = feature.xml
|
|
@ -1,40 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature
|
||||
id="com.raytheon.uf.viz.npp.feature"
|
||||
label="NPP Data 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.eclipse.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"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.common.dataplugin.npp.viirs"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="com.raytheon.uf.viz.npp.viirs"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
</feature>
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -1,34 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>com.raytheon.uf.viz.npp.viirs</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -1,8 +0,0 @@
|
|||
#Wed Nov 30 13:51:22 CST 2011
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
|
@ -1,23 +0,0 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: VIIRS Satellite
|
||||
Bundle-SymbolicName: com.raytheon.uf.viz.npp.viirs;singleton:=true
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-Activator: com.raytheon.uf.viz.npp.viirs.Activator
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Eclipse-RegisterBuddy: com.raytheon.uf.viz.core
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.core.runtime,
|
||||
com.raytheon.uf.viz.core;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.time;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.geospatial;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.colormap;bundle-version="1.12.1174",
|
||||
org.geotools;bundle-version="2.6.4",
|
||||
com.raytheon.uf.common.datastorage;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.datastorage.hdf5;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.dataplugin.npp.viirs;bundle-version="1.0.0",
|
||||
javax.measure;bundle-version="1.0.0",
|
||||
com.raytheon.uf.viz.productbrowser;bundle-version="1.12.1174"
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Bundle-ActivationPolicy: lazy
|
|
@ -1 +0,0 @@
|
|||
com.raytheon.uf.viz.npp.viirs.rsc.VIIRSResourceData
|
|
@ -1,6 +0,0 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
plugin.xml,\
|
||||
localization/
|
|
@ -1,259 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<colorMap xmlns:ns2="group" xmlns:ns3="http://www.example.org/productType">
|
||||
<color r="1.0" g="1.0" b="1.0" a="1.0"/>
|
||||
<color r="0.09803922" g="0.0" b="0.039215688" a="1.0"/>
|
||||
<color r="0.21176471" g="0.0" b="0.09411765" a="1.0"/>
|
||||
<color r="0.31764707" g="0.0" b="0.14117648" a="1.0"/>
|
||||
<color r="0.43137255" g="0.0" b="0.2" a="1.0"/>
|
||||
<color r="0.54509807" g="0.0" b="0.25490198" a="1.0"/>
|
||||
<color r="0.6509804" g="0.0" b="0.30980393" a="1.0"/>
|
||||
<color r="0.7529412" g="0.0" b="0.35686275" a="1.0"/>
|
||||
<color r="0.85882354" g="0.0" b="0.41568628" a="1.0"/>
|
||||
<color r="0.972549" g="0.0" b="0.46666667" a="1.0"/>
|
||||
<color r="0.0" g="0.0" b="0.4" a="1.0"/>
|
||||
<color r="0.0" g="0.0" b="0.46666667" a="1.0"/>
|
||||
<color r="0.0" g="0.0" b="0.53333336" a="1.0"/>
|
||||
<color r="0.0" g="0.0" b="0.5921569" a="1.0"/>
|
||||
<color r="0.0" g="0.0" b="0.6509804" a="1.0"/>
|
||||
<color r="0.0" g="0.0" b="0.7137255" a="1.0"/>
|
||||
<color r="0.003921569" g="0.0" b="0.77254903" a="1.0"/>
|
||||
<color r="0.003921569" g="0.0" b="0.8392157" a="1.0"/>
|
||||
<color r="0.003921569" g="0.0" b="0.90588236" a="1.0"/>
|
||||
<color r="0.003921569" g="0.0" b="0.972549" a="1.0"/>
|
||||
<color r="0.84705883" g="0.84705883" b="0.84705883" a="1.0"/>
|
||||
<color r="0.7294118" g="0.7137255" b="0.7137255" a="1.0"/>
|
||||
<color r="0.62352943" g="0.60784316" b="0.60784316" a="1.0"/>
|
||||
<color r="0.5058824" g="0.4862745" b="0.4862745" a="1.0"/>
|
||||
<color r="0.3764706" g="0.35686275" b="0.35686275" a="1.0"/>
|
||||
<color r="0.25882354" g="0.23137255" b="0.23137255" a="1.0"/>
|
||||
<color r="0.14117648" g="0.105882354" b="0.105882354" a="1.0"/>
|
||||
<color r="0.023529412" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="0.43529412" b="0.0" a="1.0"/>
|
||||
<color r="0.003921569" g="0.49411765" b="0.0" a="1.0"/>
|
||||
<color r="0.003921569" g="0.54901963" b="0.0" a="1.0"/>
|
||||
<color r="0.015686275" g="0.60784316" b="0.0" a="1.0"/>
|
||||
<color r="0.019607844" g="0.6509804" b="0.0" a="1.0"/>
|
||||
<color r="0.019607844" g="0.69803923" b="0.0" a="1.0"/>
|
||||
<color r="0.023529412" g="0.75686276" b="0.0" a="1.0"/>
|
||||
<color r="0.03529412" g="0.8117647" b="0.0" a="1.0"/>
|
||||
<color r="0.03529412" g="0.8627451" b="0.0" a="1.0"/>
|
||||
<color r="0.039215688" g="0.91764706" b="0.0" a="1.0"/>
|
||||
<color r="0.047058824" g="0.972549" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="0.78039217" b="0.8156863" a="1.0"/>
|
||||
<color r="0.0" g="0.7372549" b="0.7882353" a="1.0"/>
|
||||
<color r="0.0" g="0.69803923" b="0.75686276" a="1.0"/>
|
||||
<color r="0.0" g="0.6666667" b="0.7372549" a="1.0"/>
|
||||
<color r="0.0" g="0.62352943" b="0.70980394" a="1.0"/>
|
||||
<color r="0.0" g="0.58431375" b="0.68235296" a="1.0"/>
|
||||
<color r="0.0" g="0.54509807" b="0.6666667" a="1.0"/>
|
||||
<color r="0.0" g="0.49411765" b="0.6392157" a="1.0"/>
|
||||
<color r="0.0" g="0.45882353" b="0.6117647" a="1.0"/>
|
||||
<color r="0.0" g="0.41568628" b="0.5921569" a="1.0"/>
|
||||
<color r="0.0" g="0.37254903" b="0.5647059" a="1.0"/>
|
||||
<color r="0.54901963" g="0.0" b="0.5529412" a="1.0"/>
|
||||
<color r="0.5921569" g="0.0" b="0.60784316" a="1.0"/>
|
||||
<color r="0.63529414" g="0.0" b="0.6509804" a="1.0"/>
|
||||
<color r="0.6784314" g="0.0" b="0.68235296" a="1.0"/>
|
||||
<color r="0.7137255" g="0.0" b="0.7372549" a="1.0"/>
|
||||
<color r="0.76862746" g="0.0" b="0.78039217" a="1.0"/>
|
||||
<color r="0.8156863" g="0.0" b="0.83137256" a="1.0"/>
|
||||
<color r="0.85882354" g="0.0" b="0.8745098" a="1.0"/>
|
||||
<color r="0.90588236" g="0.0" b="0.92156863" a="1.0"/>
|
||||
<color r="0.9490196" g="0.0" b="0.972549" a="1.0"/>
|
||||
<color r="0.92941177" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="0.8862745" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="0.8392157" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="0.8" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="0.75686276" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="0.7137255" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="0.68235296" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="0.6431373" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="0.60784316" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="0.5647059" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="0.37254903" g="0.35686275" b="0.0" a="1.0"/>
|
||||
<color r="0.40784314" g="0.4" b="0.0" a="1.0"/>
|
||||
<color r="0.4509804" g="0.44705883" b="0.0" a="1.0"/>
|
||||
<color r="0.49019608" g="0.4862745" b="0.0" a="1.0"/>
|
||||
<color r="0.53333336" g="0.52156866" b="0.0" a="1.0"/>
|
||||
<color r="0.5764706" g="0.5647059" b="0.0" a="1.0"/>
|
||||
<color r="0.6117647" g="0.60784316" b="0.0" a="1.0"/>
|
||||
<color r="0.6509804" g="0.6392157" b="0.0" a="1.0"/>
|
||||
<color r="0.68235296" g="0.6784314" b="0.0" a="1.0"/>
|
||||
<color r="0.72156864" g="0.7137255" b="0.0" a="1.0"/>
|
||||
<color r="0.76862746" g="0.75686276" b="0.0" a="1.0"/>
|
||||
<color r="0.8039216" g="0.79607844" b="0.0" a="1.0"/>
|
||||
<color r="0.84705883" g="0.83137256" b="0.0" a="1.0"/>
|
||||
<color r="0.8901961" g="0.8745098" b="0.0" a="1.0"/>
|
||||
<color r="0.93333334" g="0.9137255" b="0.0" a="1.0"/>
|
||||
<color r="0.972549" g="0.9490196" b="0.0" a="1.0"/>
|
||||
<color r="0.98039216" g="0.98039216" b="0.98039216" a="1.0"/>
|
||||
<color r="0.9764706" g="0.9764706" b="0.9764706" a="1.0"/>
|
||||
<color r="0.972549" g="0.972549" b="0.972549" a="1.0"/>
|
||||
<color r="0.9607843" g="0.9607843" b="0.9607843" a="1.0"/>
|
||||
<color r="0.9607843" g="0.9607843" b="0.9607843" a="1.0"/>
|
||||
<color r="0.9490196" g="0.9490196" b="0.9490196" a="1.0"/>
|
||||
<color r="0.94509804" g="0.94509804" b="0.94509804" a="1.0"/>
|
||||
<color r="0.9372549" g="0.9372549" b="0.9372549" a="1.0"/>
|
||||
<color r="0.93333334" g="0.93333334" b="0.93333334" a="1.0"/>
|
||||
<color r="0.92941177" g="0.92941177" b="0.92941177" a="1.0"/>
|
||||
<color r="0.92156863" g="0.92156863" b="0.92156863" a="1.0"/>
|
||||
<color r="0.91764706" g="0.91764706" b="0.91764706" a="1.0"/>
|
||||
<color r="0.9137255" g="0.9137255" b="0.9137255" a="1.0"/>
|
||||
<color r="0.9019608" g="0.9019608" b="0.9019608" a="1.0"/>
|
||||
<color r="0.9019608" g="0.9019608" b="0.9019608" a="1.0"/>
|
||||
<color r="0.8901961" g="0.8901961" b="0.8901961" a="1.0"/>
|
||||
<color r="0.8862745" g="0.8862745" b="0.8862745" a="1.0"/>
|
||||
<color r="0.8784314" g="0.8784314" b="0.8784314" a="1.0"/>
|
||||
<color r="0.8745098" g="0.8745098" b="0.8745098" a="1.0"/>
|
||||
<color r="0.87058824" g="0.87058824" b="0.87058824" a="1.0"/>
|
||||
<color r="0.8627451" g="0.8627451" b="0.8627451" a="1.0"/>
|
||||
<color r="0.85882354" g="0.85882354" b="0.85882354" a="1.0"/>
|
||||
<color r="0.85490197" g="0.85490197" b="0.85490197" a="1.0"/>
|
||||
<color r="0.84313726" g="0.84313726" b="0.84313726" a="1.0"/>
|
||||
<color r="0.84313726" g="0.84313726" b="0.84313726" a="1.0"/>
|
||||
<color r="0.83137256" g="0.83137256" b="0.83137256" a="1.0"/>
|
||||
<color r="0.827451" g="0.827451" b="0.827451" a="1.0"/>
|
||||
<color r="0.81960785" g="0.81960785" b="0.81960785" a="1.0"/>
|
||||
<color r="0.8156863" g="0.8156863" b="0.8156863" a="1.0"/>
|
||||
<color r="0.8117647" g="0.8117647" b="0.8117647" a="1.0"/>
|
||||
<color r="0.8039216" g="0.8039216" b="0.8039216" a="1.0"/>
|
||||
<color r="0.8" g="0.8" b="0.8" a="1.0"/>
|
||||
<color r="0.79607844" g="0.79607844" b="0.79607844" a="1.0"/>
|
||||
<color r="0.78431374" g="0.78431374" b="0.78431374" a="1.0"/>
|
||||
<color r="0.78431374" g="0.78431374" b="0.78431374" a="1.0"/>
|
||||
<color r="0.77254903" g="0.77254903" b="0.77254903" a="1.0"/>
|
||||
<color r="0.76862746" g="0.76862746" b="0.76862746" a="1.0"/>
|
||||
<color r="0.7607843" g="0.7607843" b="0.7607843" a="1.0"/>
|
||||
<color r="0.75686276" g="0.75686276" b="0.75686276" a="1.0"/>
|
||||
<color r="0.7529412" g="0.7529412" b="0.7529412" a="1.0"/>
|
||||
<color r="0.74509805" g="0.74509805" b="0.74509805" a="1.0"/>
|
||||
<color r="0.7411765" g="0.7411765" b="0.7411765" a="1.0"/>
|
||||
<color r="0.7372549" g="0.7372549" b="0.7372549" a="1.0"/>
|
||||
<color r="0.7254902" g="0.7254902" b="0.7254902" a="1.0"/>
|
||||
<color r="0.7254902" g="0.7254902" b="0.7254902" a="1.0"/>
|
||||
<color r="0.7137255" g="0.7137255" b="0.7137255" a="1.0"/>
|
||||
<color r="0.70980394" g="0.70980394" b="0.70980394" a="1.0"/>
|
||||
<color r="0.7019608" g="0.7019608" b="0.7019608" a="1.0"/>
|
||||
<color r="0.69803923" g="0.69803923" b="0.69803923" a="1.0"/>
|
||||
<color r="0.69411767" g="0.69411767" b="0.69411767" a="1.0"/>
|
||||
<color r="0.6862745" g="0.6862745" b="0.6862745" a="1.0"/>
|
||||
<color r="0.68235296" g="0.68235296" b="0.68235296" a="1.0"/>
|
||||
<color r="0.68235296" g="0.68235296" b="0.68235296" a="1.0"/>
|
||||
<color r="0.67058825" g="0.67058825" b="0.67058825" a="1.0"/>
|
||||
<color r="0.67058825" g="0.67058825" b="0.67058825" a="1.0"/>
|
||||
<color r="0.6627451" g="0.6627451" b="0.6627451" a="1.0"/>
|
||||
<color r="0.654902" g="0.654902" b="0.654902" a="1.0"/>
|
||||
<color r="0.6509804" g="0.6509804" b="0.6509804" a="1.0"/>
|
||||
<color r="0.6431373" g="0.6431373" b="0.6431373" a="1.0"/>
|
||||
<color r="0.6392157" g="0.6392157" b="0.6392157" a="1.0"/>
|
||||
<color r="0.627451" g="0.627451" b="0.627451" a="1.0"/>
|
||||
<color r="0.627451" g="0.627451" b="0.627451" a="1.0"/>
|
||||
<color r="0.61960787" g="0.61960787" b="0.61960787" a="1.0"/>
|
||||
<color r="0.6117647" g="0.6117647" b="0.6117647" a="1.0"/>
|
||||
<color r="0.60784316" g="0.60784316" b="0.60784316" a="1.0"/>
|
||||
<color r="0.6039216" g="0.6039216" b="0.6039216" a="1.0"/>
|
||||
<color r="0.59607846" g="0.59607846" b="0.59607846" a="1.0"/>
|
||||
<color r="0.5921569" g="0.5921569" b="0.5921569" a="1.0"/>
|
||||
<color r="0.58431375" g="0.58431375" b="0.58431375" a="1.0"/>
|
||||
<color r="0.5803922" g="0.5803922" b="0.5803922" a="1.0"/>
|
||||
<color r="0.5686275" g="0.5686275" b="0.5686275" a="1.0"/>
|
||||
<color r="0.5686275" g="0.5686275" b="0.5686275" a="1.0"/>
|
||||
<color r="0.56078434" g="0.56078434" b="0.56078434" a="1.0"/>
|
||||
<color r="0.5529412" g="0.5529412" b="0.5529412" a="1.0"/>
|
||||
<color r="0.54901963" g="0.54901963" b="0.54901963" a="1.0"/>
|
||||
<color r="0.54509807" g="0.54509807" b="0.54509807" a="1.0"/>
|
||||
<color r="0.5372549" g="0.5372549" b="0.5372549" a="1.0"/>
|
||||
<color r="0.53333336" g="0.53333336" b="0.53333336" a="1.0"/>
|
||||
<color r="0.5254902" g="0.5254902" b="0.5254902" a="1.0"/>
|
||||
<color r="0.52156866" g="0.52156866" b="0.52156866" a="1.0"/>
|
||||
<color r="0.50980395" g="0.50980395" b="0.50980395" a="1.0"/>
|
||||
<color r="0.50980395" g="0.50980395" b="0.50980395" a="1.0"/>
|
||||
<color r="0.5019608" g="0.5019608" b="0.5019608" a="1.0"/>
|
||||
<color r="0.49411765" g="0.49411765" b="0.49411765" a="1.0"/>
|
||||
<color r="0.49019608" g="0.49019608" b="0.49019608" a="1.0"/>
|
||||
<color r="0.4862745" g="0.4862745" b="0.4862745" a="1.0"/>
|
||||
<color r="0.47843137" g="0.47843137" b="0.47843137" a="1.0"/>
|
||||
<color r="0.4745098" g="0.4745098" b="0.4745098" a="1.0"/>
|
||||
<color r="0.46666667" g="0.46666667" b="0.46666667" a="1.0"/>
|
||||
<color r="0.4627451" g="0.4627451" b="0.4627451" a="1.0"/>
|
||||
<color r="0.4509804" g="0.4509804" b="0.4509804" a="1.0"/>
|
||||
<color r="0.4509804" g="0.4509804" b="0.4509804" a="1.0"/>
|
||||
<color r="0.44313726" g="0.44313726" b="0.44313726" a="1.0"/>
|
||||
<color r="0.43529412" g="0.43529412" b="0.43529412" a="1.0"/>
|
||||
<color r="0.43137255" g="0.43137255" b="0.43137255" a="1.0"/>
|
||||
<color r="0.42745098" g="0.42745098" b="0.42745098" a="1.0"/>
|
||||
<color r="0.41960785" g="0.41960785" b="0.41960785" a="1.0"/>
|
||||
<color r="0.41568628" g="0.41568628" b="0.41568628" a="1.0"/>
|
||||
<color r="0.40784314" g="0.40784314" b="0.40784314" a="1.0"/>
|
||||
<color r="0.40392157" g="0.40392157" b="0.40392157" a="1.0"/>
|
||||
<color r="0.39215687" g="0.39215687" b="0.39215687" a="1.0"/>
|
||||
<color r="0.39215687" g="0.39215687" b="0.39215687" a="1.0"/>
|
||||
<color r="0.38431373" g="0.38431373" b="0.38431373" a="1.0"/>
|
||||
<color r="0.3764706" g="0.3764706" b="0.3764706" a="1.0"/>
|
||||
<color r="0.37254903" g="0.37254903" b="0.37254903" a="1.0"/>
|
||||
<color r="0.36862746" g="0.36862746" b="0.36862746" a="1.0"/>
|
||||
<color r="0.36078432" g="0.36078432" b="0.36078432" a="1.0"/>
|
||||
<color r="0.35686275" g="0.35686275" b="0.35686275" a="1.0"/>
|
||||
<color r="0.34901962" g="0.34901962" b="0.34901962" a="1.0"/>
|
||||
<color r="0.34509805" g="0.34509805" b="0.34509805" a="1.0"/>
|
||||
<color r="0.33333334" g="0.33333334" b="0.33333334" a="1.0"/>
|
||||
<color r="0.33333334" g="0.33333334" b="0.33333334" a="1.0"/>
|
||||
<color r="0.3254902" g="0.3254902" b="0.3254902" a="1.0"/>
|
||||
<color r="0.31764707" g="0.31764707" b="0.31764707" a="1.0"/>
|
||||
<color r="0.3137255" g="0.3137255" b="0.3137255" a="1.0"/>
|
||||
<color r="0.3019608" g="0.3019608" b="0.3019608" a="1.0"/>
|
||||
<color r="0.3019608" g="0.3019608" b="0.3019608" a="1.0"/>
|
||||
<color r="0.2901961" g="0.2901961" b="0.2901961" a="1.0"/>
|
||||
<color r="0.2901961" g="0.2901961" b="0.2901961" a="1.0"/>
|
||||
<color r="0.28235295" g="0.28235295" b="0.28235295" a="1.0"/>
|
||||
<color r="0.27450982" g="0.27450982" b="0.27450982" a="1.0"/>
|
||||
<color r="0.27058825" g="0.27058825" b="0.27058825" a="1.0"/>
|
||||
<color r="0.26666668" g="0.26666668" b="0.26666668" a="1.0"/>
|
||||
<color r="0.25882354" g="0.25882354" b="0.25882354" a="1.0"/>
|
||||
<color r="0.25490198" g="0.25490198" b="0.25490198" a="1.0"/>
|
||||
<color r="0.24313726" g="0.24313726" b="0.24313726" a="1.0"/>
|
||||
<color r="0.24313726" g="0.24313726" b="0.24313726" a="1.0"/>
|
||||
<color r="0.23137255" g="0.23137255" b="0.23137255" a="1.0"/>
|
||||
<color r="0.23137255" g="0.23137255" b="0.23137255" a="1.0"/>
|
||||
<color r="0.22352941" g="0.22352941" b="0.22352941" a="1.0"/>
|
||||
<color r="0.21568628" g="0.21568628" b="0.21568628" a="1.0"/>
|
||||
<color r="0.21176471" g="0.21176471" b="0.21176471" a="1.0"/>
|
||||
<color r="0.20784314" g="0.20784314" b="0.20784314" a="1.0"/>
|
||||
<color r="0.2" g="0.2" b="0.2" a="1.0"/>
|
||||
<color r="0.19607843" g="0.19607843" b="0.19607843" a="1.0"/>
|
||||
<color r="0.18431373" g="0.18431373" b="0.18431373" a="1.0"/>
|
||||
<color r="0.18431373" g="0.18431373" b="0.18431373" a="1.0"/>
|
||||
<color r="0.17254902" g="0.17254902" b="0.17254902" a="1.0"/>
|
||||
<color r="0.17254902" g="0.17254902" b="0.17254902" a="1.0"/>
|
||||
<color r="0.16470589" g="0.16470589" b="0.16470589" a="1.0"/>
|
||||
<color r="0.15686275" g="0.15686275" b="0.15686275" a="1.0"/>
|
||||
<color r="0.15294118" g="0.15294118" b="0.15294118" a="1.0"/>
|
||||
<color r="0.14901961" g="0.14901961" b="0.14901961" a="1.0"/>
|
||||
<color r="0.14117648" g="0.14117648" b="0.14117648" a="1.0"/>
|
||||
<color r="0.13725491" g="0.13725491" b="0.13725491" a="1.0"/>
|
||||
<color r="0.1254902" g="0.1254902" b="0.1254902" a="1.0"/>
|
||||
<color r="0.1254902" g="0.1254902" b="0.1254902" a="1.0"/>
|
||||
<color r="0.11372549" g="0.11372549" b="0.11372549" a="1.0"/>
|
||||
<color r="0.11372549" g="0.11372549" b="0.11372549" a="1.0"/>
|
||||
<color r="0.105882354" g="0.105882354" b="0.105882354" a="1.0"/>
|
||||
<color r="0.09803922" g="0.09803922" b="0.09803922" a="1.0"/>
|
||||
<color r="0.09411765" g="0.09411765" b="0.09411765" a="1.0"/>
|
||||
<color r="0.09019608" g="0.09019608" b="0.09019608" a="1.0"/>
|
||||
<color r="0.08235294" g="0.08235294" b="0.08235294" a="1.0"/>
|
||||
<color r="0.078431375" g="0.078431375" b="0.078431375" a="1.0"/>
|
||||
<color r="0.06666667" g="0.06666667" b="0.06666667" a="1.0"/>
|
||||
<color r="0.06666667" g="0.06666667" b="0.06666667" a="1.0"/>
|
||||
<color r="0.05490196" g="0.05490196" b="0.05490196" a="1.0"/>
|
||||
<color r="0.05490196" g="0.05490196" b="0.05490196" a="1.0"/>
|
||||
<color r="0.047058824" g="0.047058824" b="0.047058824" a="1.0"/>
|
||||
<color r="0.039215688" g="0.039215688" b="0.039215688" a="1.0"/>
|
||||
<color r="0.03529412" g="0.03529412" b="0.03529412" a="1.0"/>
|
||||
<color r="0.03137255" g="0.03137255" b="0.03137255" a="1.0"/>
|
||||
<color r="0.023529412" g="0.023529412" b="0.023529412" a="1.0"/>
|
||||
<color r="0.019607844" g="0.019607844" b="0.019607844" a="1.0"/>
|
||||
<color r="0.007843138" g="0.007843138" b="0.007843138" a="1.0"/>
|
||||
<color r="0.007843138" g="0.007843138" b="0.007843138" a="1.0"/>
|
||||
<color r="0.0" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="0.0" b="0.0" a="1.0"/>
|
||||
<color r="0.0" g="0.0" b="0.0" a="0.0"/>
|
||||
</colorMap>
|
|
@ -1,38 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<?eclipse version="3.2"?>
|
||||
<plugin>
|
||||
<extension
|
||||
point="com.raytheon.uf.viz.core.resource">
|
||||
<resource
|
||||
class="com.raytheon.uf.viz.npp.viirs.rsc.VIIRSResource"
|
||||
name="VIIRS Imagery"
|
||||
renderingOrderId="IMAGE_COUNTRY"
|
||||
resourceType="PLAN_VIEW"/>
|
||||
</extension>
|
||||
<extension
|
||||
point="com.raytheon.uf.viz.productbrowser.dataDefinition">
|
||||
<dataDefinition
|
||||
class="com.raytheon.uf.viz.npp.viirs.VIIRSProductBrowserDefinition"
|
||||
name="com.raytheon.uf.viz.npp.viirs.viirsProductBrowserDefinition">
|
||||
</dataDefinition>
|
||||
</extension>
|
||||
</plugin>
|
|
@ -1,50 +0,0 @@
|
|||
package com.raytheon.uf.viz.npp.viirs;
|
||||
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
/**
|
||||
* The activator class controls the plug-in life cycle
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin {
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "com.raytheon.uf.viz.satellite.viirs"; //$NON-NLS-1$
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
plugin = this;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
super.stop(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
/**
|
||||
* 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.uf.viz.npp.viirs;
|
||||
|
||||
import com.raytheon.uf.common.time.BinOffset;
|
||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
import com.raytheon.uf.viz.npp.viirs.rsc.VIIRSResourceData;
|
||||
import com.raytheon.uf.viz.productbrowser.AbstractRequestableProductBrowserDataDefinition;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 6, 2011 mschenke Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class VIIRSProductBrowserDefinition extends
|
||||
AbstractRequestableProductBrowserDataDefinition<VIIRSResourceData> {
|
||||
|
||||
public VIIRSProductBrowserDefinition() {
|
||||
productName = "viirs";
|
||||
displayName = "VIIRS";
|
||||
order = new String[] { "pluginName", "commonData.region",
|
||||
"commonData.channelType", "wavelength" };
|
||||
order = getOrder();
|
||||
loadProperties = new LoadProperties();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.productbrowser.
|
||||
* AbstractRequestableProductBrowserDataDefinition#getResourceData()
|
||||
*/
|
||||
@Override
|
||||
public VIIRSResourceData getResourceData() {
|
||||
VIIRSResourceData resourceData = new VIIRSResourceData();
|
||||
resourceData.setBinOffset(new BinOffset(60 * 30, 60 * 30));
|
||||
return resourceData;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,135 +0,0 @@
|
|||
/**
|
||||
* 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.uf.viz.npp.viirs.rsc;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.nio.Buffer;
|
||||
import java.nio.ShortBuffer;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSDataRecord;
|
||||
import com.raytheon.uf.common.datastorage.DataStoreFactory;
|
||||
import com.raytheon.uf.common.datastorage.IDataStore;
|
||||
import com.raytheon.uf.common.datastorage.Request;
|
||||
import com.raytheon.uf.common.datastorage.records.IDataRecord;
|
||||
import com.raytheon.uf.common.datastorage.records.ShortDataRecord;
|
||||
import com.raytheon.uf.viz.core.HDF5Util;
|
||||
import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 30, 2011 mschenke Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class VIIRSDataCallback implements IColorMapDataRetrievalCallback {
|
||||
|
||||
private VIIRSDataRecord dataRecord;
|
||||
|
||||
private Rectangle validDataBounds;
|
||||
|
||||
public VIIRSDataCallback(VIIRSDataRecord dataRecord,
|
||||
Rectangle validDataBounds) {
|
||||
this.dataRecord = dataRecord;
|
||||
this.validDataBounds = validDataBounds;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback#getColorMapData
|
||||
* ()
|
||||
*/
|
||||
@Override
|
||||
public ColorMapData getColorMapData() throws VizException {
|
||||
try {
|
||||
int[] sizes = new int[] { validDataBounds.width,
|
||||
validDataBounds.height };
|
||||
IDataStore dataStore = DataStoreFactory.getDataStore(HDF5Util
|
||||
.findHDF5Location(dataRecord));
|
||||
IDataRecord rawData = dataStore.retrieve(dataRecord.getDataURI(),
|
||||
VIIRSDataRecord.getDataSet(0),
|
||||
Request.buildSlab(new int[] { 0, 0 }, sizes));
|
||||
|
||||
Buffer shortData = ShortBuffer.wrap(((ShortDataRecord) rawData)
|
||||
.getShortData());
|
||||
return new ColorMapData(shortData, sizes,
|
||||
ColorMapDataType.UNSIGNED_SHORT);
|
||||
} catch (Throwable t) {
|
||||
throw new VizException(t);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result
|
||||
+ ((dataRecord == null) ? 0 : dataRecord.hashCode());
|
||||
result = prime * result
|
||||
+ ((validDataBounds == null) ? 0 : validDataBounds.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.lang.Object#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
VIIRSDataCallback other = (VIIRSDataCallback) obj;
|
||||
if (dataRecord == null) {
|
||||
if (other.dataRecord != null)
|
||||
return false;
|
||||
} else if (!dataRecord.equals(other.dataRecord))
|
||||
return false;
|
||||
if (validDataBounds == null) {
|
||||
if (other.validDataBounds != null)
|
||||
return false;
|
||||
} else if (!validDataBounds.equals(other.validDataBounds))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,300 +0,0 @@
|
|||
/**
|
||||
* 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.uf.viz.npp.viirs.rsc;
|
||||
|
||||
import org.opengis.geometry.DirectPosition;
|
||||
import org.opengis.geometry.MismatchedDimensionException;
|
||||
import org.opengis.referencing.operation.MathTransform;
|
||||
import org.opengis.referencing.operation.Matrix;
|
||||
import org.opengis.referencing.operation.NoninvertibleTransformException;
|
||||
import org.opengis.referencing.operation.TransformException;
|
||||
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
import com.vividsolutions.jts.geom.LineSegment;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 30, 2011 mschenke Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class VIIRSDataMathTransform implements MathTransform {
|
||||
|
||||
private float[] latitudes;
|
||||
|
||||
private float[] longitudes;
|
||||
|
||||
private int width, height;
|
||||
|
||||
public VIIRSDataMathTransform(float[][] projectionData, int width,
|
||||
int height) {
|
||||
this.longitudes = projectionData[0];
|
||||
this.latitudes = projectionData[1];
|
||||
this.height = height;
|
||||
this.width = width;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.opengis.referencing.operation.MathTransform#derivative(org.opengis
|
||||
* .geometry.DirectPosition)
|
||||
*/
|
||||
@Override
|
||||
public Matrix derivative(DirectPosition arg0)
|
||||
throws MismatchedDimensionException, TransformException {
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.opengis.referencing.operation.MathTransform#getSourceDimensions()
|
||||
*/
|
||||
@Override
|
||||
public int getSourceDimensions() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.opengis.referencing.operation.MathTransform#getTargetDimensions()
|
||||
*/
|
||||
@Override
|
||||
public int getTargetDimensions() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.opengis.referencing.operation.MathTransform#inverse()
|
||||
*/
|
||||
@Override
|
||||
public MathTransform inverse() throws NoninvertibleTransformException {
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.opengis.referencing.operation.MathTransform#isIdentity()
|
||||
*/
|
||||
@Override
|
||||
public boolean isIdentity() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.opengis.referencing.operation.MathTransform#toWKT()
|
||||
*/
|
||||
@Override
|
||||
public String toWKT() throws UnsupportedOperationException {
|
||||
System.out.println("toWKT?");
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.opengis.referencing.operation.MathTransform#transform(org.opengis
|
||||
* .geometry.DirectPosition, org.opengis.geometry.DirectPosition)
|
||||
*/
|
||||
@Override
|
||||
public DirectPosition transform(DirectPosition arg0, DirectPosition arg1)
|
||||
throws MismatchedDimensionException, TransformException {
|
||||
System.out.println("transform a bunch of DirectPositions?");
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.opengis.referencing.operation.MathTransform#transform(double[],
|
||||
* int, double[], int, int)
|
||||
*/
|
||||
@Override
|
||||
public void transform(double[] in, int inOffset, double[] out,
|
||||
int outOffset, int numPoints) throws TransformException {
|
||||
for (int i = 0; i < numPoints; ++i) {
|
||||
int xIdx = (i * 2);
|
||||
int yIdx = (i * 2) + 1;
|
||||
|
||||
double xLoc = in[xIdx] - 0.5;
|
||||
// TODO: Why is data flipped along "y" axis?
|
||||
double yLoc = height - in[yIdx] - 0.5;
|
||||
out[xIdx] = getInterpolatedValue(xLoc, yLoc, 0);
|
||||
out[yIdx] = getInterpolatedValue(xLoc, yLoc, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.opengis.referencing.operation.MathTransform#transform(float[],
|
||||
* int, float[], int, int)
|
||||
*/
|
||||
@Override
|
||||
public void transform(float[] arg0, int arg1, float[] arg2, int arg3,
|
||||
int arg4) throws TransformException {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.opengis.referencing.operation.MathTransform#transform(float[],
|
||||
* int, double[], int, int)
|
||||
*/
|
||||
@Override
|
||||
public void transform(float[] arg0, int arg1, double[] arg2, int arg3,
|
||||
int arg4) throws TransformException {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.opengis.referencing.operation.MathTransform#transform(double[],
|
||||
* int, float[], int, int)
|
||||
*/
|
||||
@Override
|
||||
public void transform(double[] arg0, int arg1, float[] arg2, int arg3,
|
||||
int arg4) throws TransformException {
|
||||
}
|
||||
|
||||
protected float getInterpolatedValue(double xd, double yd, int dim) {
|
||||
float value = 0.0f;
|
||||
float missing = 1.0f;
|
||||
|
||||
float x = (float) xd;
|
||||
float y = (float) yd;
|
||||
|
||||
int xi = (int) x;
|
||||
int yi = (int) y;
|
||||
// Upper left corner
|
||||
float xWeight = 1 - x + xi;
|
||||
float yWeight = 1 - y + yi;
|
||||
float weight = xWeight * yWeight;
|
||||
float val = getRawDataValue(xi, yi, dim);
|
||||
if (Float.isNaN(val)) {
|
||||
missing -= weight;
|
||||
} else {
|
||||
value += weight * val;
|
||||
}
|
||||
// upper right corner
|
||||
xi = xi + 1;
|
||||
xWeight = 1 - xi + x;
|
||||
yWeight = 1 - y + yi;
|
||||
weight = xWeight * yWeight;
|
||||
val = getRawDataValue(xi, yi, dim);
|
||||
if (Float.isNaN(val)) {
|
||||
missing -= weight;
|
||||
} else {
|
||||
value += weight * val;
|
||||
}
|
||||
// lower right corner
|
||||
yi = yi + 1;
|
||||
xWeight = 1 - xi + x;
|
||||
yWeight = 1 - yi + y;
|
||||
weight = xWeight * yWeight;
|
||||
val = getRawDataValue(xi, yi, dim);
|
||||
if (Float.isNaN(val)) {
|
||||
missing -= weight;
|
||||
} else {
|
||||
value += weight * val;
|
||||
}
|
||||
// lower left corner
|
||||
xi = xi - 1;
|
||||
xWeight = 1 - x + xi;
|
||||
yWeight = 1 - yi + y;
|
||||
weight = xWeight * yWeight;
|
||||
val = getRawDataValue(xi, yi, dim);
|
||||
if (Float.isNaN(val)) {
|
||||
missing -= weight;
|
||||
} else {
|
||||
value += weight * val;
|
||||
}
|
||||
|
||||
return value / missing;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param xi
|
||||
* @param yi
|
||||
* @param dim
|
||||
* @return
|
||||
*/
|
||||
private float getRawDataValue(int xi, int yi, int dim) {
|
||||
Coordinate c = null;
|
||||
if (xi >= 0 && xi < width && yi >= 0 && yi < height) {
|
||||
c = index(xi, yi);
|
||||
} else {
|
||||
int xInc = 0;
|
||||
int closestX = xi;
|
||||
if (closestX < 0) {
|
||||
closestX = 0;
|
||||
xInc = 1;
|
||||
} else if (closestX >= width) {
|
||||
closestX = width - 1;
|
||||
xInc = -1;
|
||||
}
|
||||
|
||||
int yInc = 0;
|
||||
int closestY = yi;
|
||||
if (closestY < 0) {
|
||||
closestY = 0;
|
||||
yInc = 1;
|
||||
} else if (closestY >= height) {
|
||||
closestY = height - 1;
|
||||
yInc = -1;
|
||||
}
|
||||
|
||||
Coordinate a = index(closestX, closestY);
|
||||
Coordinate b = index(closestX + xInc, closestY + yInc);
|
||||
LineSegment ls = new LineSegment(a, b);
|
||||
int xDiff = closestX - xi;
|
||||
int yDiff = closestY - yi;
|
||||
c = ls.pointAlong(-Math.sqrt(xDiff * xDiff + yDiff * yDiff));
|
||||
}
|
||||
return (float) (dim == 0 ? c.x : c.y);
|
||||
}
|
||||
|
||||
private Coordinate index(int xi, int yi) {
|
||||
return new Coordinate(longitudes[yi * width + xi], latitudes[yi * width
|
||||
+ xi]);
|
||||
}
|
||||
}
|
|
@ -1,445 +0,0 @@
|
|||
/**
|
||||
* 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.uf.viz.npp.viirs.rsc;
|
||||
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.annotations.DataURI;
|
||||
import com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSDataRecord;
|
||||
import com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSSpatialRecord;
|
||||
import com.raytheon.uf.common.datastorage.DataStoreFactory;
|
||||
import com.raytheon.uf.common.datastorage.IDataStore;
|
||||
import com.raytheon.uf.common.datastorage.Request;
|
||||
import com.raytheon.uf.common.datastorage.records.FloatDataRecord;
|
||||
import com.raytheon.uf.common.datastorage.records.IDataRecord;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.time.BinOffset;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.viz.core.DrawableImage;
|
||||
import com.raytheon.uf.viz.core.HDF5Util;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget.RasterMode;
|
||||
import com.raytheon.uf.viz.core.drawables.ColorMapLoader;
|
||||
import com.raytheon.uf.viz.core.drawables.ColorMapParameters;
|
||||
import com.raytheon.uf.viz.core.drawables.IImage;
|
||||
import com.raytheon.uf.viz.core.drawables.PaintProperties;
|
||||
import com.raytheon.uf.viz.core.drawables.ext.colormap.IColormappedImageExtension;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.map.IMapDescriptor;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
|
||||
import com.raytheon.uf.viz.core.rsc.IResourceDataChanged;
|
||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.ColorMapCapability;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.ImagingCapability;
|
||||
import com.raytheon.uf.viz.core.rsc.hdf5.ImageTile;
|
||||
|
||||
/**
|
||||
* NPP VIIRS resource. Responsible for drawing a single color band
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 30, 2011 mschenke Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class VIIRSResource extends
|
||||
AbstractVizResource<VIIRSResourceData, IMapDescriptor> implements
|
||||
IResourceDataChanged {
|
||||
|
||||
protected static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(VIIRSResource.class);
|
||||
|
||||
protected static class VIIRSData {
|
||||
public VIIRSDataCallback callback;
|
||||
|
||||
public IImage image;
|
||||
|
||||
public ImageTile tile;
|
||||
|
||||
public float[][] projectionData;
|
||||
}
|
||||
|
||||
protected static class VIIRSFrame {
|
||||
public Map<Object, VIIRSData> dataMap = new HashMap<Object, VIIRSData>();
|
||||
}
|
||||
|
||||
private static final String NAME_FORMAT = "NPP VIIRS %s %s (%s microns)";
|
||||
|
||||
protected Map<DataTime, VIIRSFrame> frameData;
|
||||
|
||||
private String name;
|
||||
|
||||
private List<VIIRSDataRecord> records;
|
||||
|
||||
private IGraphicsTarget target;
|
||||
|
||||
/**
|
||||
* @param resourceData
|
||||
* @param loadProperties
|
||||
*/
|
||||
public VIIRSResource(VIIRSResourceData resourceData,
|
||||
LoadProperties loadProperties, List<VIIRSDataRecord> initialRecords) {
|
||||
super(resourceData, loadProperties);
|
||||
this.records = new ArrayList<VIIRSDataRecord>(initialRecords);
|
||||
resourceData.addChangeListener(this);
|
||||
frameData = new HashMap<DataTime, VIIRSFrame>();
|
||||
dataTimes = new ArrayList<DataTime>();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.core.rsc.AbstractVizResource#getName()
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
protected boolean addRecord(VIIRSDataRecord dataRecord) throws Exception {
|
||||
// TODO: Ignore isHasSpatial == false
|
||||
if (name == null) {
|
||||
initializeFirstRecord(dataRecord);
|
||||
}
|
||||
|
||||
// Valid dataRecord with spatial data
|
||||
DataTime time = dataRecord.getDataTime();
|
||||
DataTime normalTime = normalizeTime(time);
|
||||
|
||||
VIIRSFrame frame = frameData.get(normalTime);
|
||||
if (frame == null) {
|
||||
// First record for normalized time
|
||||
frame = new VIIRSFrame();
|
||||
frameData.put(normalTime, frame);
|
||||
dataTimes.add(normalTime);
|
||||
}
|
||||
|
||||
Object recordKey = getRecordKey(dataRecord);
|
||||
VIIRSData data = frame.dataMap.get(recordKey);
|
||||
if (data == null) {
|
||||
data = new VIIRSData();
|
||||
IDataStore dataStore = DataStoreFactory.getDataStore(HDF5Util
|
||||
.findHDF5Location(dataRecord));
|
||||
String dataURI = dataRecord.getSpatialURI();
|
||||
IDataRecord[] latLons = dataStore
|
||||
.retrieveDatasets(
|
||||
new String[] {
|
||||
dataURI
|
||||
+ DataURI.SEPARATOR
|
||||
+ VIIRSSpatialRecord
|
||||
.getLatitudeDataSet(0),
|
||||
dataURI
|
||||
+ DataURI.SEPARATOR
|
||||
+ VIIRSSpatialRecord
|
||||
.getLongitudeDataSet(0) },
|
||||
Request.ALL);
|
||||
if (latLons == null || latLons.length != 2) {
|
||||
// No spatial data available
|
||||
return false;
|
||||
}
|
||||
|
||||
IDataRecord lats = latLons[0];
|
||||
IDataRecord lons = latLons[1];
|
||||
|
||||
float[] latFloats = ((FloatDataRecord) lats).getFloatData();
|
||||
float[] lonFloats = ((FloatDataRecord) lons).getFloatData();
|
||||
|
||||
// Get the width and valid height of the data
|
||||
int width = dataRecord.getWidth();
|
||||
int height = (Integer) lats.getDataAttributes().get(
|
||||
VIIRSSpatialRecord.VALID_HEIGHT_ID);
|
||||
|
||||
latFloats = Arrays.copyOf(latFloats, height * width);
|
||||
lonFloats = Arrays.copyOf(lonFloats, height * width);
|
||||
data.projectionData = new float[][] { lonFloats, latFloats };
|
||||
|
||||
data.tile = new ImageTile();
|
||||
// data.tile.rect = new Rectangle(0, 0, width, height);
|
||||
// data.tile.envelope = new Envelope(0, width, 0, height);
|
||||
|
||||
calculateMesh(data, target);
|
||||
|
||||
data.callback = new VIIRSDataCallback(dataRecord, new Rectangle(0,
|
||||
0, width, height));
|
||||
|
||||
data.image = target.getExtension(IColormappedImageExtension.class)
|
||||
.initializeRaster(
|
||||
data.callback,
|
||||
getCapability(ColorMapCapability.class)
|
||||
.getColorMapParameters());
|
||||
|
||||
frame.dataMap.put(recordKey, data);
|
||||
return true;
|
||||
} else {
|
||||
System.err.println("Recieved duplicate record for VIIRS data");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* First record was added, initialize any fields that require information
|
||||
* from a record
|
||||
*
|
||||
* @param dataRecord
|
||||
* @throws VizException
|
||||
*/
|
||||
protected void initializeFirstRecord(VIIRSDataRecord dataRecord)
|
||||
throws VizException {
|
||||
// First record, process name and parameters
|
||||
name = String.format(
|
||||
NAME_FORMAT,
|
||||
dataRecord.getChannelType(),
|
||||
(dataRecord.getChannel() != null ? "Channel "
|
||||
+ dataRecord.getChannel() : "Band"),
|
||||
dataRecord.getWavelength());
|
||||
|
||||
ColorMapParameters colorMapParameters = getCapability(
|
||||
ColorMapCapability.class).getColorMapParameters();
|
||||
if (colorMapParameters == null) {
|
||||
colorMapParameters = new ColorMapParameters();
|
||||
}
|
||||
if (colorMapParameters.getColorMap() == null) {
|
||||
String name = colorMapParameters.getColorMapName();
|
||||
if (name == null) {
|
||||
name = "NPP/VIIRS/IR Default";
|
||||
}
|
||||
colorMapParameters.setColorMap(ColorMapLoader.loadColorMap(name));
|
||||
}
|
||||
|
||||
// TODO: Get data unit from record and display unit from style rules
|
||||
Unit<?> displayUnit = Unit.ONE;
|
||||
Unit<?> dataUnit = Unit.ONE;
|
||||
|
||||
// Static, should be moved from ColorMapParameters into GLDataFormat
|
||||
colorMapParameters.setDataMin(0);
|
||||
colorMapParameters.setDataMax(0xFFFF);
|
||||
|
||||
try {
|
||||
IDataStore ds = DataStoreFactory.getDataStore(HDF5Util
|
||||
.findHDF5Location(dataRecord));
|
||||
IDataRecord record = ds.retrieve(dataRecord.getDataURI(),
|
||||
VIIRSDataRecord.getDataSet(0),
|
||||
Request.buildPointRequest(new Point(0, 0)));
|
||||
Map<String, Object> attrs = record.getDataAttributes();
|
||||
Float offset = (Float) attrs.get(VIIRSDataRecord.OFFSET_ID);
|
||||
Float scale = (Float) attrs.get(VIIRSDataRecord.SCALE_ID);
|
||||
if (offset != null && scale != null) {
|
||||
dataUnit = dataUnit.plus(offset).times(scale);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new VizException(e);
|
||||
}
|
||||
|
||||
colorMapParameters.setDataUnit(dataUnit);
|
||||
colorMapParameters.setDisplayUnit(displayUnit);
|
||||
|
||||
// TODO: Get from style rules?
|
||||
colorMapParameters.setColorMapMin(12900);
|
||||
colorMapParameters.setColorMapMax(52700);
|
||||
|
||||
getCapability(ColorMapCapability.class).setColorMapParameters(
|
||||
colorMapParameters);
|
||||
}
|
||||
|
||||
/**
|
||||
* Construct a unique key for the record. Base implementation assumes all
|
||||
* records are same channel/region and only uses DataTime as unique key.
|
||||
* Object returned will be added to a HashMap so must implement hashCode and
|
||||
* equals
|
||||
*
|
||||
* @param dataRecord
|
||||
* @return
|
||||
*/
|
||||
protected Object getRecordKey(VIIRSDataRecord dataRecord) {
|
||||
return dataRecord.getDataTime();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.core.rsc.AbstractVizResource#disposeInternal()
|
||||
*/
|
||||
@Override
|
||||
protected void disposeInternal() {
|
||||
clearCoverages();
|
||||
for (VIIRSFrame frame : frameData.values()) {
|
||||
for (VIIRSData data : frame.dataMap.values()) {
|
||||
data.image.dispose();
|
||||
}
|
||||
frame.dataMap.clear();
|
||||
}
|
||||
frameData.clear();
|
||||
}
|
||||
|
||||
private void clearCoverages() {
|
||||
for (VIIRSFrame frame : frameData.values()) {
|
||||
for (VIIRSData data : frame.dataMap.values()) {
|
||||
if (data.tile != null) {
|
||||
data.tile.dispose();
|
||||
data.tile = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.core.rsc.AbstractVizResource#paintInternal(com.raytheon
|
||||
* .uf.viz.core.IGraphicsTarget,
|
||||
* com.raytheon.uf.viz.core.drawables.PaintProperties)
|
||||
*/
|
||||
@Override
|
||||
protected void paintInternal(IGraphicsTarget target,
|
||||
PaintProperties paintProps) throws VizException {
|
||||
VIIRSFrame frame = frameData.get(paintProps.getDataTime());
|
||||
if (frame != null) {
|
||||
ImagingCapability imgCap = getCapability(ImagingCapability.class);
|
||||
float brightness = imgCap.getBrightness();
|
||||
float contrast = imgCap.getContrast();
|
||||
boolean interp = imgCap.isInterpolationState();
|
||||
|
||||
List<DrawableImage> images = new ArrayList<DrawableImage>();
|
||||
for (VIIRSData data : frame.dataMap.values()) {
|
||||
data.image.setBrightness(brightness);
|
||||
data.image.setContrast(contrast);
|
||||
data.image.setInterpolated(interp);
|
||||
|
||||
DrawableImage di = new DrawableImage(data.image,
|
||||
data.tile.coverage);
|
||||
di.setMode(RasterMode.ASYNCHRONOUS);
|
||||
images.add(di);
|
||||
}
|
||||
target.drawRasters(paintProps,
|
||||
images.toArray(new DrawableImage[images.size()]));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.core.rsc.AbstractVizResource#initInternal(com.raytheon
|
||||
* .uf.viz.core.IGraphicsTarget)
|
||||
*/
|
||||
@Override
|
||||
protected synchronized void initInternal(IGraphicsTarget target)
|
||||
throws VizException {
|
||||
this.target = target;
|
||||
try {
|
||||
if (records != null) {
|
||||
for (VIIRSDataRecord record : records) {
|
||||
addRecord(record);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new VizException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param frame
|
||||
* @param target
|
||||
*/
|
||||
private void calculateMesh(VIIRSData frame, IGraphicsTarget target)
|
||||
throws VizException {
|
||||
// Rectangle tile = frame.tile.rect;
|
||||
// frame.tile.coverage = new PixelCoverage(new
|
||||
// Coordinate(tile.getMinX(),
|
||||
// tile.getMinY()),
|
||||
// new Coordinate(tile.getMaxX(), tile.getMinY()), new Coordinate(
|
||||
// tile.getMaxX(), tile.getMaxY()), new Coordinate(
|
||||
// tile.getMinX(), tile.getMaxY()));
|
||||
// IMesh mesh = target.getExtension(IMapMeshExtension.class)
|
||||
// .constructMesh(descriptor);
|
||||
// mesh.calculateMesh(frame.tile.coverage, frame.tile,
|
||||
// new VIIRSDataMathTransform(frame.projectionData,
|
||||
// frame.tile.rect.width, frame.tile.rect.height));
|
||||
// frame.projectionData = null;
|
||||
// frame.tile.coverage.setMesh(mesh);
|
||||
// frame.projectionData = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalize the DataTime using BinOffset of resourceData if set
|
||||
*
|
||||
* @param dt
|
||||
* @return
|
||||
*/
|
||||
private DataTime normalizeTime(DataTime dt) {
|
||||
BinOffset offset = resourceData.getBinOffset();
|
||||
if (offset != null) {
|
||||
dt = offset.getNormalizedTime(dt);
|
||||
}
|
||||
return dt;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* com.raytheon.uf.viz.core.rsc.IResourceDataChanged#resourceChanged(com
|
||||
* .raytheon.uf.viz.core.rsc.IResourceDataChanged.ChangeType,
|
||||
* java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public synchronized void resourceChanged(ChangeType type, Object object) {
|
||||
if (type == ChangeType.DATA_UPDATE) {
|
||||
VIIRSDataRecord[] records = (VIIRSDataRecord[]) object;
|
||||
for (VIIRSDataRecord record : records) {
|
||||
this.records.add(record);
|
||||
if (target != null) {
|
||||
// target is set in initInternal, this means we have already
|
||||
// initialized and can add records freely. If we get updates
|
||||
// before we've initialized, they will be processed in
|
||||
// initInternal
|
||||
try {
|
||||
addRecord(record);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(
|
||||
Priority.PROBLEM,
|
||||
"Error adding record from update: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
issueRefresh();
|
||||
}
|
||||
}
|
|
@ -1,74 +0,0 @@
|
|||
/**
|
||||
* 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.uf.viz.npp.viirs.rsc;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSDataRecord;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
|
||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
|
||||
/**
|
||||
* VIIRS Resource data
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 30, 2011 mschenke Initial creation
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mschenke
|
||||
* @version 1.0
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class VIIRSResourceData extends AbstractRequestableResourceData {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData#
|
||||
* constructResource(com.raytheon.uf.viz.core.rsc.LoadProperties,
|
||||
* com.raytheon.uf.viz.core.rsc.PluginDataObject[])
|
||||
*/
|
||||
@Override
|
||||
protected AbstractVizResource<?, ?> constructResource(
|
||||
LoadProperties loadProperties, PluginDataObject[] objects)
|
||||
throws VizException {
|
||||
List<VIIRSDataRecord> viirsRecords = new ArrayList<VIIRSDataRecord>();
|
||||
for (PluginDataObject pdo : objects) {
|
||||
if (pdo instanceof VIIRSDataRecord) {
|
||||
viirsRecords.add((VIIRSDataRecord) pdo);
|
||||
}
|
||||
}
|
||||
return new VIIRSResource(this, loadProperties, viirsRecords);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,23 +1,4 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<styleRuleset>
|
||||
<styleRule>
|
||||
<paramLevelMatches>
|
||||
|
@ -25,16 +6,25 @@
|
|||
</paramLevelMatches>
|
||||
<imageStyle>
|
||||
<displayUnits>in/hr</displayUnits>
|
||||
<defaultColormap>scan/16 Level Reflectivity (DHR)</defaultColormap>
|
||||
<defaultColormap>Radar/OSF/16 Level Reflectivity</defaultColormap>
|
||||
<dataMapping>
|
||||
<entry displayValue='0.0' pixelValue='1' label='0.0'/>
|
||||
<entry displayValue='0.2' pixelValue='8' label='0.2'/>
|
||||
<entry displayValue='0.6' pixelValue='22' label='0.6'/>
|
||||
<entry displayValue='1.0' pixelValue='36' label='1.0'/>
|
||||
<entry displayValue='1.5' pixelValue='54' label='1.5'/>
|
||||
<entry displayValue='2.0' pixelValue='71' label='2.0'/>
|
||||
<entry displayValue='4.0' pixelValue='133' label='4.0'/>
|
||||
<entry displayValue='6.0' pixelValue='195' label='6.0'/>
|
||||
<entry sample='NO DATA' pixelValue="0" label=''/>
|
||||
<entry displayValue="0.0" pixelValue="16" label='0.0'/>
|
||||
<entry displayValue='0.1' pixelValue='32'/>
|
||||
<entry displayValue='0.2' pixelValue='48'/>
|
||||
<entry displayValue='0.4' pixelValue='64'/>
|
||||
<entry displayValue='0.6' pixelValue='80'/>
|
||||
<entry displayValue='0.8' pixelValue='96'/>
|
||||
<entry displayValue='1.0' pixelValue='112'/>
|
||||
<entry displayValue='1.25' pixelValue='118'/>
|
||||
<entry displayValue='1.5' pixelValue='144'/>
|
||||
<entry displayValue='1.75' pixelValue='160'/>
|
||||
<entry displayValue='2.0' pixelValue='176'/>
|
||||
<entry displayValue='3.0' pixelValue='192'/>
|
||||
<entry displayValue='4.0' pixelValue='208'/>
|
||||
<entry displayValue='5.0' pixelValue='223'/>
|
||||
<entry displayValue='6.0' pixelValue='240'/>
|
||||
<entry displayValue='9999.0' pixelValue='255' label=''/>
|
||||
</dataMapping>
|
||||
</imageStyle>
|
||||
</styleRule>
|
||||
|
|
|
@ -25,6 +25,10 @@ import java.text.DecimalFormat;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.measure.converter.MultiplyConverter;
|
||||
import javax.measure.converter.UnitConverter;
|
||||
import javax.measure.unit.NonSI;
|
||||
import javax.measure.unit.Unit;
|
||||
import javax.xml.bind.JAXB;
|
||||
|
||||
import com.raytheon.uf.common.colormap.ColorMap;
|
||||
|
@ -54,24 +58,22 @@ import com.raytheon.uf.viz.core.rsc.capabilities.ColorMapCapability;
|
|||
import com.raytheon.uf.viz.core.style.ParamLevelMatchCriteria;
|
||||
import com.raytheon.uf.viz.core.style.StyleManager;
|
||||
import com.raytheon.uf.viz.core.style.StyleRule;
|
||||
import com.raytheon.uf.viz.core.style.DataMappingPreferences.DataMappingEntry;
|
||||
import com.raytheon.uf.viz.preciprate.xml.PrecipRateXML;
|
||||
import com.raytheon.uf.viz.preciprate.xml.SCANConfigPrecipRateXML;
|
||||
import com.raytheon.viz.core.style.image.ImagePreferences;
|
||||
import com.raytheon.viz.core.units.PiecewisePixel;
|
||||
import com.raytheon.viz.radar.VizRadarRecord;
|
||||
import com.raytheon.viz.radar.interrogators.IRadarInterrogator;
|
||||
import com.raytheon.viz.radar.rsc.RadarTextResource.IRadarTextGeneratingResource;
|
||||
import com.raytheon.viz.radar.rsc.image.RadarRadialResource;
|
||||
import com.raytheon.viz.radar.util.DataUtilities;
|
||||
|
||||
public class PrecipRateResource extends RadarRadialResource implements
|
||||
IRadarTextGeneratingResource {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(PrecipRateResource.class);
|
||||
|
||||
// max and min preciprate english unit vals
|
||||
private static final float prmax = 7.0f;
|
||||
|
||||
private static final float prmin = 0.0f;
|
||||
|
||||
/* formatter */
|
||||
private DecimalFormat df = new DecimalFormat();
|
||||
|
||||
|
@ -79,10 +81,14 @@ public class PrecipRateResource extends RadarRadialResource implements
|
|||
|
||||
private PrecipRateRecord precipRecord;
|
||||
|
||||
private PrecipRateResourceData data = null;
|
||||
|
||||
public PrecipRateResource(PrecipRateResourceData data,
|
||||
LoadProperties props, IRadarInterrogator interrogator)
|
||||
throws VizException {
|
||||
|
||||
super(data, props, interrogator);
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -211,7 +217,7 @@ public class PrecipRateResource extends RadarRadialResource implements
|
|||
* raytheon.uf.viz.core.IGraphicsTarget,
|
||||
* com.raytheon.uf.viz.core.drawables.ColorMapParameters,
|
||||
* com.raytheon.uf.common.dataplugin.radar.RadarRecord, java.awt.Rectangle)
|
||||
*/
|
||||
|
||||
@Override
|
||||
protected IImage createImage(IGraphicsTarget target,
|
||||
ColorMapParameters params, final RadarRecord record,
|
||||
|
@ -221,6 +227,7 @@ public class PrecipRateResource extends RadarRadialResource implements
|
|||
new RadarImageDataRetrievalAdapter(record, null, rect) {
|
||||
}, params);
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
protected ColorMapParameters getColorMapParameters(IGraphicsTarget target,
|
||||
|
@ -245,6 +252,11 @@ public class PrecipRateResource extends RadarRadialResource implements
|
|||
colorMapParameters.setDataMin(0);
|
||||
colorMapParameters.setDataMapping(((ImagePreferences) sr
|
||||
.getPreferences()).getDataMapping());
|
||||
double[] d1 = {1,255};
|
||||
double[] d2 = {0,25.4};
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
PiecewisePixel pw = new PiecewisePixel(NonSI.INCH.divide(NonSI.HOUR), d1, d2);
|
||||
colorMapParameters.setDataUnit(pw);
|
||||
getCapability(ColorMapCapability.class).setColorMapParameters(
|
||||
colorMapParameters);
|
||||
return colorMapParameters;
|
||||
|
@ -346,6 +358,10 @@ public class PrecipRateResource extends RadarRadialResource implements
|
|||
try {
|
||||
dataVal = new RadarDataInterrogator(record).getDataValue(latLon
|
||||
.asLatLon());
|
||||
if (dataVal == 0) {
|
||||
return "NO DATA";
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
UFStatus.getHandler().handle(
|
||||
Priority.PROBLEM,
|
||||
|
@ -353,13 +369,10 @@ public class PrecipRateResource extends RadarRadialResource implements
|
|||
+ e.getLocalizedMessage(), e);
|
||||
}
|
||||
|
||||
if (dataVal == null || dataVal == 0) {
|
||||
return "NO DATA";
|
||||
}
|
||||
|
||||
ColorMapParameters params = getCapability(ColorMapCapability.class)
|
||||
.getColorMapParameters();
|
||||
double val = params.getImageToDisplayConverter().convert(dataVal);
|
||||
double val = params.getDataToDisplayConverter().convert(dataVal);
|
||||
|
||||
if (val >= ScanUtils.MM_TO_INCH * precipRecord.getHailcap()
|
||||
|| Double.isNaN(val)) {
|
||||
return String.format(
|
||||
|
@ -378,4 +391,80 @@ public class PrecipRateResource extends RadarRadialResource implements
|
|||
return null;
|
||||
}
|
||||
|
||||
protected byte[] createConversionTable(ColorMapParameters params,
|
||||
RadarRecord record) {
|
||||
|
||||
UnitConverter dataToImage = params.getDataToImageConverter();;
|
||||
Unit<?> dataUnit = params.getDataUnit();
|
||||
// precompute the converted value for every possible value in the
|
||||
// record.
|
||||
byte[] table = new byte[record.getNumLevels()];
|
||||
for (int i = 0; i < record.getNumLevels(); i++) {
|
||||
double image = dataToImage.convert(i);
|
||||
if (Double.isNaN(image)) {
|
||||
double d = dataUnit.getConverterTo(params.getDisplayUnit())
|
||||
.convert(i);
|
||||
if (Double.isNaN(d)) {
|
||||
// This means that the data is a non-numeric value, most
|
||||
// likely a flag of some sort
|
||||
if (record.getNumLevels() <= 16) {
|
||||
// For 3 and 4 bit products products try to match the
|
||||
// flag value to a string value in the params
|
||||
String value = record.getDecodedThreshold(i).toString();
|
||||
for (DataMappingEntry entry : params.getDataMapping()
|
||||
.getEntries()) {
|
||||
if (value.equals(entry.getLabel())
|
||||
|| value.equals(entry.getSample())) {
|
||||
table[i] = entry.getPixelValue().byteValue();
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// For 8 bit products the flag value should be
|
||||
// specifically handled in the style rules. For example
|
||||
// if 1 is a flag for RF than pixel value 1 in the style
|
||||
// rules will need to be RF. This is not
|
||||
// a graceful seperation of data and representation but
|
||||
// it works
|
||||
table[i] = (byte) i;
|
||||
}
|
||||
} else {
|
||||
// the data value is outside the range of the colormap
|
||||
UnitConverter image2disp = params
|
||||
.getImageToDisplayConverter();
|
||||
if (image2disp == null) {
|
||||
continue;
|
||||
}
|
||||
for (int j = 0; j < 256; j++) {
|
||||
double disp = image2disp.convert(j);
|
||||
if (Double.isNaN(disp)) {
|
||||
continue;
|
||||
}
|
||||
if (d < disp) {
|
||||
// Map data values smaller than the colormap min to
|
||||
// 0, which should be no data.
|
||||
// table[i] = (byte) 0;
|
||||
// If we want small values to appear as the lowest
|
||||
// data value than do this next line instead
|
||||
// This was changed for the DUA product so
|
||||
// differences less than -5 get mapped to a data
|
||||
// value.
|
||||
table[i] = (byte) j;
|
||||
break;
|
||||
}
|
||||
if (d > disp) {
|
||||
// map data values larger than the colormap max to
|
||||
// the highest value
|
||||
table[i] = (byte) j;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
table[i] = (byte) Math.round(image);
|
||||
}
|
||||
}
|
||||
return table;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -60,6 +60,8 @@ public class ScaleWidget extends Widget {
|
|||
|
||||
private float resolution;
|
||||
|
||||
private int precision;
|
||||
|
||||
private DecimalFormat format;
|
||||
|
||||
/**
|
||||
|
@ -71,7 +73,6 @@ public class ScaleWidget extends Widget {
|
|||
public ScaleWidget(String label) {
|
||||
this();
|
||||
setLabel(label);
|
||||
setResolution(1.0f);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -85,6 +86,7 @@ public class ScaleWidget extends Widget {
|
|||
|
||||
range = 100;
|
||||
resolution = 1;
|
||||
precision = 3;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -111,7 +113,10 @@ public class ScaleWidget extends Widget {
|
|||
minValue = ((Number) (getOptions().get(0))).floatValue();
|
||||
maxValue = ((Number) (getOptions().get(1))).floatValue();
|
||||
|
||||
range = (int) ((maxValue - minValue) / getResolution());
|
||||
range = Math.round((maxValue - minValue) / getResolution());
|
||||
|
||||
format = new DecimalFormat();
|
||||
format.setMaximumFractionDigits(precision);
|
||||
|
||||
scale.setMinimum(0);
|
||||
scale.setMaximum(range);
|
||||
|
@ -119,7 +124,7 @@ public class ScaleWidget extends Widget {
|
|||
scale.setPageIncrement(1);
|
||||
|
||||
if (getValue() == null) {
|
||||
setValue(new Float(minValue));
|
||||
setValue(new Float(minValue));
|
||||
}
|
||||
|
||||
setInitialScaleValue(((Number) (getValue())).floatValue());
|
||||
|
@ -145,7 +150,7 @@ public class ScaleWidget extends Widget {
|
|||
* @return the scaleValue
|
||||
*/
|
||||
private float getScaleValue() {
|
||||
return scale.getSelection() * resolution + minValue;
|
||||
return scale.getSelection() * resolution + minValue;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -159,14 +164,14 @@ public class ScaleWidget extends Widget {
|
|||
*/
|
||||
private void setInitialScaleValue(float scaleValue) {
|
||||
|
||||
int position = (int) ((scaleValue - minValue) / resolution);
|
||||
int position = Math.round((scaleValue - minValue) / resolution);
|
||||
scale.setSelection(position);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the resolution
|
||||
*/
|
||||
public double getResolution() {
|
||||
public float getResolution() {
|
||||
return resolution;
|
||||
}
|
||||
|
||||
|
@ -182,17 +187,14 @@ public class ScaleWidget extends Widget {
|
|||
public void setResolution(float resolution) {
|
||||
if (resolution != 0.0f) {
|
||||
this.resolution = resolution;
|
||||
int digits = 0;
|
||||
double log = Math.log10(resolution);
|
||||
if (log < 0) {
|
||||
digits = (int) Math.ceil(-log);
|
||||
}
|
||||
format = new DecimalFormat();
|
||||
format.setMaximumFractionDigits(digits);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
public int getPrecision() {
|
||||
return precision;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see com.raytheon.viz.gfe.ui.runtimeui.widgets.Widget#toString()
|
||||
|
@ -233,4 +235,8 @@ public class ScaleWidget extends Widget {
|
|||
super.setOptions(options);
|
||||
}
|
||||
|
||||
public void setPrecision(int precision) {
|
||||
this.precision = precision;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -544,8 +544,11 @@ public class ListEditorWindow {
|
|||
// See AWIPS-1 D-2D/src/applications/radar/common/prod-mgmt.tcl :
|
||||
// format_product
|
||||
protected String getRequestLabel(Request req) {
|
||||
|
||||
RadarProduct rp = ProductInfo.getInstance().getPoductForCode(
|
||||
req.productCode);
|
||||
Collection<RadarProduct> variants = ProductInfo.getInstance().select(
|
||||
new ProductInfo.Selector(null, rp.mnemonic, null, null));
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (rp != null) {
|
||||
if (rp.name != null)
|
||||
|
@ -555,9 +558,9 @@ public class ListEditorWindow {
|
|||
* sb.append(" (").append(rp.mnemonic).append(')');
|
||||
*/
|
||||
|
||||
if (rp.levels != null)
|
||||
if (rp.levels != null && variants.size() > 1)
|
||||
sb.append(", levels ").append(rp.levels);
|
||||
if (rp.resolution != null)
|
||||
if (rp.resolution != null && variants.size() > 1)
|
||||
sb.append(", resol ").append(rp.resolution);
|
||||
if (rp.params.contains(Param.BASELINE)
|
||||
|| rp.params.contains(Param.CFC_BITMAP)) {
|
||||
|
@ -583,6 +586,20 @@ public class ListEditorWindow {
|
|||
sb.append(", Latest");
|
||||
}
|
||||
|
||||
if (rp.params.contains(Param.TIME_SPAN_MINUTES)) {
|
||||
int thour = req.getTimeSpan() / 60;
|
||||
int tmin = req.getTimeSpan() - thour * 60;
|
||||
sb.append(String.format(", Time span %d:%02d", thour, tmin));
|
||||
if (req.getEndHour() != -1) {
|
||||
int ehour = req.getEndHour() / 60;
|
||||
int emin = req.getEndHour() - ehour * 60;
|
||||
sb.append(String
|
||||
.format(", End time %02d:%02d", ehour, emin));
|
||||
} else {
|
||||
sb.append(", Latest");
|
||||
}
|
||||
}
|
||||
|
||||
if (rp.params.contains(Param.ELEVATION)) {
|
||||
sb.append(", ");
|
||||
float angle = req.getElevationAngle() / 10.0f;
|
||||
|
|
|
@ -60,6 +60,14 @@ public class CrossSectionRotation {
|
|||
}
|
||||
float[] u = floatData.get(2);
|
||||
float[] v = floatData.get(3);
|
||||
for (int i = 0; i < u.length; i += 1) {
|
||||
if (u[i] <= -9999) {
|
||||
u[i] = Float.NaN;
|
||||
}
|
||||
if (v[i] <= -9999) {
|
||||
v[i] = Float.NaN;
|
||||
}
|
||||
}
|
||||
float[] result = new float[u.length];
|
||||
int width = linePoints.size();
|
||||
int height = result.length / width;
|
||||
|
|
|
@ -55,6 +55,8 @@ import com.raytheon.viz.core.slice.request.VerticalPointRequest.TimeDirection;
|
|||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class TimeHeightDescriptor extends XyGraphDescriptor {
|
||||
|
||||
public static final int REAL_FRAME_COUNT_TO_USE_WHEN_FRAME_COUNT_IS_ONE = 999;
|
||||
|
||||
@XmlAttribute
|
||||
public TimeDirection timeDirection;
|
||||
|
||||
|
@ -138,4 +140,16 @@ public class TimeHeightDescriptor extends XyGraphDescriptor {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNumberOfFrames() {
|
||||
int numFrames = super.getNumberOfFrames();
|
||||
if (numFrames == 1) {
|
||||
// reset to a different number because A1 did
|
||||
numFrames = Math.min(
|
||||
REAL_FRAME_COUNT_TO_USE_WHEN_FRAME_COUNT_IS_ONE,
|
||||
limitedNumberOfFrames);
|
||||
}
|
||||
return numFrames;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.xy.timeheight.display;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
@ -28,6 +30,7 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
import com.raytheon.uf.viz.core.PixelExtent;
|
||||
import com.raytheon.uf.viz.core.VizConstants;
|
||||
import com.raytheon.uf.viz.core.drawables.PaintProperties;
|
||||
import com.raytheon.uf.viz.core.drawables.ResourcePair;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
|
@ -147,4 +150,15 @@ public class TimeHeightRenderableDisplay extends AbstractHeightDisplay {
|
|||
resourceList.addPostAddListener(new ImageCombiner(getDescriptor()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getGlobalsMap() {
|
||||
Map<String, Object> globals = super.getGlobalsMap();
|
||||
if (globals
|
||||
.get(VizConstants.FRAMES_ID)
|
||||
.equals(TimeHeightDescriptor.REAL_FRAME_COUNT_TO_USE_WHEN_FRAME_COUNT_IS_ONE)) {
|
||||
globals.put(VizConstants.FRAMES_ID, 1);
|
||||
}
|
||||
return globals;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -46,6 +46,8 @@ import com.raytheon.uf.viz.xy.timeseries.graph.TimeSeriesGraph;
|
|||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
public class TimeSeriesDescriptor extends XyGraphDescriptor {
|
||||
|
||||
public static final int REAL_FRAME_COUNT_TO_USE_WHEN_FRAME_COUNT_IS_ONE = 999;
|
||||
|
||||
public TimeSeriesDescriptor() {
|
||||
super();
|
||||
}
|
||||
|
@ -64,4 +66,16 @@ public class TimeSeriesDescriptor extends XyGraphDescriptor {
|
|||
return new TimeSeriesGraph(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNumberOfFrames() {
|
||||
int numFrames = super.getNumberOfFrames();
|
||||
if (numFrames == 1) {
|
||||
// reset to a different number because A1 did
|
||||
numFrames = Math.min(
|
||||
REAL_FRAME_COUNT_TO_USE_WHEN_FRAME_COUNT_IS_ONE,
|
||||
limitedNumberOfFrames);
|
||||
}
|
||||
return numFrames;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
**/
|
||||
package com.raytheon.uf.viz.xy.timeseries.display;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
@ -27,14 +29,13 @@ import com.raytheon.uf.common.status.IUFStatusHandler;
|
|||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.PixelExtent;
|
||||
import com.raytheon.uf.viz.core.VizConstants;
|
||||
import com.raytheon.uf.viz.core.drawables.ResourcePair;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
import com.raytheon.uf.viz.core.rsc.ResourceList;
|
||||
import com.raytheon.uf.viz.core.rsc.ResourceProperties;
|
||||
import com.raytheon.uf.viz.core.status.StatusConstants;
|
||||
import com.raytheon.uf.viz.d2d.ui.AbstractNonMapDisplay;
|
||||
import com.raytheon.uf.viz.d2d.ui.Activator;
|
||||
import com.raytheon.uf.viz.xy.map.rsc.GraphResource;
|
||||
import com.raytheon.uf.viz.xy.map.rsc.GraphResourceData;
|
||||
import com.raytheon.uf.viz.xy.map.rsc.GraphResourceData.OverlayMode;
|
||||
|
@ -58,7 +59,9 @@ import com.raytheon.uf.viz.xy.map.rsc.GraphResourceData.OverlayMode;
|
|||
@XmlAccessorType(XmlAccessType.NONE)
|
||||
@XmlRootElement
|
||||
public class TimeSeriesRenderableDisplay extends AbstractNonMapDisplay {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus.getHandler(TimeSeriesRenderableDisplay.class);
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(TimeSeriesRenderableDisplay.class);
|
||||
|
||||
public TimeSeriesRenderableDisplay() {
|
||||
this(new PixelExtent(0, 1000, 0, 1000));
|
||||
}
|
||||
|
@ -97,4 +100,15 @@ public class TimeSeriesRenderableDisplay extends AbstractNonMapDisplay {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getGlobalsMap() {
|
||||
Map<String, Object> globals = super.getGlobalsMap();
|
||||
if (globals
|
||||
.get(VizConstants.FRAMES_ID)
|
||||
.equals(TimeSeriesDescriptor.REAL_FRAME_COUNT_TO_USE_WHEN_FRAME_COUNT_IS_ONE)) {
|
||||
globals.put(VizConstants.FRAMES_ID, 1);
|
||||
}
|
||||
return globals;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -319,6 +319,7 @@ public class MetarViewer extends ViewerTab implements
|
|||
req.setSize(prevChkHrs);
|
||||
String siteObj = myGetCacheSiteObj(siteID, prevChkHrs);
|
||||
if (siteObj == null) {
|
||||
// System.out
|
||||
// .println("Generate cache for: " + tag + " cnt " + cnt);
|
||||
CacheGuidanceRequest cReq = createCacheRequest(siteID,
|
||||
prevChkHrs);
|
||||
|
|
|
@ -35,6 +35,7 @@ import org.eclipse.swt.widgets.Composite;
|
|||
import org.eclipse.swt.widgets.Label;
|
||||
|
||||
import com.raytheon.edex.plugin.taf.common.TafRecord;
|
||||
import com.raytheon.uf.common.time.SimulatedTime;
|
||||
import com.raytheon.uf.common.util.StringUtil;
|
||||
import com.raytheon.uf.viz.core.jobs.IRequestCompleteListener;
|
||||
import com.raytheon.viz.aviation.resource.ResourceConfigMgr;
|
||||
|
@ -60,6 +61,7 @@ import com.raytheon.viz.aviation.xml.MonitorCfg;
|
|||
* Oct 6, 2010 7229 rferrel Update to Metar/Taf's set time methods.
|
||||
* Nov 4, 2010 6866 rferrel Impact statements no longer malformed.
|
||||
* May 13, 2011 8611 rferrel Added type to help determine blink state.
|
||||
* Apr 30, 2012 14717 zhao Indicators turn gray when Metar is outdated
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -68,7 +70,16 @@ import com.raytheon.viz.aviation.xml.MonitorCfg;
|
|||
*/
|
||||
public class SiteMonitor implements IRequestCompleteListener<Map<?, ?>> {
|
||||
|
||||
/**
|
||||
/**
|
||||
* For DR14717:
|
||||
* check if Metar is outdated
|
||||
* and turn indicator labels gray when Metar is outdated
|
||||
*/
|
||||
private static long latestMetarTime = -1;
|
||||
private final int GRAY_COLOR_SEVERITY = 1;
|
||||
private boolean GRAY_LABEL = false;
|
||||
|
||||
/**
|
||||
* False while monitor is running a query otherwise true.
|
||||
*/
|
||||
private final AtomicBoolean requestCompleted = new AtomicBoolean(true);
|
||||
|
@ -389,6 +400,11 @@ public class SiteMonitor implements IRequestCompleteListener<Map<?, ?>> {
|
|||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void requestComplete(Map<?, ?> result) {
|
||||
/**
|
||||
* DR14717: Outdated Metar should turn gray
|
||||
*/
|
||||
String thisMonitor = this.getMonitorClassName();
|
||||
|
||||
if (!parent.isDisposed()) {
|
||||
Object obj = result.get("fatal");
|
||||
if (obj != null) {
|
||||
|
@ -409,6 +425,19 @@ public class SiteMonitor implements IRequestCompleteListener<Map<?, ?>> {
|
|||
alertMap.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* DR14717: for checking if Metar is outdated.
|
||||
*/
|
||||
if ( thisMonitor.equals("MetarMonitor") ) {
|
||||
Map<?, ?> mtrdcdMap = (Map<?, ?>) statusMap.get("dcd");
|
||||
if ( mtrdcdMap != null ) {
|
||||
Map<?, ?> mtrItimeMap = (Map<?, ?>) mtrdcdMap.get("itime");
|
||||
latestMetarTime = ((Float) mtrItimeMap.get("value")).longValue() * 1000;
|
||||
}
|
||||
}
|
||||
|
||||
long currentTime = SimulatedTime.getSystemTime().getTime().getTime();
|
||||
|
||||
for (Object key : keys) {
|
||||
Label label = labelMap.get(key);
|
||||
if (label != null && !label.isDisposed()) {
|
||||
|
@ -417,7 +446,42 @@ public class SiteMonitor implements IRequestCompleteListener<Map<?, ?>> {
|
|||
if (severity > maxSeverity) {
|
||||
maxSeverity = severity;
|
||||
}
|
||||
label.setBackground(colors[severity]);
|
||||
|
||||
String msg = (String) valueMap.get("msg");
|
||||
|
||||
/**
|
||||
* DR14717: Metar monitor indicators should turn gray when Metar is outdated
|
||||
*/
|
||||
if ( latestMetarTime > 0 ) {
|
||||
if ( currentTime > latestMetarTime + TafSiteComp.METAR_TIMEOUT_4HR
|
||||
&& ( thisMonitor.equals("MetarMonitor") || thisMonitor.equals("PersistMonitor") ) ) {
|
||||
/**
|
||||
* both Current observation monitoring indicators
|
||||
* and persistence indicators should turn gray
|
||||
*/
|
||||
GRAY_LABEL = true;
|
||||
msg = "METAR outdated";
|
||||
} else if ( currentTime > latestMetarTime + TafSiteComp.METAR_TIMEOUT_2HR
|
||||
&& thisMonitor.equals("PersistMonitor") ) {
|
||||
/**
|
||||
* Persistence indicators should turn gray
|
||||
*/
|
||||
GRAY_LABEL = true;
|
||||
msg = "METAR outdated for persistence monitoring";
|
||||
}
|
||||
}
|
||||
|
||||
if ( latestMetarTime < 0 && thisMonitor.equals("PersistMonitor") ) {
|
||||
parentSiteComp.setPersistMonitorProcessedFirst(true);
|
||||
}
|
||||
|
||||
if ( GRAY_LABEL ) {
|
||||
label.setBackground(colors[GRAY_COLOR_SEVERITY]);
|
||||
GRAY_LABEL = false;
|
||||
} else {
|
||||
label.setBackground(colors[severity]);
|
||||
}
|
||||
|
||||
String toolTip = null;
|
||||
String taf = (String) tafMap.get("text");
|
||||
Object text = statusMap.get("text");
|
||||
|
@ -428,7 +492,6 @@ public class SiteMonitor implements IRequestCompleteListener<Map<?, ?>> {
|
|||
}
|
||||
}
|
||||
|
||||
String msg = (String) valueMap.get("msg");
|
||||
toolTip = toolTipFormat(taf, text, msg,
|
||||
impactPlacement.toLowerCase());
|
||||
|
||||
|
@ -567,4 +630,17 @@ public class SiteMonitor implements IRequestCompleteListener<Map<?, ?>> {
|
|||
return cfg.getClassName();
|
||||
}
|
||||
|
||||
/**
|
||||
* for DR14717:
|
||||
*/
|
||||
public Map<String, Label> getLabelMap() {
|
||||
return labelMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* for DR14717:
|
||||
*/
|
||||
public Color getGraySeverityColor() {
|
||||
return getSeverityColors()[GRAY_COLOR_SEVERITY];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ import java.util.Date;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
|
@ -88,6 +89,7 @@ import com.raytheon.viz.avnconfig.IStatusSettable;
|
|||
* is false.
|
||||
* 05/13/2011 8611 rferrel Added type to Site Monitor requests and update
|
||||
* Viewer when a METAR changes alert status.
|
||||
* 04/26/2012 14717 zhao Indicator labels turn gray when Metar is outdated
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -106,8 +108,28 @@ public class TafSiteComp {
|
|||
* A metar is good for up to one hour and can be issued up to 10 minutes
|
||||
* before they take affect. This is the time out in milliseconds for 1 hour
|
||||
* with a 10 minute grace period.
|
||||
*
|
||||
* DR14717: changed grace period from 10 minutes to 5 minutes.
|
||||
*/
|
||||
private final static long METAR_TIMEOUT = (1L * 60L + 10L) * 60L * 1000L;
|
||||
private final static long METAR_TIMEOUT = (1L * 60L + 5L) * 60L * 1000L;
|
||||
|
||||
/**
|
||||
* DR14717: When Metar is 2 hours old, the persistence indicators turn gray.
|
||||
* This is the timeout in milliseconds for 2 hours.
|
||||
*/
|
||||
public final static long METAR_TIMEOUT_2HR = 1L * 60L * 60L * 1000L;
|
||||
|
||||
/**
|
||||
* DR14717: When Metar is 4 hours old, Metar Time Label is replaced by "None",
|
||||
* and the current observation and persistence indicators turn gray.
|
||||
* This is the timeout in milliseconds for 4 hours.
|
||||
*/
|
||||
public final static long METAR_TIMEOUT_4HR = 4L * 60L * 60L * 1000L;
|
||||
|
||||
/**
|
||||
* DR14717:
|
||||
*/
|
||||
private boolean persistMonitorProcessedFirst = false;
|
||||
|
||||
/**
|
||||
* A TAF is good for up to 6 hours and can be issued up to 40 minutes before
|
||||
|
@ -628,8 +650,32 @@ public class TafSiteComp {
|
|||
+ timestamp.substring(4, 6));
|
||||
long currentTime = SimulatedTime.getSystemTime().getTime()
|
||||
.getTime();
|
||||
if (currentTime > (metarTime + METAR_TIMEOUT)) {
|
||||
|
||||
if ( currentTime > ( metarTime + METAR_TIMEOUT_4HR ) ) {
|
||||
mtrTimeLbl.setText("None");
|
||||
mtrTimeLbl.setBackground(getWarningColor());
|
||||
if ( persistMonitorProcessedFirst ) {
|
||||
SiteMonitor psstMonitor = monitorArray.get(1);
|
||||
Color grayColor = psstMonitor.getGraySeverityColor();
|
||||
Map<String, Label> psstLabelMap = psstMonitor.getLabelMap();
|
||||
Set<String> psstKeys = psstLabelMap.keySet();
|
||||
for ( String key : psstKeys ) {
|
||||
psstLabelMap.get(key).setBackground(grayColor);
|
||||
}
|
||||
}
|
||||
} else if (currentTime > (metarTime + METAR_TIMEOUT)) {
|
||||
mtrTimeLbl.setBackground(getWarningColor());
|
||||
if ( currentTime > ( metarTime + METAR_TIMEOUT_2HR ) ) {
|
||||
if ( persistMonitorProcessedFirst ) {
|
||||
SiteMonitor psstMonitor = monitorArray.get(1);
|
||||
Color grayColor = psstMonitor.getGraySeverityColor();
|
||||
Map<String, Label> psstLabelMap = psstMonitor.getLabelMap();
|
||||
Set<String> psstKeys = psstLabelMap.keySet();
|
||||
for ( String key : psstKeys ) {
|
||||
psstLabelMap.get(key).setBackground(grayColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mtrTimeLbl.setBackground(getBackgroundColor());
|
||||
}
|
||||
|
@ -764,4 +810,8 @@ public class TafSiteComp {
|
|||
return org.eclipse.core.runtime.Status.OK_STATUS;
|
||||
}
|
||||
}
|
||||
|
||||
public void setPersistMonitorProcessedFirst(boolean b) {
|
||||
persistMonitorProcessedFirst = b;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,6 +78,12 @@ public abstract class AbstractGLMesh implements IMesh {
|
|||
|
||||
protected SharedCoordinateKey key;
|
||||
|
||||
// For world wrapping we maintain a set of triangle strips that fill in any
|
||||
// cut segements.
|
||||
private GLGeometryObject2D wwcVertexCoords;
|
||||
|
||||
private GLGeometryObject2D wwcTextureCoords;
|
||||
|
||||
private Runnable calculate = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -147,12 +153,22 @@ public abstract class AbstractGLMesh implements IMesh {
|
|||
// We finished calculating the mesh, compile it
|
||||
sharedTextureCoords = SharedCoordMap.get(key, glTarget);
|
||||
vertexCoords.compile(glTarget.getGl());
|
||||
if (wwcTextureCoords != null && wwcVertexCoords != null) {
|
||||
wwcTextureCoords.compile(glTarget.getGl());
|
||||
wwcVertexCoords.compile(glTarget.getGl());
|
||||
}
|
||||
this.internalState = internalState = State.COMPILED;
|
||||
}
|
||||
|
||||
if (internalState == State.COMPILED) {
|
||||
GLGeometryPainter.paintGeometries(glTarget.getGl(),
|
||||
vertexCoords, sharedTextureCoords.getTextureCoords());
|
||||
if (wwcTextureCoords != null && wwcVertexCoords != null) {
|
||||
glTarget.getGl().glColor3f(1.0f, 0.0f, 0.0f);
|
||||
GLGeometryPainter.paintGeometries(glTarget.getGl(),
|
||||
wwcVertexCoords, wwcTextureCoords);
|
||||
glTarget.getGl().glColor3f(0.0f, 1.0f, 0.0f);
|
||||
}
|
||||
return PaintStatus.PAINTED;
|
||||
} else if (internalState == State.CALCULATING) {
|
||||
target.setNeedsRefresh(true);
|
||||
|
@ -181,6 +197,14 @@ public abstract class AbstractGLMesh implements IMesh {
|
|||
SharedCoordMap.remove(key);
|
||||
sharedTextureCoords = null;
|
||||
}
|
||||
if (wwcTextureCoords != null) {
|
||||
wwcTextureCoords.dispose();
|
||||
wwcTextureCoords = null;
|
||||
}
|
||||
if (wwcVertexCoords != null) {
|
||||
wwcVertexCoords.dispose();
|
||||
wwcVertexCoords = null;
|
||||
}
|
||||
internalState = State.INVALID;
|
||||
}
|
||||
}
|
||||
|
@ -227,21 +251,21 @@ public abstract class AbstractGLMesh implements IMesh {
|
|||
* worldCoordinates[0].length);
|
||||
// Check for world wrapping
|
||||
WorldWrapChecker wwc = new WorldWrapChecker(targetGeometry);
|
||||
|
||||
for (int i = 0; i < worldCoordinates.length; ++i) {
|
||||
double[][] strip = worldCoordinates[i];
|
||||
List<double[]> vSegment = new ArrayList<double[]>();
|
||||
double[] prev1 = null, prev2 = null;
|
||||
for (int j = 0; j < strip.length; ++j) {
|
||||
double[] next = strip[j];
|
||||
|
||||
if ((prev1 != null && wwc.check(prev1[0], next[0]))
|
||||
|| (prev2 != null && wwc.check(prev2[0], next[0]))) {
|
||||
vertexCoords.addSegment(vSegment
|
||||
.toArray(new double[vSegment.size()][]));
|
||||
vSegment = new ArrayList<double[]>();
|
||||
prev1 = null;
|
||||
prev2 = null;
|
||||
fixWorldWrap(wwc, prev2, prev1, next, i, j);
|
||||
if ((prev1 != null && wwc.check(prev1[0], next[0]))
|
||||
|| vSegment.size() > 1) {
|
||||
vertexCoords.addSegment(vSegment
|
||||
.toArray(new double[vSegment.size()][]));
|
||||
vSegment = new ArrayList<double[]>();
|
||||
}
|
||||
}
|
||||
vSegment.add(worldToPixel(next));
|
||||
|
||||
|
@ -260,6 +284,123 @@ public abstract class AbstractGLMesh implements IMesh {
|
|||
return false;
|
||||
}
|
||||
|
||||
private void fixWorldWrap(WorldWrapChecker wwc, double[] p2, double[] p1,
|
||||
double[] n, int i, int j) {
|
||||
// make sure we have all 3 points
|
||||
if (p2 == null || p1 == null || n == null) {
|
||||
return;
|
||||
}
|
||||
// figure out texture coordinates
|
||||
float dX = (1.0f / (key.horizontalDivisions));
|
||||
float dY = (1.0f / (key.verticalDivisions));
|
||||
double[] tp2 = { (i + ((j - 2) % 2)) * dX, (j - 2) / 2 * dY };
|
||||
double[] tp1 = { (i + ((j - 1) % 2)) * dX, (j - 1) / 2 * dY };
|
||||
double[] tn = { (i + (j % 2)) * dX, j / 2 * dY };
|
||||
// find which two sides are cut
|
||||
boolean wwcp1n = wwc.check(p1[0], n[0]);
|
||||
boolean wwcp2n = wwc.check(p2[0], n[0]);
|
||||
boolean wwcp1p2 = wwc.check(p1[0], p2[0]);
|
||||
double[] a = null;
|
||||
double[] b = null;
|
||||
double[] c = null;
|
||||
double[] ta = null;
|
||||
double[] tb = null;
|
||||
double[] tc = null;
|
||||
if (wwcp1n && wwcp2n && !wwcp1p2) {
|
||||
a = n;
|
||||
b = p1;
|
||||
c = p2;
|
||||
ta = tn;
|
||||
tb = tp1;
|
||||
tc = tp2;
|
||||
} else if (wwcp1n && !wwcp2n && wwcp1p2) {
|
||||
a = p1;
|
||||
b = p2;
|
||||
c = n;
|
||||
ta = tp1;
|
||||
tb = tp2;
|
||||
tc = tn;
|
||||
} else if (!wwcp1n && wwcp2n && wwcp1p2) {
|
||||
a = p2;
|
||||
b = n;
|
||||
c = p1;
|
||||
ta = tp2;
|
||||
tb = tn;
|
||||
tc = tp1;
|
||||
} else {
|
||||
// this occurs when a pole is within the triangle, maybe we should
|
||||
// try to cut these triangles, but its hard.
|
||||
return;
|
||||
}
|
||||
if (wwcTextureCoords == null || wwcVertexCoords == null) {
|
||||
wwcVertexCoords = new GLGeometryObject2D(new GLGeometryObjectData(
|
||||
GL.GL_TRIANGLE_STRIP, GL.GL_VERTEX_ARRAY));
|
||||
wwcTextureCoords = new GLGeometryObject2D(new GLGeometryObjectData(
|
||||
GL.GL_TRIANGLE_STRIP, GL.GL_TEXTURE_COORD_ARRAY));
|
||||
}
|
||||
// at this point triangle abc is a triangle in which sides ab and ac
|
||||
// are cut by the inverse central meridian. We need to find the two
|
||||
// points of intersection and use them to make a triangle with a ion one
|
||||
// side and a quad with bc on the other side. ta, tb, tc represent the
|
||||
// texture coordinates for their respective points.
|
||||
double ax = wwc.toProjectionRange(a[0]);
|
||||
double bx = wwc.toProjectionRange(b[0]);
|
||||
double cx = wwc.toProjectionRange(c[0]);
|
||||
// Get various x distances to use as weights in interpolating
|
||||
double abDist = 360 - Math.abs(ax - bx);
|
||||
double acDist = 360 - Math.abs(ax - cx);
|
||||
double amDist = 360 + ax - wwc.getInverseCentralMeridian();
|
||||
if (amDist > 360) {
|
||||
amDist = amDist - 360;
|
||||
}
|
||||
// x location to use for midpoints on the triangle side, should be on
|
||||
// same side of central meridian as a
|
||||
double tx = wwc.getInverseCentralMeridian() - 360 + 0.00001;
|
||||
// x location to use for midpoints on the quad side, should be on
|
||||
// same side of central meridian as b and c
|
||||
double qx = wwc.getInverseCentralMeridian() - 0.00001;
|
||||
// If a is closer to the central meridian on the other side then switch
|
||||
// amDist, tx, and qx
|
||||
if (amDist > 180) {
|
||||
amDist = 360 - amDist;
|
||||
double tmp = tx;
|
||||
tx = qx;
|
||||
qx = tmp;
|
||||
}
|
||||
// interpolated y coordinate and texture coordinates along the ab line.
|
||||
double aby = a[1] + amDist * (b[1] - a[1]) / abDist;
|
||||
double abtx = ta[0] + amDist * (tb[0] - ta[0]) / abDist;
|
||||
double abty = ta[1] + amDist * (tb[1] - ta[1]) / abDist;
|
||||
// interpolated y coordinate and texture coordinates along the ac line.
|
||||
double acy = a[1] + amDist * (c[1] - a[1]) / acDist;
|
||||
double actx = ta[0] + amDist * (tc[0] - ta[0]) / acDist;
|
||||
double acty = ta[1] + amDist * (tc[1] - ta[1]) / acDist;
|
||||
// all done with math, assemble everything into a triangle and a quad to
|
||||
// set in the geometry.
|
||||
double[][] tri = new double[3][];
|
||||
double[][] triTex = new double[3][];
|
||||
tri[0] = worldToPixel(a);
|
||||
triTex[0] = ta;
|
||||
tri[1] = worldToPixel(new double[] { tx, aby });
|
||||
triTex[1] = new double[] { abtx, abty };
|
||||
tri[2] = worldToPixel(new double[] { tx, acy });
|
||||
triTex[2] = new double[] { actx, acty };
|
||||
double[][] quad = new double[4][];
|
||||
double[][] quadTex = new double[4][];
|
||||
quad[0] = worldToPixel(b);
|
||||
quadTex[0] = tb;
|
||||
quad[1] = worldToPixel(c);
|
||||
quadTex[1] = tc;
|
||||
quad[2] = worldToPixel(new double[] { qx, aby });
|
||||
quadTex[2] = new double[] { abtx, abty };
|
||||
quad[3] = worldToPixel(new double[] { qx, acy });
|
||||
quadTex[3] = new double[] { actx, acty };
|
||||
wwcVertexCoords.addSegment(tri);
|
||||
wwcTextureCoords.addSegment(triTex);
|
||||
wwcVertexCoords.addSegment(quad);
|
||||
wwcTextureCoords.addSegment(quadTex);
|
||||
}
|
||||
|
||||
protected final double[] worldToPixel(double[] world) {
|
||||
double[] in = null;
|
||||
if (world.length == 2) {
|
||||
|
|
|
@ -27,6 +27,7 @@ import org.geotools.geometry.jts.ReferencedEnvelope;
|
|||
import org.opengis.referencing.operation.MathTransform;
|
||||
import org.opengis.referencing.operation.TransformException;
|
||||
|
||||
import com.raytheon.uf.common.geospatial.MapUtil;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.viz.core.gl.AbstractGLMesh;
|
||||
|
@ -197,7 +198,11 @@ public class GLMesh2DStrips extends AbstractGLMesh {
|
|||
maxHorzDiv, mt);
|
||||
horzDiv = Math.max(horzDiv, horzDivTest);
|
||||
}
|
||||
|
||||
ReferencedEnvelope latLonEnv = envelope.transform(
|
||||
MapUtil.LATLON_PROJECTION, true, 100);
|
||||
if (latLonEnv.getWidth() > 180) {
|
||||
horzDiv = Math.max(horzDiv, 4);
|
||||
}
|
||||
return new SharedCoordinateKey(vertDiv, horzDiv);
|
||||
} catch (Exception e) {
|
||||
Activator.statusHandler
|
||||
|
|
|
@ -242,6 +242,7 @@ public abstract class AbstractGridData implements IGridData {
|
|||
* Resets the fields, then notifies the parm that history has updated.
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void resetSavePublishHistory() {
|
||||
for (GridDataHistory history : this.gridSlice.getHistory()) {
|
||||
history.setUpdateTime(null);
|
||||
|
@ -256,6 +257,7 @@ public abstract class AbstractGridData implements IGridData {
|
|||
*
|
||||
* @return true if the method succeeded
|
||||
*/
|
||||
@Override
|
||||
public boolean setSaveHistory() {
|
||||
Date current = SimulatedTime.getSystemTime().getTime();
|
||||
for (int i = 0; i < this.getHistory().length; i++) {
|
||||
|
@ -274,6 +276,7 @@ public abstract class AbstractGridData implements IGridData {
|
|||
* the modifier
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public void updateHistoryToModified(WsId modifier) {
|
||||
Date now = SimulatedTime.getSystemTime().getTime();
|
||||
for (int i = 0; i < getHistory().length; i++) {
|
||||
|
@ -295,6 +298,7 @@ public abstract class AbstractGridData implements IGridData {
|
|||
* @param sourceGrid
|
||||
* the original grid
|
||||
*/
|
||||
@Override
|
||||
public boolean copyGridValues(final IGridData sourceGrid) {
|
||||
populate();
|
||||
|
||||
|
@ -587,6 +591,7 @@ public abstract class AbstractGridData implements IGridData {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean smooth(final Date time, Grid2DBit pointsToSmooth) {
|
||||
populate();
|
||||
|
||||
|
@ -730,6 +735,7 @@ public abstract class AbstractGridData implements IGridData {
|
|||
// ---------------------------------------------------------
|
||||
// Checks ok to edit. If okay, then calls virtual doMoveCopy.
|
||||
// ---------------------------------------------------------------------------
|
||||
@Override
|
||||
public boolean moveCopyArea(final Date time,
|
||||
final Grid2DBit pointsToMoveCopy, final Point delta, boolean copyOp) {
|
||||
populate();
|
||||
|
@ -857,6 +863,10 @@ public abstract class AbstractGridData implements IGridData {
|
|||
if (!this.isPopulated()) {
|
||||
return;
|
||||
}
|
||||
String msg = "Depopulating " + getParm().getParmID() + " tr="
|
||||
+ getGridTime();
|
||||
statusHandler.handle(Priority.DEBUG, msg, new Exception("Debug: "
|
||||
+ msg));
|
||||
|
||||
this.lastAccessTime = SimulatedTime.getSystemTime().getTime();
|
||||
setGridSliceDataToNull();
|
||||
|
@ -865,6 +875,7 @@ public abstract class AbstractGridData implements IGridData {
|
|||
|
||||
protected abstract void setGridSliceDataToNull();
|
||||
|
||||
@Override
|
||||
public List<String> getHistorySites() {
|
||||
GridDataHistory[] h = this.getHistory();
|
||||
List<String> sites = new ArrayList<String>();
|
||||
|
|
|
@ -831,14 +831,17 @@ public class DiscreteGridData extends AbstractGridData implements INumpyable {
|
|||
return setIt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] getNumPy() {
|
||||
return new Object[] { this.getGrid().getBuffer().array() };
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNumpyX() {
|
||||
return this.getGrid().getXdim();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNumpyY() {
|
||||
return this.getGrid().getYdim();
|
||||
}
|
||||
|
@ -927,7 +930,7 @@ public class DiscreteGridData extends AbstractGridData implements INumpyable {
|
|||
if (points.get(i, j) == 1) {
|
||||
DiscreteKey combined = DiscreteKey.combine(
|
||||
key.get(values.get(i, j)),
|
||||
doGetDiscreteValue(grid, key, new Point(i, j)));
|
||||
doGetDiscreteValue(i, j));
|
||||
grid.set(i, j, lookupKeyValue(combined));
|
||||
}
|
||||
}
|
||||
|
@ -937,10 +940,9 @@ public class DiscreteGridData extends AbstractGridData implements INumpyable {
|
|||
setGrid(grid);
|
||||
}
|
||||
|
||||
protected DiscreteKey doGetDiscreteValue(Grid2DByte grid,
|
||||
List<DiscreteKey> key, Point gridLoc) {
|
||||
byte gridValue = grid.get(gridLoc.x, gridLoc.y);
|
||||
return key.get(gridValue);
|
||||
protected DiscreteKey doGetDiscreteValue(int x, int y) {
|
||||
byte gridValue = getGrid().get(x, y);
|
||||
return getKey()[gridValue];
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -807,14 +807,17 @@ public class WeatherGridData extends AbstractGridData implements INumpyable {
|
|||
return pointsToFillIn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] getNumPy() {
|
||||
return new Object[] { this.getGrid().getBuffer().array() };
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNumpyX() {
|
||||
return this.getGrid().getXdim();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNumpyY() {
|
||||
return this.getGrid().getYdim();
|
||||
}
|
||||
|
@ -897,8 +900,7 @@ public class WeatherGridData extends AbstractGridData implements INumpyable {
|
|||
if (points.get(i, j) == 1) {
|
||||
WeatherKey combined = new WeatherKey(key.get(values
|
||||
.get(i, j)));
|
||||
combined.addAll(doGetWeatherValue(grid, key, new Point(
|
||||
i, j)));
|
||||
combined.addAll(doGetWeatherValue(i, j));
|
||||
grid.set(i, j, lookupKeyValue(combined));
|
||||
}
|
||||
}
|
||||
|
@ -908,10 +910,9 @@ public class WeatherGridData extends AbstractGridData implements INumpyable {
|
|||
setGrid(grid);
|
||||
}
|
||||
|
||||
protected WeatherKey doGetWeatherValue(Grid2DByte grid,
|
||||
List<WeatherKey> key, Point gridLoc) {
|
||||
byte gridValue = grid.get(gridLoc.x, gridLoc.y);
|
||||
return key.get(gridValue);
|
||||
protected WeatherKey doGetWeatherValue(int x, int y) {
|
||||
byte gridValue = getGrid().get(x, y);
|
||||
return getKeys()[gridValue];
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -71,6 +71,7 @@ import com.raytheon.viz.gfe.types.MutableInteger;
|
|||
* 08/19/09 2547 rjpeter Implement Test/Prac database display.
|
||||
* 02/23/12 #346 dgilling Call Parm's dispose method when removing
|
||||
* a Parm.
|
||||
* 04/25/12 14495 ryu Query EDEX only when db is available.
|
||||
* </pre>
|
||||
*
|
||||
* @author bphillip
|
||||
|
@ -358,12 +359,14 @@ public class ParmManager extends AbstractParmManager {
|
|||
synchronized (this.parmIDCacheServer) {
|
||||
cacheParmIDs = this.parmIDCacheServer.get(dbID);
|
||||
}
|
||||
if ((cacheParmIDs == null) && (dbID.getDbType().equals("V"))) {
|
||||
ParmID[] vcParms = getAvailableParms(dbID);
|
||||
parmIDs.addAll(Arrays.asList(vcParms));
|
||||
} else if ((cacheParmIDs == null)
|
||||
&& (!dbID.getDbType().equals("V"))) {
|
||||
uncachedDbs.add(dbID);
|
||||
|
||||
if (cacheParmIDs == null) {
|
||||
if (dbID.getDbType().equals("V")) {
|
||||
ParmID[] vcParms = getAvailableParms(dbID);
|
||||
parmIDs.addAll(Arrays.asList(vcParms));
|
||||
} else if (availableServerDatabases.contains(dbID)) {
|
||||
uncachedDbs.add(dbID);
|
||||
}
|
||||
} else {
|
||||
parmIDs.addAll(cacheParmIDs);
|
||||
|
||||
|
@ -448,8 +451,7 @@ public class ParmManager extends AbstractParmManager {
|
|||
if (cacheParmIDs != null) {
|
||||
parmIds = new ArrayList<ParmID>(cacheParmIDs);
|
||||
} else {
|
||||
if ((!dbID.getDbType().endsWith("TMP"))
|
||||
&& (!dbID.getDbType().equals("V"))) {
|
||||
if (availableServerDatabases.contains(dbID)) {
|
||||
try {
|
||||
parmIds = dataManager.getClient().getParmList(dbID);
|
||||
} catch (GFEServerException e) {
|
||||
|
|
|
@ -39,6 +39,7 @@ import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID;
|
|||
import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.server.lock.LockTable;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.server.lock.LockTable.LockMode;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.server.lock.LockTable.LockStatus;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.server.message.ServerMsg;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.server.message.ServerResponse;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.server.request.LockRequest;
|
||||
|
@ -471,6 +472,7 @@ public class DbParm extends Parm {
|
|||
// List<IGridData> gridsSaved = new ArrayList<IGridData>();
|
||||
List<SaveGridRequest> sgr = new ArrayList<SaveGridRequest>();
|
||||
List<LockRequest> lreq = new ArrayList<LockRequest>();
|
||||
List<TimeRange> pendingUnlocks = new ArrayList<TimeRange>();
|
||||
|
||||
GridLocation gloc = this.getGridInfo().getGridLoc();
|
||||
int gridSize = gloc.getNx() * gloc.getNy();
|
||||
|
@ -488,6 +490,7 @@ public class DbParm extends Parm {
|
|||
}
|
||||
|
||||
boolean success = true;
|
||||
long size = 0;
|
||||
for (int i = 0; i < trs.size(); i++) {
|
||||
// ensure we have a lock for the time period
|
||||
TimeRange lockTime = new TimeRange();
|
||||
|
@ -507,7 +510,6 @@ public class DbParm extends Parm {
|
|||
IGridData[] grids = this.getGridInventory(lockTime);
|
||||
|
||||
List<GFERecord> records = new ArrayList<GFERecord>();
|
||||
long size = 0;
|
||||
boolean allSaved = true;
|
||||
|
||||
// time range remaining to be saved
|
||||
|
@ -539,7 +541,19 @@ public class DbParm extends Parm {
|
|||
.getGridTime().getEnd());
|
||||
sgr.add(new SaveGridRequest(getParmID(), tr, records,
|
||||
dataManager.clientISCSendStatus()));
|
||||
allSaved &= doSave(sgr);
|
||||
|
||||
// save this batch of grids
|
||||
if (doSave(sgr)) {
|
||||
// if successful add pending locks to unlock requests
|
||||
for (TimeRange t : pendingUnlocks) {
|
||||
lreq.add(new LockRequest(getParmID(), t,
|
||||
LockMode.UNLOCK));
|
||||
}
|
||||
} else {
|
||||
allSaved = false;
|
||||
}
|
||||
|
||||
pendingUnlocks.clear();
|
||||
sgr.clear();
|
||||
records.clear();
|
||||
size = 0;
|
||||
|
@ -551,14 +565,25 @@ public class DbParm extends Parm {
|
|||
if (size > 0 || saveTime.getDuration() > 0) {
|
||||
sgr.add(new SaveGridRequest(getParmID(), saveTime, records,
|
||||
dataManager.clientISCSendStatus()));
|
||||
allSaved &= doSave(sgr);
|
||||
}
|
||||
|
||||
// if we haven't had a failure yet add to pending locks
|
||||
if (allSaved) {
|
||||
lreq.add(new LockRequest(getParmID(), lockTime, LockMode.UNLOCK));
|
||||
pendingUnlocks.add(lockTime);
|
||||
}
|
||||
|
||||
success &= allSaved;
|
||||
}
|
||||
// if any pending saves
|
||||
if (sgr.size() > 0) {
|
||||
if (doSave(sgr)) {
|
||||
for (TimeRange t : pendingUnlocks) {
|
||||
lreq.add(new LockRequest(getParmID(), t, LockMode.UNLOCK));
|
||||
}
|
||||
} else {
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (lreq.size() > 0) {
|
||||
success &= requestLock(lreq);
|
||||
|
@ -617,8 +642,6 @@ public class DbParm extends Parm {
|
|||
}
|
||||
|
||||
long milliseconds = 1000L * seconds;
|
||||
// get my locks
|
||||
List<TimeRange> myLocks = this.getLockTable().lockedByMe();
|
||||
|
||||
// go through each grid in existence
|
||||
// must use for i loop to avoid concurrentModification exception
|
||||
|
@ -646,18 +669,15 @@ public class DbParm extends Parm {
|
|||
|
||||
// grid is populated, is it modified?
|
||||
final TimeRange gTime = grid.getGridTime();
|
||||
boolean locked = false;
|
||||
for (int j = 0; j < myLocks.size(); j++) {
|
||||
if (gTime.overlaps(myLocks.get(j))) {
|
||||
locked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
boolean locked = this.getLockTable().checkLock(gTime)
|
||||
.equals(LockStatus.LOCKED_BY_ME);
|
||||
|
||||
// only deallocate unlocked grids
|
||||
if (!locked) {
|
||||
// logDebug << "Deallocating " << parmID() << " tr="
|
||||
// << gTime << std::endl;
|
||||
String msg = "Deallocating " + getParmID() + " tr=" + gTime;
|
||||
statusHandler.handle(Priority.DEBUG, msg, new Exception(
|
||||
"Debug: " + msg));
|
||||
|
||||
grid.depopulate();
|
||||
}
|
||||
}
|
||||
|
@ -679,6 +699,11 @@ public class DbParm extends Parm {
|
|||
|
||||
List<LockRequest> lreq = new ArrayList<LockRequest>(timesToSave.size());
|
||||
for (int i = 0; i < timesToSave.size(); i++) {
|
||||
String msg = "Reverting " + getParmID() + " tr="
|
||||
+ timesToSave.get(i);
|
||||
statusHandler.handle(Priority.DEBUG, msg, new Exception("Debug: "
|
||||
+ msg));
|
||||
|
||||
boolean success = true;
|
||||
IGridData[] grids = null;
|
||||
try {
|
||||
|
|
|
@ -1963,6 +1963,12 @@ public abstract class Parm implements Comparable<Parm> {
|
|||
int i;
|
||||
for (i = 0; i < this.undoBuffers.size(); i++) {
|
||||
UndoBuffer undoBuffer = this.undoBuffers.get(i);
|
||||
|
||||
String msg = "Undoing " + getParmID() + " tr="
|
||||
+ undoBuffer.getUndoTimeRange();
|
||||
statusHandler.handle(Priority.DEBUG, msg, new Exception("Debug: "
|
||||
+ msg));
|
||||
|
||||
baffectedTR[i] = undoBuffer.getUndoTimeRange();
|
||||
bgridCopies[i] = new ArrayList<IGridData>();
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ package com.raytheon.viz.gfe.core.parm;
|
|||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.eclipse.core.runtime.ListenerList;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.server.lock.LockTable;
|
||||
|
@ -58,7 +57,6 @@ import com.raytheon.viz.gfe.core.wxvalue.WxValue;
|
|||
* multiple registration
|
||||
* Feb 23, 2012 #346 dgilling Implement clearParmListeners.
|
||||
* Mar 01, 2012 #346 dgilling Use identity-based ListenerLists.
|
||||
* Mar 21, 2012 14583 mli fix invalid thread access for PickupValueChange
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -248,13 +246,14 @@ public class ParmListeners {
|
|||
for (Object listener : this.pickupValueChangedListeners.getListeners()) {
|
||||
final IPickupValueChangedListener casted = (IPickupValueChangedListener) listener;
|
||||
|
||||
Display.getDefault().asyncExec( new Runnable() {
|
||||
Runnable notTask = new Runnable() {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
casted.pickupValueChanged(parm, pickupValue);
|
||||
}
|
||||
});
|
||||
};
|
||||
notificationPool.schedule(notTask);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1084,16 +1084,14 @@ public class ContourTool extends AbstractFreeformTool implements
|
|||
{
|
||||
Collections.reverse(insert);
|
||||
contour.remove(0, startIndex);
|
||||
contour.remove(endIndex,
|
||||
contour.getLineString().getNumPoints() - 1);
|
||||
contour.replace(endIndex, contour.getLineString()
|
||||
.getNumPoints(), insert);
|
||||
} else // startIndex > endIndex
|
||||
{
|
||||
contour.remove(startIndex, contour.getLineString()
|
||||
.getNumPoints() - 1);
|
||||
contour.replace(startIndex, contour.getLineString()
|
||||
.getNumPoints(), insert);
|
||||
contour.remove(0, endIndex);
|
||||
}
|
||||
// append the new points
|
||||
contour.append(insert);
|
||||
contour.setModified(true);
|
||||
}
|
||||
contours.set(contourIndex, contour);
|
||||
|
|
|
@ -280,6 +280,9 @@ public class SamplePainter {
|
|||
inGrid = true;
|
||||
}
|
||||
|
||||
// sample label color
|
||||
RGB labelColor = new RGB(255, 255, 255);
|
||||
|
||||
// get the list of samples that should be painted and in the
|
||||
// order
|
||||
for (GridID grid : grids) {
|
||||
|
@ -290,30 +293,6 @@ public class SamplePainter {
|
|||
continue; // skip
|
||||
}
|
||||
|
||||
// calculate color
|
||||
RGB labelColor;
|
||||
// AFPSConfig.get(pName + "_Sample_color", labelColor);
|
||||
String cfgColor = Activator.getDefault().getPreferenceStore()
|
||||
.getString(pName + "_Sample_color");
|
||||
if (!cfgColor.equals("")) {
|
||||
labelColor = RGBColors.getRGBColor(cfgColor);
|
||||
} else {
|
||||
labelColor = grid.getParm().getDisplayAttributes()
|
||||
.getBaseColor();
|
||||
if (grid.equals(imageGrid)) {
|
||||
RGB color = new RGB(255, 255, 255);
|
||||
String imgLegColor = Activator.getDefault()
|
||||
.getPreferenceStore()
|
||||
.getString("ImageLegend_color");
|
||||
|
||||
if (!imgLegColor.equals("")) {
|
||||
color = RGBColors.getRGBColor(imgLegColor);
|
||||
}
|
||||
|
||||
labelColor = color;
|
||||
}
|
||||
}
|
||||
|
||||
// get the data value
|
||||
String label = NO_DATA_LABEL;
|
||||
if (inGrid) {
|
||||
|
|
|
@ -50,8 +50,8 @@ import com.vividsolutions.jts.geom.Point;
|
|||
public class GfeImageUtil {
|
||||
|
||||
public static GridGeometry2D getLocationGeometry(GridLocation gloc,
|
||||
com.vividsolutions.jts.geom.Envelope env, float width,
|
||||
float height, float percentLeft, float percentRight,
|
||||
com.vividsolutions.jts.geom.Envelope env, Integer width,
|
||||
Integer height, float percentLeft, float percentRight,
|
||||
float percentTop, float percentBottom) {
|
||||
|
||||
Envelope envelope = null;
|
||||
|
@ -88,9 +88,33 @@ public class GfeImageUtil {
|
|||
envelope.getMaximum(0) + dRight);
|
||||
newEnvelope.setRange(1, envelope.getMinimum(1) - dBottom,
|
||||
envelope.getMaximum(1) + dTop);
|
||||
|
||||
org.eclipse.swt.graphics.Point p = adjustAspect(width, height,
|
||||
newEnvelope);
|
||||
|
||||
newGridGeometry = new GridGeometry2D(new GeneralGridEnvelope(new int[] {
|
||||
0, 0 }, new int[] { (int) width, (int) height }), newEnvelope);
|
||||
0, 0 }, new int[] { p.x, p.y }), newEnvelope);
|
||||
|
||||
return newGridGeometry;
|
||||
}
|
||||
|
||||
private static org.eclipse.swt.graphics.Point adjustAspect(Integer width,
|
||||
Integer height, GeneralEnvelope wd) {
|
||||
// Calculate the correct aspect ratio and adjust the width
|
||||
// and height to fit.
|
||||
if (width == null && height == null) {
|
||||
width = 400; // The default
|
||||
}
|
||||
|
||||
org.eclipse.swt.graphics.Point p = new org.eclipse.swt.graphics.Point(
|
||||
0, 0);
|
||||
if (width != null) {
|
||||
p.x = width;
|
||||
p.y = (int) ((width * wd.getSpan(1)) / wd.getSpan(0));
|
||||
} else {
|
||||
p.x = (int) ((height * wd.getSpan(0)) / wd.getSpan(1));
|
||||
p.y = height;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,7 @@ import com.raytheon.viz.gfe.smarttool.PreviewInfo;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 9, 2010 njensen Initial creation
|
||||
* 4/26/2012 14748 ryu Use edit area and time range from preview info
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -84,8 +85,8 @@ public class ProcedureUtil {
|
|||
final ProcedureRequest req = new ProcedureRequest();
|
||||
req.setProcedureName(procName);
|
||||
req.setPreview(pi);
|
||||
req.setRefSet(editArea);
|
||||
req.setTimeRange(timeRange);
|
||||
req.setRefSet(pi.getEditAction().getRefSet());
|
||||
req.setTimeRange(pi.getEditAction().getTimeRange());
|
||||
|
||||
if (varDict != null) {
|
||||
req.setVarDict(varDict);
|
||||
|
|
|
@ -37,6 +37,7 @@ import com.raytheon.uf.viz.core.drawables.PaintProperties;
|
|||
import com.raytheon.uf.viz.core.drawables.ResourcePair;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.ColorMapCapability;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.ImagingCapability;
|
||||
import com.raytheon.viz.gfe.Activator;
|
||||
import com.raytheon.viz.gfe.GFEOperationFailedException;
|
||||
import com.raytheon.viz.gfe.core.DataManager;
|
||||
|
@ -134,11 +135,6 @@ public class ContinuousColorbar implements IColorBarDisplay {
|
|||
PixelExtent pe = colorbarResource.getExtent();
|
||||
float center = (float) ((pe.getMinY() + pe.getMaxY()) / 2.0);
|
||||
|
||||
DrawableColorMap dcm = new DrawableColorMap(cmap);
|
||||
dcm.alpha = 1.0f;
|
||||
dcm.extent = pe;
|
||||
target.drawColorRamp(dcm);
|
||||
|
||||
ResourcePair rscPair = spatialDisplayManager.getResourcePair(parm);
|
||||
if (rscPair == null) {
|
||||
// spatial display manager deactivated since we got the color map?
|
||||
|
@ -146,6 +142,14 @@ public class ContinuousColorbar implements IColorBarDisplay {
|
|||
+ parm.getParmID().getCompositeName() + ", exiting paint()");
|
||||
return;
|
||||
}
|
||||
|
||||
DrawableColorMap dcm = new DrawableColorMap(cmap);
|
||||
dcm.alpha = 1.0f;
|
||||
dcm.extent = pe;
|
||||
dcm.interpolate = rscPair.getResource()
|
||||
.getCapability(ImagingCapability.class).isInterpolationState();
|
||||
target.drawColorRamp(dcm);
|
||||
|
||||
GFEResource rsc = (GFEResource) rscPair.getResource();
|
||||
float minParm = rsc.getCapability(ColorMapCapability.class)
|
||||
.getColorMapParameters().getColorMapMin();
|
||||
|
|
|
@ -112,6 +112,8 @@ public class FieldDefinition {
|
|||
|
||||
private float resolution;
|
||||
|
||||
private int precision;
|
||||
|
||||
public FieldDefinition() {
|
||||
valueList = new ArrayList<Object>();
|
||||
}
|
||||
|
@ -125,13 +127,15 @@ public class FieldDefinition {
|
|||
* @param resolution
|
||||
*/
|
||||
public FieldDefinition(Object name, String description, FieldType type,
|
||||
Object defaultValue, List<Object> valueList, float resolution) {
|
||||
Object defaultValue, List<Object> valueList, float resolution,
|
||||
int precision) {
|
||||
this.name = name;
|
||||
this.description = description;
|
||||
this.type = type;
|
||||
this.defaultValue = defaultValue;
|
||||
this.valueList = valueList;
|
||||
this.resolution = resolution;
|
||||
this.precision = precision;
|
||||
}
|
||||
|
||||
public Object getName() {
|
||||
|
@ -182,6 +186,14 @@ public class FieldDefinition {
|
|||
this.resolution = resolution;
|
||||
}
|
||||
|
||||
public void setPrecision(int precision) {
|
||||
this.precision = precision;
|
||||
}
|
||||
|
||||
private int getPrecision() {
|
||||
return precision;
|
||||
}
|
||||
|
||||
public static List<Widget> buildWidgetList(List<FieldDefinition> fieldDefs,
|
||||
DataManager dataMgr) {
|
||||
List<Widget> widgets = new ArrayList<Widget>();
|
||||
|
@ -208,7 +220,7 @@ public class FieldDefinition {
|
|||
} else if (fieldDef.getType() == FieldType.SCALE) {
|
||||
widget = makeScale(fieldDef.getDescription(),
|
||||
fieldDef.getValueList(), fieldDef.getDefaultValue(),
|
||||
fieldDef.getResolution());
|
||||
fieldDef.getResolution(), fieldDef.getPrecision());
|
||||
} else if (fieldDef.getType() == FieldType.SCROLLBAR) {
|
||||
widget = makeScrollbar(fieldDef.getDescription(),
|
||||
fieldDef.getDefaultValue());
|
||||
|
@ -345,14 +357,12 @@ public class FieldDefinition {
|
|||
}
|
||||
|
||||
private static ScaleWidget makeScale(String labelText,
|
||||
List<? extends Object> valueList, Object initialValue, float res) {
|
||||
List<? extends Object> valueList, Object initialValue, float res, int precision) {
|
||||
ScaleWidget scale = new ScaleWidget(labelText);
|
||||
scale.setOptions(valueList);
|
||||
scale.setValue(initialValue);
|
||||
|
||||
if (res != 0.0f) {
|
||||
scale.setResolution(res);
|
||||
}
|
||||
scale.setResolution(res);
|
||||
scale.setPrecision(precision);
|
||||
|
||||
return scale;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
com.raytheon.viz.grid.xml.ParameterList
|
||||
com.raytheon.viz.grid.xml.ParameterMapping
|
||||
com.raytheon.viz.grid.xml.ValidTypeFile
|
||||
com.raytheon.viz.grid.xml.ValidType
|
||||
com.raytheon.viz.grid.rsc.GridResourceData
|
||||
com.raytheon.viz.grid.rsc.FfgVizGroupResourceData
|
||||
com.raytheon.viz.grid.rsc.RcmResourceData
|
||||
|
|
|
@ -4723,4 +4723,12 @@
|
|||
<displayUnits>K/hPa/s*1.0E-5</displayUnits>
|
||||
</imageStyle>
|
||||
</styleRule>
|
||||
<styleRule>
|
||||
<paramLevelMatches>
|
||||
<parameter>Mmag</parameter>
|
||||
</paramLevelMatches>
|
||||
<imageStyle>
|
||||
<displayUnits label="gm/kgs">g*m/(kg*s)</displayUnits>
|
||||
</imageStyle>
|
||||
</styleRule>
|
||||
</styleRuleset>
|
|
@ -215,19 +215,23 @@ public class D2DGribGridResource extends GribGridResource<GridResourceData>
|
|||
@Override
|
||||
public LegendParameters getLegendParameters() {
|
||||
LegendParameters legendParams = new LegendParameters();
|
||||
legendParams.model = gribModel;
|
||||
List<PluginDataObject> pdos = getCurrentPluginDataObjects();
|
||||
if (pdos != null && !pdos.isEmpty()) {
|
||||
gribModel = ((GribRecord) pdos.get(0)).getModelInfo();
|
||||
}
|
||||
legendParams.model = gribModel;
|
||||
if (stylePreferences != null) {
|
||||
legendParams.unit = stylePreferences.getDisplayUnitLabel();
|
||||
}
|
||||
if (legendParams.unit == null || legendParams.unit.isEmpty()) {
|
||||
legendParams.unit = legendParams.model.getParameterUnit();
|
||||
|
||||
List<DisplayType> displayTypes = null;
|
||||
if (gribModel != null) {
|
||||
if (legendParams.unit == null || legendParams.unit.isEmpty()) {
|
||||
legendParams.unit = gribModel.getParameterUnit();
|
||||
}
|
||||
displayTypes = FieldDisplayTypesFactory.getInstance()
|
||||
.getDisplayTypes(gribModel.getParameterAbbreviation());
|
||||
}
|
||||
List<DisplayType> displayTypes = FieldDisplayTypesFactory.getInstance()
|
||||
.getDisplayTypes(gribModel.getParameterAbbreviation());
|
||||
DisplayType displayType = getDisplayType();
|
||||
if (displayTypes != null && !displayTypes.isEmpty()
|
||||
&& displayTypes.get(0).equals(displayType)) {
|
||||
|
|
|
@ -24,106 +24,6 @@
|
|||
<displayList>
|
||||
<displays xsi:type="hydroMapRenderableDisplay" zoomLevel="1.0" mapCenter="-96.867249 40.47502100000001 0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<descriptor xsi:type="mapDescriptor">
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="false">
|
||||
<capabilities>
|
||||
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1"/>
|
||||
<capability xsi:type="colorableCapability" colorAsString="#9b9b9b"/>
|
||||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties renderingOrderId="MAP_OUTLINE" isSystemResource="false" isBlinking="false" isMapLayer="true" isHoverOn="false" opacity="1.0" isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0"/>
|
||||
</properties>
|
||||
<resourceData xsi:type="mapResourceGroupData">
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="false">
|
||||
<capabilities>
|
||||
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1"/>
|
||||
<capability xsi:type="colorableCapability" colorAsString="#9b9b9b"/>
|
||||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="true" isHoverOn="false" opacity="1.0" isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0"/>
|
||||
</properties>
|
||||
<resourceData xsi:type="dbMapResourceData">
|
||||
<mapName>World</mapName>
|
||||
<table>mapdata.world</table>
|
||||
<geomField>the_geom</geomField>
|
||||
<constraint>name not in ('CANADA', 'MEXICO', 'UNITED STATES')</constraint>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="false">
|
||||
<capabilities>
|
||||
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1"/>
|
||||
<capability xsi:type="colorableCapability" colorAsString="#9b9b9b"/>
|
||||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="true" isHoverOn="false" opacity="1.0" isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000" minDisplayWidth="750000"/>
|
||||
</properties>
|
||||
<resourceData xsi:type="dbMapResourceData">
|
||||
<mapName>State Boundaries</mapName>
|
||||
<table>mapdata.states</table>
|
||||
<geomField>the_geom</geomField>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="false">
|
||||
<capabilities>
|
||||
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1"/>
|
||||
<capability xsi:type="colorableCapability" colorAsString="#9b9b9b"/>
|
||||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="true" isHoverOn="false" opacity="1.0" isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0"/>
|
||||
</properties>
|
||||
<resourceData xsi:type="dbMapResourceData">
|
||||
<mapName>Canada</mapName>
|
||||
<table>mapdata.canada</table>
|
||||
<geomField>the_geom</geomField>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="false">
|
||||
<capabilities>
|
||||
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1"/>
|
||||
<capability xsi:type="colorableCapability" colorAsString="#9b9b9b"/>
|
||||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="true" isHoverOn="false" opacity="1.0" isVisible="true">
|
||||
<pdProps maxDisplayWidth="100000000" minDisplayWidth="0"/>
|
||||
</properties>
|
||||
<resourceData xsi:type="dbMapResourceData">
|
||||
<mapName>Mexico</mapName>
|
||||
<table>mapdata.mexico</table>
|
||||
<geomField>the_geom</geomField>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<resource>
|
||||
<loadProperties loadWithoutData="false">
|
||||
<capabilities>
|
||||
<capability xsi:type="outlineCapability" lineStyle="SOLID" outlineOn="true" outlineWidth="1"/>
|
||||
<capability xsi:type="colorableCapability" colorAsString="#9b9b9b"/>
|
||||
</capabilities>
|
||||
<resourceType>PLAN_VIEW</resourceType>
|
||||
</loadProperties>
|
||||
<properties isSystemResource="false" isBlinking="false" isMapLayer="true" isHoverOn="false" opacity="1.0" isVisible="true">
|
||||
<pdProps maxDisplayWidth="750000" minDisplayWidth="0"/>
|
||||
</properties>
|
||||
<resourceData xsi:type="dbMapResourceData">
|
||||
<mapName>County Boundaries</mapName>
|
||||
<table>mapdata.county</table>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<mapName>State/County Boundaries</mapName>
|
||||
</resourceData>
|
||||
</resource>
|
||||
<timeMatcher xsi:type="d2DTimeMatcher" loadMode="VALID_TIME_SEQ" deltaFilter="0" forecastFilter="0"/>
|
||||
<numberOfFrames>12</numberOfFrames>
|
||||
<gridGeometry envelopeMaxY="4023747.8031403385" envelopeMinY="-535763.0304681085" envelopeMaxX="2889016.9103023135" envelopeMinX="-3217360.2108624117" rangeY="0 9999" rangeX="0 13391">
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue