Merge branch 'omaha_13.3.1' into development
Conflicts (auto resolved): cave/com.raytheon.uf.viz.cots.feature/feature.xml edexOsgi/com.raytheon.uf.edex.cots.feature/feature.xml Former-commit-id: 45de49bd241f4bc53b266792c0ae6cb4658527a7
This commit is contained in:
commit
cb5ea76f98
61 changed files with 898 additions and 556 deletions
|
@ -4,7 +4,7 @@
|
|||
<comment></comment>
|
||||
<projects>
|
||||
<project>org.apache.activemq</project>
|
||||
<project>org.apache.tools.bzip2</project>
|
||||
<project>org.itadaki.bzip2</project>
|
||||
<project>RadarServer</project>
|
||||
<project>RadarServerWithMQ</project>
|
||||
</projects>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
This build script expects the following projects to exist at the same
|
||||
level as this project's folder. com.raytheon.rcm.lib
|
||||
com.raytheon.rcm.server com.raytheon.rcm.server.mq
|
||||
com.raytheon.rcm.tools org.apache.tools.bzip2 The projects must be
|
||||
com.raytheon.rcm.tools org.itadaki.bzip2 The projects must be
|
||||
built before running this script.
|
||||
-->
|
||||
&substitute-targets;
|
||||
|
@ -133,7 +133,7 @@
|
|||
<include name="**/spring-context*.jar" />
|
||||
<include name="**/quartz-all*.jar" />
|
||||
</fileset>
|
||||
<fileset dir="../org.apache.tools.bzip2" includes="**/*.jar" />
|
||||
<fileset dir="../org.itadaki.bzip2" includes="**/*.jar" />
|
||||
</copy>
|
||||
|
||||
<delete dir="bin" />
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
<fileset dir="${buildDirectory}/../../" includes="com.raytheon.rcm*/**"/>
|
||||
</copy>
|
||||
<copy todir="${buildDirectory}/plugins">
|
||||
<fileset dir="${buildDirectory}/../../" includes="org.apache.tools.bzip2*/**"/>
|
||||
<fileset dir="${buildDirectory}/../../" includes="org.itadaki.bzip2*/**"/>
|
||||
</copy>
|
||||
<copy todir="${buildDirectory}/plugins">
|
||||
<fileset dir="${buildDirectory}/../../" includes="org.apache.*/**"/>
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="org.apache.tools.bzip2"
|
||||
id="org.itadaki.bzip2"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
|
|
|
@ -7,7 +7,6 @@ Export-Package: com.raytheon.rcm.mqsrvr
|
|||
Require-Bundle: com.raytheon.rcm.server;bundle-version="1.0.0",
|
||||
org.apache.activemq;bundle-version="5.2.0",
|
||||
com.raytheon.rcm.lib;bundle-version="1.0.0",
|
||||
org.apache.tools.bzip2;bundle-version="1.0.0",
|
||||
javax.jms;bundle-version="1.0.0",
|
||||
org.apache.qpid;bundle-version="1.0.0"
|
||||
Import-Package: org.apache.tools.bzip2
|
||||
org.apache.qpid;bundle-version="1.0.0",
|
||||
org.itadaki.bzip2;bundle-version="0.9.1"
|
||||
|
|
|
@ -43,7 +43,7 @@ import javax.jms.Session;
|
|||
import javax.jms.TextMessage;
|
||||
|
||||
import org.apache.qpid.client.AMQConnectionFactory;
|
||||
import org.apache.tools.bzip2.CBZip2InputStream;
|
||||
import org.itadaki.bzip2.BZip2InputStream;
|
||||
|
||||
import com.raytheon.rcm.config.EndpointConfig;
|
||||
import com.raytheon.rcm.config.awips1.Awips1ProdDistInfoBuilder;
|
||||
|
@ -659,11 +659,7 @@ public class DataArchiveEndpoint extends RadarEventAdapter {
|
|||
try {
|
||||
InputStream ins = new ByteArrayInputStream(msg, 120,
|
||||
msg.length - 120);
|
||||
char c1 = (char) ins.read();
|
||||
char c2 = (char) ins.read();
|
||||
if (c1 != 'B' || c2 != 'Z')
|
||||
throw new IOException("Not a bzip2 stream");
|
||||
ins = new CBZip2InputStream(ins);
|
||||
ins = new BZip2InputStream(ins, false);
|
||||
// ByteArrayOutputStream outs = new
|
||||
// ByteArrayOutputStream(uncompressedSize);
|
||||
uncompressed = new byte[uncompressedSize];
|
||||
|
|
|
@ -13,10 +13,9 @@ Export-Package: com.raytheon.rcm.coll,
|
|||
com.raytheon.rcm.rpsmgr,
|
||||
com.raytheon.rcm.server
|
||||
Require-Bundle: com.raytheon.rcm.lib;bundle-version="1.0.0",
|
||||
org.apache.tools.bzip2;bundle-version="1.0.0",
|
||||
org.apache.commons.logging;bundle-version="1.0.4",
|
||||
org.springframework;bundle-version="2.5.6"
|
||||
org.springframework;bundle-version="2.5.6",
|
||||
org.itadaki.bzip2;bundle-version="0.9.1"
|
||||
Import-Package: com.raytheon.uf.common.util,
|
||||
org.apache.log4j,
|
||||
org.apache.tools.bzip2,
|
||||
org.junit
|
||||
|
|
10
RadarServer/com.raytheon.rcm.server/src/com/raytheon/rcm/server/Awips2Endpoint.java
Executable file → Normal file
10
RadarServer/com.raytheon.rcm.server/src/com/raytheon/rcm/server/Awips2Endpoint.java
Executable file → Normal file
|
@ -27,15 +27,15 @@ import java.io.InputStream;
|
|||
import java.nio.BufferUnderflowException;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import org.apache.tools.bzip2.CBZip2InputStream;
|
||||
import org.itadaki.bzip2.BZip2InputStream;
|
||||
|
||||
import com.raytheon.rcm.event.ConfigEvent;
|
||||
import com.raytheon.rcm.event.RadarEvent;
|
||||
import com.raytheon.rcm.event.RadarEventAdapter;
|
||||
import com.raytheon.rcm.message.GraphicProduct;
|
||||
import com.raytheon.rcm.message.GraphicProduct.PDB;
|
||||
import com.raytheon.rcm.message.Message;
|
||||
import com.raytheon.rcm.message.MessageFormatException;
|
||||
import com.raytheon.rcm.message.GraphicProduct.PDB;
|
||||
|
||||
/**
|
||||
* A radar server component that delivers radar products to an EDEX file
|
||||
|
@ -172,11 +172,7 @@ public class Awips2Endpoint extends RadarEventAdapter {
|
|||
try {
|
||||
InputStream ins = new ByteArrayInputStream(msg, 120,
|
||||
msg.length - 120);
|
||||
char c1 = (char) ins.read();
|
||||
char c2 = (char) ins.read();
|
||||
if (c1 != 'B' || c2 != 'Z')
|
||||
throw new IOException("Not a bzip2 stream");
|
||||
ins = new CBZip2InputStream(ins);
|
||||
ins = new BZip2InputStream(ins, false);
|
||||
// ByteArrayOutputStream outs = new
|
||||
// ByteArrayOutputStream(uncompressedSize);
|
||||
uncompressed = new byte[uncompressedSize];
|
||||
|
|
|
@ -60,6 +60,9 @@
|
|||
# Status: TEST
|
||||
# Title: AvnFPS: tpo indicator not monitoring properly
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------- ---------- ----------- --------------------------
|
||||
# Feb. 21, 2013 15834 zhao Modified for CCFP 8hr data
|
||||
#
|
||||
import logging, time
|
||||
import Avn, AvnLib, Globals, MonitorP
|
||||
|
@ -68,10 +71,10 @@ import CCFPData
|
|||
_Logger = logging.getLogger(__name__)
|
||||
|
||||
_Code = { \
|
||||
'tops': {1: '370+ ', 2: '310-370', 3: '250-310'}, \
|
||||
'gwth': {1: '++', 2: '+ ', 3: 'NC', 4: '- '}, \
|
||||
'tops': {1: '400+ ', 2: '350-390', 3: '300-340', 4: '250-290'}, \
|
||||
'gwth': {1: '+ ', 2: 'NC', 3: '- '}, \
|
||||
'conf': {1: 'HIGH', 3: 'LOW'}, \
|
||||
'cvrg': {1: '75-100%', 2: ' 50-74%', 3: ' 25-49%'}, \
|
||||
'cvrg': {1: '75-100%', 2: ' 40-74%', 3: ' 25-39%'}, \
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
|
@ -82,7 +85,7 @@ class Monitor(MonitorP.Monitor):
|
|||
def __makeData(self, data):
|
||||
# 6 hour forecast
|
||||
tstart = (time.time()//3600.0 + 1) * 3600.0
|
||||
tend = tstart + 7*3600.0 - 10.0
|
||||
tend = tstart + 9*3600.0 - 10.0
|
||||
seq = [{'time': t} for t in Avn.frange(tstart, tend, 3600.0)]
|
||||
fcst, text = {}, []
|
||||
try:
|
||||
|
|
|
@ -25,7 +25,9 @@
|
|||
menuText="Convective SIGMET" id="ConvSigmet">
|
||||
<dataURI>/convsigmet/%</dataURI>
|
||||
</contribute>
|
||||
|
||||
<contribute xsi:type="bundleItem" file="bundles/BufrNcwf.xml" menuText="NCWF" id="NCWF">
|
||||
<dataURI>/bufrncwf/%</dataURI>
|
||||
</contribute>
|
||||
<contribute xsi:type="separator" id="separator1"/>
|
||||
|
||||
<contribute xsi:type="titleItem" titleText="------ Icing Products ------" />
|
||||
|
|
|
@ -129,12 +129,6 @@
|
|||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="org.apache.tools.bzip2"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="com.sun.jna"
|
||||
download-size="0"
|
||||
|
|
|
@ -240,8 +240,7 @@
|
|||
<command
|
||||
commandId="com.raytheon.viz.mpe.ui.actions.addpseudo"
|
||||
label="Add Pseudo Gage"
|
||||
mnemonic="A"
|
||||
style="toggle">
|
||||
mnemonic="A">
|
||||
</command>
|
||||
<command
|
||||
commandId="com.raytheon.viz.mpe.ui.actions.gagetable"
|
||||
|
@ -251,8 +250,7 @@
|
|||
<command
|
||||
commandId="com.raytheon.viz.mpe.ui.actions.display7x7"
|
||||
label="Display 7 x 7..."
|
||||
mnemonic="D"
|
||||
style="toggle">
|
||||
mnemonic="D">
|
||||
</command>
|
||||
<separator
|
||||
name="separator3"
|
||||
|
@ -264,24 +262,16 @@
|
|||
mnemonic="B">
|
||||
</command>
|
||||
<command
|
||||
commandId="com.raytheon.viz.mpe.ui.actions.toggleGageDisplay"
|
||||
commandId="com.raytheon.viz.mpe.ui.actions.toggleGageIdDisplay"
|
||||
label="Show Gage Identifiers"
|
||||
mnemonic="I"
|
||||
style="toggle">
|
||||
<parameter
|
||||
name="Gage"
|
||||
value="Ids">
|
||||
</parameter>
|
||||
</command>
|
||||
<command
|
||||
commandId="com.raytheon.viz.mpe.ui.actions.toggleGageDisplay"
|
||||
commandId="com.raytheon.viz.mpe.ui.actions.toggleGageValueDisplay"
|
||||
label="Show Gage Values"
|
||||
mnemonic="V"
|
||||
style="toggle">
|
||||
<parameter
|
||||
name="Gage"
|
||||
value="Values">
|
||||
</parameter>
|
||||
</command>
|
||||
<menu
|
||||
label="Show Missing Gages"
|
||||
|
@ -911,15 +901,6 @@
|
|||
id="com.raytheon.viz.mpe.ui.actions.toggleMpeInfo"
|
||||
name="Toggle MPE Info">
|
||||
</command>
|
||||
<command
|
||||
id="com.raytheon.viz.mpe.ui.actions.toggleGageDisplay"
|
||||
name="Show Gages">
|
||||
<commandParameter
|
||||
id="Gage"
|
||||
name="Gage"
|
||||
optional="false">
|
||||
</commandParameter>
|
||||
</command>
|
||||
<command
|
||||
id="com.raytheon.viz.mpe.ui.actions.toggleGageMissing"
|
||||
name="Show Missing">
|
||||
|
@ -1032,6 +1013,32 @@
|
|||
id="com.raytheon.viz.mpe.ui.dialogs.postanalysis.SummedHourlyMpe"
|
||||
name="Launch Post Analysis">
|
||||
</command>
|
||||
<command
|
||||
defaultHandler="com.raytheon.viz.mpe.ui.actions.ToggleGageValueDisplay"
|
||||
id="com.raytheon.viz.mpe.ui.actions.toggleGageValueDisplay"
|
||||
name="ToggleGageValueDisplay">
|
||||
<state
|
||||
class="org.eclipse.ui.handlers.RegistryToggleState:false"
|
||||
id="org.eclipse.ui.commands.toggleState">
|
||||
</state>
|
||||
</command>
|
||||
<command
|
||||
defaultHandler="com.raytheon.viz.mpe.ui.actions.ToggleGageIdDisplay"
|
||||
id="com.raytheon.viz.mpe.ui.actions.toggleGageIdDisplay"
|
||||
name="Toggle Gage Id Display">
|
||||
<state
|
||||
class="org.eclipse.ui.handlers.RegistryToggleState:false"
|
||||
id="org.eclipse.ui.commands.toggleState">
|
||||
</state>
|
||||
</command>
|
||||
<command
|
||||
id="com.raytheon.viz.mpe.ui.actions.ToggleGageTriangleDisplay"
|
||||
name="Toggle Gage Triangle Display">
|
||||
<state
|
||||
class="org.eclipse.ui.handlers.RegistryToggleState:false"
|
||||
id="org.eclipse.ui.commands.toggleState">
|
||||
</state>
|
||||
</command>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.handlers">
|
||||
|
@ -1209,8 +1216,8 @@
|
|||
</activeWhen>
|
||||
</handler>
|
||||
<handler
|
||||
class="com.raytheon.viz.mpe.ui.actions.ToggleGageDisplay"
|
||||
commandId="com.raytheon.viz.mpe.ui.actions.toggleGageDisplay">
|
||||
class="com.raytheon.viz.mpe.ui.actions.ToggleGageValueDisplay"
|
||||
commandId="com.raytheon.viz.mpe.ui.actions.toggleGageValueDisplay">
|
||||
<activeWhen>
|
||||
<reference
|
||||
definitionId="com.raytheon.viz.inMPEActionSet">
|
||||
|
@ -1394,6 +1401,24 @@
|
|||
class="com.raytheon.viz.mpe.ui.actions.SummedHourlyMpeAction"
|
||||
commandId="com.raytheon.viz.mpe.ui.dialogs.postanalysis.SummedHourlyMpe">
|
||||
</handler>
|
||||
<handler
|
||||
class="com.raytheon.viz.mpe.ui.actions.ToggleGageIdDisplay"
|
||||
commandId="com.raytheon.viz.mpe.ui.actions.toggleGageIdDisplay">
|
||||
<activeWhen>
|
||||
<reference
|
||||
definitionId="com.raytheon.viz.inMPEActionSet">
|
||||
</reference>
|
||||
</activeWhen>
|
||||
</handler>
|
||||
<handler
|
||||
class="com.raytheon.viz.mpe.ui.actions.ToggleGageTriangleDisplay"
|
||||
commandId="com.raytheon.viz.mpe.ui.actions.ToggleGageTriangleDisplay">
|
||||
<activeWhen>
|
||||
<reference
|
||||
definitionId="com.raytheon.viz.inMPEActionSet">
|
||||
</reference>
|
||||
</activeWhen>
|
||||
</handler>
|
||||
</extension>
|
||||
<extension
|
||||
point="com.raytheon.viz.ui.perspectiveManager">
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.eclipse.ui.IWorkbenchCommandConstants;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 29, 2012 mschenke Initial creation
|
||||
* Mar 19, 2013 1457 mpduff Added gage toggle commands.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -39,12 +40,38 @@ import org.eclipse.ui.IWorkbenchCommandConstants;
|
|||
*/
|
||||
|
||||
public interface MPECommandConstants {
|
||||
|
||||
/**
|
||||
* Font command id.
|
||||
*/
|
||||
public static final String FONT = "com.raytheon.viz.mpe.ui.actions.setfont";
|
||||
|
||||
/**
|
||||
* Gage color command id.
|
||||
*/
|
||||
public static final String GAGE_COLOR = "com.raytheon.viz.mpe.ui.actions.toggleGageColor";
|
||||
|
||||
/**
|
||||
* Gage missing command id.
|
||||
*/
|
||||
public static final String GAGE_MISSING_OPTION = "com.raytheon.viz.mpe.ui.actions.toggleGageMissing";
|
||||
|
||||
/**
|
||||
* Display mode command id.
|
||||
*/
|
||||
public static final String DISPLAY_MODE = "com.raytheon.viz.mpe.ui.actions.toggleDisplayMode";
|
||||
|
||||
/**
|
||||
* Toggle Gage Id Command ID.
|
||||
*/
|
||||
public static final String TOGGLE_GAGEID_COMMAND_ID = "com.raytheon.viz.mpe.ui.actions.toggleGageIdDisplay";
|
||||
|
||||
/**
|
||||
* Toggle gage triangle command ID.
|
||||
*/
|
||||
public static final String TOGGLE_GAGE_TRIANGLE_COMMAND_ID = "com.raytheon.viz.mpe.ui.actions.ToggleGageTriangleDisplay";
|
||||
|
||||
/**
|
||||
* Toggle gage value Command ID.
|
||||
*/
|
||||
public static final String TOGGLE_GAGE_VALUE_COMMAND_ID = "com.raytheon.viz.mpe.ui.actions.toggleGageValueDisplay";
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ import java.util.Map;
|
|||
import org.eclipse.jface.action.Action;
|
||||
import org.eclipse.jface.action.MenuManager;
|
||||
|
||||
|
||||
/**
|
||||
* Dynamic Field populator for the menu item BaseFields.
|
||||
*
|
||||
|
@ -17,6 +16,7 @@ import org.eclipse.jface.action.MenuManager;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 23, 2011 rgeorge Initial creation
|
||||
* Mar 14, 2013 1457 mpduff Changed to use the ToggleGageTriangleDisplay handler.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -34,11 +34,13 @@ public class BaseFieldsPopulator extends FieldsPopulator {
|
|||
static {
|
||||
gageMap.put("Gage", "Triangles");
|
||||
}
|
||||
|
||||
private static Map<DisplayFieldData, MenuData> textMap = new HashMap<DisplayFieldData, MenuData>();
|
||||
static {
|
||||
textMap.put(DisplayFieldData.p3lMosaic, new MenuData(
|
||||
"Gage Triangles", "G", Action.AS_CHECK_BOX,
|
||||
"com.raytheon.viz.mpe.ui.actions.toggleGageDisplay", gageMap));
|
||||
textMap.put(DisplayFieldData.p3lMosaic, new MenuData("Gage Triangles",
|
||||
"G", Action.AS_CHECK_BOX,
|
||||
"com.raytheon.viz.mpe.ui.actions.ToggleGageTriangleDisplay",
|
||||
gageMap));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -55,5 +57,4 @@ public class BaseFieldsPopulator extends FieldsPopulator {
|
|||
protected MenuManager getMenuManger() {
|
||||
return BaseFieldsPopulator.menuMgr;
|
||||
}
|
||||
|
||||
}
|
|
@ -43,6 +43,7 @@ import org.eclipse.ui.PlatformUI;
|
|||
import org.eclipse.ui.commands.ICommandService;
|
||||
import org.eclipse.ui.handlers.HandlerUtil;
|
||||
import org.eclipse.ui.handlers.RadioState;
|
||||
import org.eclipse.ui.handlers.RegistryToggleState;
|
||||
|
||||
import com.raytheon.uf.common.colormap.ColorMap;
|
||||
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
|
||||
|
@ -97,6 +98,7 @@ import com.raytheon.viz.ui.editor.IMultiPaneEditor;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Dec 18, 2012 mschenke Initial creation
|
||||
* Mar 14, 2013 1457 mpduff Reset the gages on the resource.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -391,15 +393,15 @@ public class MPEDisplayManager {
|
|||
return null;
|
||||
}
|
||||
|
||||
private Set<IEditTimeChangedListener> timeChangedListeners = new LinkedHashSet<IEditTimeChangedListener>();
|
||||
private final Set<IEditTimeChangedListener> timeChangedListeners = new LinkedHashSet<IEditTimeChangedListener>();
|
||||
|
||||
private Set<IDisplayFieldChangedListener> fieldChangedListeners = new LinkedHashSet<IDisplayFieldChangedListener>();
|
||||
private final Set<IDisplayFieldChangedListener> fieldChangedListeners = new LinkedHashSet<IDisplayFieldChangedListener>();
|
||||
|
||||
private final IRenderableDisplay display;
|
||||
|
||||
private DisplayFieldData displayedField;
|
||||
|
||||
private MPEFieldResourceData fieldResourceData = new MPEFieldResourceData();
|
||||
private final MPEFieldResourceData fieldResourceData = new MPEFieldResourceData();
|
||||
|
||||
private MPEFieldResource displayedFieldResource;
|
||||
|
||||
|
@ -420,16 +422,7 @@ public class MPEDisplayManager {
|
|||
}
|
||||
editTime = getCurrentDisplayedDate();
|
||||
|
||||
displayedField = DisplayFieldData.rMosaic;
|
||||
String baseRadarMosaic = AppsDefaults.getInstance().getToken(
|
||||
"mpe_base_radar_mosaic");
|
||||
if (baseRadarMosaic != null) {
|
||||
DisplayFieldData fieldData = DisplayFieldData
|
||||
.fromString(baseRadarMosaic);
|
||||
if (fieldData != null) {
|
||||
displayedField = fieldData;
|
||||
}
|
||||
}
|
||||
displayedField = DisplayFieldData.mMosaic;
|
||||
|
||||
ChangeTimeProvider.update(this);
|
||||
|
||||
|
@ -549,12 +542,14 @@ public class MPEDisplayManager {
|
|||
/**
|
||||
* @param gageDisplay
|
||||
* the gageDisplay to set
|
||||
* @param isOn
|
||||
* is set to draw
|
||||
*/
|
||||
public void toggleGageDisplay(GageDisplay gageDisplay) {
|
||||
public void toggleGageDisplay(GageDisplay gageDisplay, boolean isOn) {
|
||||
List<MPEGageResource> rscs = display.getDescriptor().getResourceList()
|
||||
.getResourcesByTypeAsType(MPEGageResource.class);
|
||||
for (MPEGageResource rsc : rscs) {
|
||||
rsc.toggleGageDisplay(gageDisplay);
|
||||
rsc.toggleGageDisplay(gageDisplay, isOn);
|
||||
}
|
||||
display.refresh();
|
||||
}
|
||||
|
@ -730,6 +725,14 @@ public class MPEDisplayManager {
|
|||
listener.displayFieldChanged(oldField, fieldToDisplay);
|
||||
}
|
||||
}
|
||||
|
||||
// reset gages
|
||||
List<MPEGageResource> rscs = display.getDescriptor()
|
||||
.getResourceList()
|
||||
.getResourcesByTypeAsType(MPEGageResource.class);
|
||||
for (MPEGageResource rsc : rscs) {
|
||||
rsc.reloadGages();
|
||||
}
|
||||
}
|
||||
|
||||
displayedFieldResource.issueRefresh();
|
||||
|
@ -817,6 +820,42 @@ public class MPEDisplayManager {
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current command toggle state.
|
||||
*
|
||||
* @param commandId
|
||||
* The Command ID
|
||||
* @return the toggle state, or false if command not found
|
||||
*/
|
||||
public static Boolean getToggleState(String commandId) {
|
||||
Command command = service.getCommand(commandId);
|
||||
if (command != null) {
|
||||
State state = command.getState(RegistryToggleState.STATE_ID);
|
||||
if (state != null) {
|
||||
return (Boolean) state.getValue();
|
||||
}
|
||||
}
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the toggle state.
|
||||
*
|
||||
* @param commandId
|
||||
* The command Id to set the toggle state on
|
||||
* @param toggleState
|
||||
* The toggle state value
|
||||
*/
|
||||
public static void setToggleState(String commandId, boolean toggleState) {
|
||||
Command command = service.getCommand(commandId);
|
||||
if (command != null) {
|
||||
State state = command.getState(RegistryToggleState.STATE_ID);
|
||||
if (state != null) {
|
||||
state.setValue(toggleState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the radio state id of the command specified by commandId as an
|
||||
* enum of the type of defaultValue with defaultValue being the default to
|
||||
|
|
|
@ -33,6 +33,7 @@ import com.raytheon.uf.viz.core.IDisplayPane;
|
|||
import com.raytheon.uf.viz.core.IDisplayPaneContainer;
|
||||
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.EditableCapability;
|
||||
import com.raytheon.viz.mpe.ui.MPEDisplayManager;
|
||||
import com.raytheon.viz.mpe.ui.rsc.MPEGageResource;
|
||||
import com.raytheon.viz.ui.EditorUtil;
|
||||
import com.raytheon.viz.ui.input.EditableManager;
|
||||
|
@ -45,6 +46,7 @@ import com.raytheon.viz.ui.input.EditableManager;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 6, 2009 snaples Initial creation
|
||||
* Mar 14, 2013 1457 mpduff Don't throw error if nothing displayed.
|
||||
* </pre>
|
||||
*
|
||||
* @author snaples
|
||||
|
@ -54,6 +56,7 @@ public class ShowDisplay7x7 extends AbstractHandler implements IElementUpdater {
|
|||
|
||||
@Override
|
||||
public Object execute(ExecutionEvent event) throws ExecutionException {
|
||||
if (MPEDisplayManager.getCurrent().getDisplayedFieldResource() != null) {
|
||||
IEditorPart activeEditor = (IEditorPart) EditorUtil
|
||||
.getActiveEditorAs(IDisplayPaneContainer.class);
|
||||
if (activeEditor != null) {
|
||||
|
@ -68,6 +71,8 @@ public class ShowDisplay7x7 extends AbstractHandler implements IElementUpdater {
|
|||
rsc.issueRefresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -88,5 +93,4 @@ public class ShowDisplay7x7 extends AbstractHandler implements IElementUpdater {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.viz.mpe.ui.actions;
|
||||
|
||||
import org.eclipse.core.commands.AbstractHandler;
|
||||
import org.eclipse.core.commands.Command;
|
||||
import org.eclipse.core.commands.ExecutionEvent;
|
||||
import org.eclipse.core.commands.ExecutionException;
|
||||
import org.eclipse.ui.handlers.HandlerUtil;
|
||||
|
||||
import com.raytheon.viz.mpe.ui.MPEDisplayManager;
|
||||
import com.raytheon.viz.mpe.ui.MPEDisplayManager.GageDisplay;
|
||||
|
||||
/**
|
||||
* Handler for Toggling Gage Id display.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 13, 2013 1457 mpduff Initial creation.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mpduff
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class ToggleGageIdDisplay extends AbstractHandler {
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands
|
||||
* .ExecutionEvent)
|
||||
*/
|
||||
@Override
|
||||
public Object execute(ExecutionEvent event) throws ExecutionException {
|
||||
Command command = event.getCommand();
|
||||
boolean oldValue = HandlerUtil.toggleCommandState(command);
|
||||
|
||||
MPEDisplayManager dm = MPEDisplayManager.getCurrent();
|
||||
dm.toggleGageDisplay(GageDisplay.Ids, !oldValue);
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.viz.mpe.ui.actions;
|
||||
|
||||
import org.eclipse.core.commands.AbstractHandler;
|
||||
import org.eclipse.core.commands.Command;
|
||||
import org.eclipse.core.commands.ExecutionEvent;
|
||||
import org.eclipse.core.commands.ExecutionException;
|
||||
import org.eclipse.ui.handlers.HandlerUtil;
|
||||
|
||||
import com.raytheon.viz.mpe.ui.MPEDisplayManager;
|
||||
import com.raytheon.viz.mpe.ui.MPEDisplayManager.GageDisplay;
|
||||
|
||||
/**
|
||||
* Handler for Gage Triangle Display.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 13, 2013 1457 mpduff Initial creation.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author mpduff
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class ToggleGageTriangleDisplay extends AbstractHandler {
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands
|
||||
* .ExecutionEvent)
|
||||
*/
|
||||
@Override
|
||||
public Object execute(ExecutionEvent event) throws ExecutionException {
|
||||
Command command = event.getCommand();
|
||||
boolean oldValue = HandlerUtil.toggleCommandState(command);
|
||||
MPEDisplayManager dm = MPEDisplayManager.getCurrent();
|
||||
dm.toggleGageDisplay(GageDisplay.Triangles, !oldValue);
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -20,8 +20,10 @@
|
|||
package com.raytheon.viz.mpe.ui.actions;
|
||||
|
||||
import org.eclipse.core.commands.AbstractHandler;
|
||||
import org.eclipse.core.commands.Command;
|
||||
import org.eclipse.core.commands.ExecutionEvent;
|
||||
import org.eclipse.core.commands.ExecutionException;
|
||||
import org.eclipse.ui.handlers.HandlerUtil;
|
||||
|
||||
import com.raytheon.viz.mpe.ui.MPEDisplayManager;
|
||||
import com.raytheon.viz.mpe.ui.MPEDisplayManager.GageDisplay;
|
||||
|
@ -34,14 +36,14 @@ import com.raytheon.viz.mpe.ui.MPEDisplayManager.GageDisplay;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 24, 2008 1748 snaples Initial creation
|
||||
* Mar 14, 2013 1457 mpduff Renamed to ToggleGageValueDisplay.
|
||||
* </pre>
|
||||
*
|
||||
* @author snaples
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class ToggleGageDisplay extends AbstractHandler {
|
||||
|
||||
public class ToggleGageValueDisplay extends AbstractHandler {
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
|
@ -50,11 +52,12 @@ public class ToggleGageDisplay extends AbstractHandler {
|
|||
* .ExecutionEvent)
|
||||
*/
|
||||
@Override
|
||||
public Object execute(ExecutionEvent arg0) throws ExecutionException {
|
||||
String g = arg0.getParameter("Gage");
|
||||
GageDisplay disp = GageDisplay.valueOf(g);
|
||||
public Object execute(ExecutionEvent event) throws ExecutionException {
|
||||
Command command = event.getCommand();
|
||||
boolean oldValue = HandlerUtil.toggleCommandState(command);
|
||||
|
||||
MPEDisplayManager dm = MPEDisplayManager.getCurrent();
|
||||
dm.toggleGageDisplay(disp);
|
||||
dm.toggleGageDisplay(GageDisplay.Values, !oldValue);
|
||||
return null;
|
||||
}
|
||||
|
|
@ -27,12 +27,12 @@ import java.nio.channels.FileChannel;
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
import java.util.Set;
|
||||
import java.util.Map;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.eclipse.swt.events.DisposeEvent;
|
||||
|
@ -63,6 +63,7 @@ import com.raytheon.uf.viz.core.rsc.GenericResourceData;
|
|||
import com.raytheon.uf.viz.core.rsc.LoadProperties;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.ColorMapCapability;
|
||||
import com.raytheon.viz.core.rsc.jts.JTSCompiler;
|
||||
import com.raytheon.viz.mpe.MPECommandConstants;
|
||||
import com.raytheon.viz.mpe.core.MPEDataManager;
|
||||
import com.raytheon.viz.mpe.core.MPEDataManager.MPEGageData;
|
||||
import com.raytheon.viz.mpe.ui.Activator;
|
||||
|
@ -93,6 +94,7 @@ import com.vividsolutions.jts.index.strtree.STRtree;
|
|||
* Aug 17, 2012 15271 snaples Added check to add only PP gages
|
||||
* Sep 5, 2012 15079 snaples Added constant for Milli to inches conversion factor
|
||||
* Feb 12, 2013 15773 snaples Updated addPoints to display PC gages when token is set to use PC data.
|
||||
* Mar 14, 2013 1457 mpduff Fixed various bugs.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -107,8 +109,6 @@ public class MPEGageResource extends AbstractMPEInputResource implements
|
|||
|
||||
private static final double POINT_RADIUS = 2;
|
||||
|
||||
private static final RGB WHITE = new RGB(255, 255, 255);
|
||||
|
||||
private final SimpleDateFormat sdf;
|
||||
|
||||
private final Object mutex = new Object();
|
||||
|
@ -135,29 +135,53 @@ public class MPEGageResource extends AbstractMPEInputResource implements
|
|||
|
||||
private final AppsDefaults appsDefaults = AppsDefaults.getInstance();
|
||||
|
||||
|
||||
private Set<GageDisplay> displayTypes = new HashSet<GageDisplay>();
|
||||
private final Map<GageDisplay, Boolean> displayTypes = new HashMap<GageDisplay, Boolean>();
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param resourceData
|
||||
* The resourceData
|
||||
* @param loadProperties
|
||||
* The loadProperties
|
||||
*/
|
||||
public MPEGageResource(GenericResourceData resourceData,
|
||||
LoadProperties loadProperties) {
|
||||
super(resourceData, loadProperties);
|
||||
sdf = new SimpleDateFormat("yyyyMMddHH");
|
||||
sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
|
||||
|
||||
setStates();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the state of the Gage display for values and Ids
|
||||
*/
|
||||
private void setStates() {
|
||||
boolean stateSetting = MPEDisplayManager
|
||||
.getToggleState(MPECommandConstants.TOGGLE_GAGE_VALUE_COMMAND_ID);
|
||||
displayTypes.put(GageDisplay.Values, stateSetting);
|
||||
|
||||
stateSetting = MPEDisplayManager
|
||||
.getToggleState(MPECommandConstants.TOGGLE_GAGEID_COMMAND_ID);
|
||||
displayTypes.put(GageDisplay.Ids, stateSetting);
|
||||
|
||||
// Triangles default to off
|
||||
MPEDisplayManager.setToggleState(
|
||||
MPECommandConstants.TOGGLE_GAGE_TRIANGLE_COMMAND_ID, false);
|
||||
displayTypes.put(GageDisplay.Triangles, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles visibility of {@link GageDisplay} type
|
||||
*
|
||||
* @param display
|
||||
* The GageDisplay
|
||||
* @param isOn
|
||||
* true if on
|
||||
*/
|
||||
public void toggleGageDisplay(GageDisplay display) {
|
||||
if (displayTypes.remove(display) == false) {
|
||||
displayTypes.add(display);
|
||||
}
|
||||
public void toggleGageDisplay(GageDisplay display, boolean isOn) {
|
||||
displayTypes.put(display, isOn);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -215,8 +239,7 @@ public class MPEGageResource extends AbstractMPEInputResource implements
|
|||
@Override
|
||||
protected void paintInternal(IGraphicsTarget target,
|
||||
PaintProperties paintProps) throws VizException {
|
||||
// set the plot draw or no draw values
|
||||
if (displayTypes.isEmpty()) {
|
||||
if (!displayTypes.containsValue(Boolean.TRUE)) {
|
||||
// Nothing to paint
|
||||
return;
|
||||
}
|
||||
|
@ -230,15 +253,15 @@ public class MPEGageResource extends AbstractMPEInputResource implements
|
|||
}
|
||||
}
|
||||
|
||||
if (displayTypes.contains(GageDisplay.Ids)
|
||||
|| displayTypes.contains(GageDisplay.Values)) {
|
||||
if (displayTypes.get(GageDisplay.Ids)
|
||||
|| displayTypes.get(GageDisplay.Values)) {
|
||||
paintPlotInfo(target, paintProps,
|
||||
displayTypes.contains(GageDisplay.Ids),
|
||||
displayTypes.contains(GageDisplay.Values));
|
||||
displayTypes.get(GageDisplay.Ids),
|
||||
displayTypes.get(GageDisplay.Values));
|
||||
}
|
||||
|
||||
try {
|
||||
if (displayTypes.contains(GageDisplay.Triangles)) {
|
||||
if (displayTypes.get(GageDisplay.Triangles)) {
|
||||
paintTriangles(target, paintProps);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
@ -264,7 +287,6 @@ public class MPEGageResource extends AbstractMPEInputResource implements
|
|||
String fileName = String.format(GAGE_TRIANGLES,
|
||||
sdf.format(lastDate));
|
||||
File file = new File(dir, fileName);
|
||||
|
||||
if (!file.exists()) {
|
||||
return;
|
||||
}
|
||||
|
@ -327,18 +349,19 @@ public class MPEGageResource extends AbstractMPEInputResource implements
|
|||
|
||||
MPEDisplayManager.GageMissingOptions gm = MPEDisplayManager
|
||||
.getGageMissing();
|
||||
boolean displayIsEdit = displayMgr.getCurrentEditDate().equals(
|
||||
boolean displayIsEdit = false;
|
||||
if (paintProps.getDataTime() != null
|
||||
&& displayMgr.getCurrentEditDate() != null) {
|
||||
displayIsEdit = displayMgr.getCurrentEditDate().equals(
|
||||
paintProps.getDataTime().getRefTime());
|
||||
}
|
||||
boolean xor = MPEDisplayManager.getGageColor() == GageColor.Contrast
|
||||
&& displayIsEdit;
|
||||
|
||||
for (Coordinate point : dataMap.keySet()) {
|
||||
if (extent.contains(new double[] { point.x, point.y })) {
|
||||
MPEGageData gageData = dataMap.get(point);
|
||||
RGB gageColor = WHITE;
|
||||
if (displayIsEdit) {
|
||||
gageColor = getGageColor(gageData);
|
||||
}
|
||||
RGB gageColor = getGageColor(gageData);
|
||||
|
||||
boolean isReportedMissing = gageData.isReported_missing();
|
||||
boolean isMissing = ((gageData.getGval() == -999.f || gageData
|
||||
|
@ -383,6 +406,7 @@ public class MPEGageResource extends AbstractMPEInputResource implements
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isGageIdsDisplayed) {
|
||||
gageId = gageData.getId();
|
||||
|
||||
|
@ -421,7 +445,7 @@ public class MPEGageResource extends AbstractMPEInputResource implements
|
|||
|
||||
private RGB getGageColor(MPEGageData gageData) {
|
||||
RGB gageColor = new RGB(255, 255, 255);
|
||||
if (displayTypes.isEmpty() == false) {
|
||||
if (displayTypes.containsValue(Boolean.TRUE)) {
|
||||
MPEDisplayManager.GageColor gc = MPEDisplayManager.getGageColor();
|
||||
switch (gc) {
|
||||
case Solid:
|
||||
|
@ -449,9 +473,7 @@ public class MPEGageResource extends AbstractMPEInputResource implements
|
|||
if (gageData.getId().contains("PSEUDO")) {
|
||||
fltVal = (float) (gageData.getGval() / MILLICVT);
|
||||
}
|
||||
// System.out.println("--- fltVal = " + fltVal);
|
||||
gageColor = getColorByValue(fltVal);
|
||||
// gageColor = getColorByValue(gageData.getGval());
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -482,7 +504,8 @@ public class MPEGageResource extends AbstractMPEInputResource implements
|
|||
.hasNext();) {
|
||||
MPEGageData gageData = it.next();
|
||||
// DR15773 Use PC gages only when token set to ON.
|
||||
if ((gageData.getPe().equalsIgnoreCase("PC")) && (process_PC == false)) {
|
||||
if ((gageData.getPe().equalsIgnoreCase("PC"))
|
||||
&& (process_PC == false)) {
|
||||
continue;
|
||||
}
|
||||
Coordinate latLon = gageData.getLatLon();
|
||||
|
|
|
@ -31,8 +31,6 @@ import javax.measure.unit.NonSI;
|
|||
import javax.measure.unit.SI;
|
||||
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.graphics.Cursor;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
|
||||
|
@ -56,6 +54,7 @@ import com.raytheon.viz.mpe.core.MPEDataManager.MPEGageData;
|
|||
* Oct 30, 2008 snaples Initial creation
|
||||
* Aug 8, 2012 15271 snaples Updated hourly slot
|
||||
* Jan 02, 2013 15565 snaples Fixed problem with wrong time being sent to mpe_fieldgen
|
||||
* Mar 14, 2013 1457 mpduff Fixed memory leak.
|
||||
* </pre>
|
||||
*
|
||||
* @author snaples
|
||||
|
@ -181,8 +180,6 @@ public class RegenHrFlds {
|
|||
|
||||
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
|
||||
.getShell();
|
||||
Cursor prev = shell.getCursor();
|
||||
Cursor wait = new Cursor(Display.getDefault(), SWT.CURSOR_WAIT);
|
||||
this.checkGages();
|
||||
boolean ref = MPEDataManager.getInstance().isRadarEditFlag();
|
||||
/* Store any gage edits into the HourlyPP or PseudoGageVal table. */
|
||||
|
@ -291,7 +288,7 @@ public class RegenHrFlds {
|
|||
String drr = "1 " + hour + " " + dr.format(datetime);
|
||||
System.out.println("Regen args are " + drr);
|
||||
MpeFieldGenJob regen = new MpeFieldGenJob(drr);
|
||||
shell.setCursor(wait);
|
||||
shell.setCursor(shell.getDisplay().getSystemCursor(SWT.CURSOR_WAIT));
|
||||
regen.schedule();
|
||||
try {
|
||||
regen.join();
|
||||
|
@ -300,9 +297,8 @@ public class RegenHrFlds {
|
|||
e.printStackTrace();
|
||||
}
|
||||
|
||||
/* Clear gage edits */
|
||||
MPEDataManager.getInstance().clearEditGages();
|
||||
shell.setCursor(prev);
|
||||
shell.setCursor(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
/**
|
||||
* This software was developed and / or modified by Raytheon Company,
|
||||
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||
*
|
||||
* U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||
* This software product contains export-restricted data whose
|
||||
* export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||
* to non-U.S. persons whether in the United States or abroad requires
|
||||
* an export license or other authorization.
|
||||
*
|
||||
* Contractor Name: Raytheon Company
|
||||
* Contractor Address: 6825 Pine Street, Suite 340
|
||||
* Mail Stop B8
|
||||
* Omaha, NE 68106
|
||||
* 402.291.0100
|
||||
*
|
||||
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||
* further licensing information.
|
||||
**/
|
||||
package com.raytheon.viz.radar;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -14,6 +33,25 @@ import com.raytheon.uf.viz.core.HDF5Util;
|
|||
import com.raytheon.uf.viz.core.cache.CacheObject;
|
||||
import com.raytheon.uf.viz.core.cache.CacheObject.IObjectRetriever;
|
||||
|
||||
/**
|
||||
* Client side version of radar record that retrieves all data from hdf5 on
|
||||
* demand and holds it in a cache.
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 18, 2013 bsteffen Initial javadoc
|
||||
* Mar 18, 2013 1804 bsteffen Remove AlphanumericValues from radar
|
||||
* HDF5.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bsteffen
|
||||
* @version 1.0
|
||||
*/
|
||||
public class DefaultVizRadarRecord extends VizRadarRecord {
|
||||
|
||||
private static final long serialVersionUID = -6878454982599668417L;
|
||||
|
@ -71,9 +109,6 @@ public class DefaultVizRadarRecord extends VizRadarRecord {
|
|||
if (object.getRawShortData() != null) {
|
||||
size += object.getRawData().length * 2;
|
||||
}
|
||||
if (object.getAlphanumericValues() != null) {
|
||||
size += object.getAlphanumericValues().length() * 2;
|
||||
}
|
||||
if (object.getAngleData() != null) {
|
||||
size += object.getAngleData().length * 4;
|
||||
}
|
||||
|
|
|
@ -42,6 +42,8 @@ import com.raytheon.uf.viz.core.cache.CacheObject.IObjectRetrieverAndDisposer;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Apr 26, 2011 mschenke Initial creation
|
||||
* Mar 18, 2013 1804 bsteffen Remove AlphanumericValues from radar
|
||||
* HDF5.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -87,7 +89,6 @@ public class RadarRecordDataRetriever implements
|
|||
object.setSymbologyBlock(null);
|
||||
object.setSymbologyData(null);
|
||||
object.setProductVals(null);
|
||||
object.setAlphanumericValues(null);
|
||||
object.setMapRecordVals(null);
|
||||
object.setGsmMessage(null);
|
||||
object.setStormIDs(null);
|
||||
|
@ -129,9 +130,6 @@ public class RadarRecordDataRetriever implements
|
|||
if (object.getMapProductVals() != null) {
|
||||
objs.add(object.getMapProductVals());
|
||||
}
|
||||
if (object.getAlphanumericValues() != null) {
|
||||
objs.add(object.getAlphanumericValues());
|
||||
}
|
||||
if (object.getMapRecordVals() != null) {
|
||||
objs.add(object.getMapRecordVals());
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
|
|||
import com.raytheon.uf.common.dataplugin.radar.level3.Layer;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.LinkedVector;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.LinkedVectorPacket;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.SymbologyBlock;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.SymbologyPacket;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.TextSymbolPacket;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.UnlinkedVector;
|
||||
|
@ -78,6 +79,8 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Mar 16, 2009 askripsk Initial creation
|
||||
* Jul 26, 2010 #3723 bkowal Now implements the magnification
|
||||
* capability.
|
||||
* Mar 19, 2013 1804 bsteffen Remove empty data structures from radar
|
||||
* hdf5.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -335,7 +338,9 @@ public class RadarXYResource extends RadarImageResource<RadarXYDescriptor> {
|
|||
linkedLines.clear();
|
||||
unlinkedLines.clear();
|
||||
points.clear();
|
||||
for (Layer currLayer : radarRecord.getSymbologyBlock().getLayers()) {
|
||||
SymbologyBlock sb = radarRecord.getSymbologyBlock();
|
||||
if (sb != null) {
|
||||
for (Layer currLayer : sb.getLayers()) {
|
||||
for (SymbologyPacket currPacket : currLayer.getPackets()) {
|
||||
if (currPacket instanceof TextSymbolPacket) {
|
||||
TextSymbolPacket tsp = (TextSymbolPacket) currPacket;
|
||||
|
@ -358,6 +363,7 @@ public class RadarXYResource extends RadarImageResource<RadarXYDescriptor> {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
initPlotObjects = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -53,6 +53,7 @@ import com.raytheon.viz.warngen.gis.AffectedAreas;
|
|||
* moved the following methods from InitialLockingBehavior to this class:
|
||||
* bulletIndices(), header(), firstBullet(), secondBullet(), getImmediateCausesPtrn();
|
||||
* updated body(), header(), and secondBullet();
|
||||
* Mar 13, 2013 DR 15892 D. Friedman Fix bullet parsing.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -141,10 +142,13 @@ abstract public class AbstractLockingBehavior implements ICommonPatterns {
|
|||
private Integer[] bulletIndices() {
|
||||
List<Integer> bulletIndices = new ArrayList<Integer>();
|
||||
|
||||
int index = text.indexOf("* ");
|
||||
/* Assumes first line cannot be a bullet and that the '*' is
|
||||
* at the start of a line.
|
||||
*/
|
||||
int index = text.indexOf("\n* ");
|
||||
while (index >= 0) {
|
||||
bulletIndices.add(index);
|
||||
index = text.indexOf("* ", index + 2);
|
||||
bulletIndices.add(index + 1);
|
||||
index = text.indexOf("\n* ", index + 3);
|
||||
}
|
||||
|
||||
return bulletIndices.toArray(new Integer[bulletIndices.size()]);
|
||||
|
|
|
@ -39,6 +39,8 @@ import com.raytheon.viz.warngen.gis.AffectedAreas;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 24, 2012 15322 jsanchez Initial creation
|
||||
* Jan 8, 2013 15664 Qinglu Lin Updated body().
|
||||
* Mar 13, 2013 15892 D. Friedman Fix headline locking. Do not
|
||||
* lock "AND" or "FOR".
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -51,9 +53,7 @@ public class FollowUpLockingBehavior extends AbstractLockingBehavior {
|
|||
*/
|
||||
@Override
|
||||
public void body() {
|
||||
if (action != WarningAction.COR)
|
||||
headlines();
|
||||
else
|
||||
super.body();
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ public class FollowUpLockingBehavior extends AbstractLockingBehavior {
|
|||
// should be blank.
|
||||
Pattern headlinePtrn = Pattern
|
||||
.compile(
|
||||
"^\\.\\.\\.(A|THE) (.*) (WARNING|ADVISORY) .*(REMAINS|EXPIRE|CANCELLED).*(\\.\\.\\.)$",
|
||||
"^\\.\\.\\.(AN?|THE) (.*) (WARNING|ADVISORY) .*(REMAINS|EXPIRE|CANCELLED).*(\\.\\.\\.)$",
|
||||
Pattern.MULTILINE);
|
||||
Matcher m = headlinePtrn.matcher(text);
|
||||
|
||||
|
@ -187,16 +187,8 @@ public class FollowUpLockingBehavior extends AbstractLockingBehavior {
|
|||
+ LOCK_START + "..." + LOCK_END;
|
||||
}
|
||||
// Locks warning type (i.e. SEVERE THUNDERSTORM)
|
||||
headline = headline.replaceAll("(A|THE) (" + warningType + ")",
|
||||
LOCK_START + "$0" + LOCK_END);
|
||||
|
||||
// Locks the 'FOR' in the headline
|
||||
headline = headline.replaceFirst(" FOR ", " " + LOCK_START + "FOR"
|
||||
+ LOCK_END + " ");
|
||||
|
||||
// Locks the 'AND' in the headline
|
||||
headline = headline.replaceFirst(" AND ", " " + LOCK_START + "AND"
|
||||
+ LOCK_END + " ");
|
||||
headline = headline.replaceAll("(AN?|THE)( [\\w\\s]*?)(" + warningType + ")",
|
||||
LOCK_START + "$1" + LOCK_END + "$2" + LOCK_START + "$3" + LOCK_END);
|
||||
|
||||
return headline;
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ import java.util.regex.Pattern;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Sep 24, 2012 15332 jsanchez Initial creation
|
||||
* Oct 18, 2012 15332 jsanchez Replaced listOfAreaNamesPtrn with String pattern.
|
||||
* Mar 13, 2013 DR 15892 D. Friedman Allow some punctuation in area names.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -55,7 +56,7 @@ public interface ICommonPatterns {
|
|||
// LOCK_END can be added at the start of the line if a previous line has
|
||||
// been locked.
|
||||
public static final String listOfAreaName = "^((" + LOCK_END
|
||||
+ "){0,1}(((\\w+\\s{1})+\\w{2}-)*((\\w+\\s{1})+\\w{2}-)))";
|
||||
+ "){0,1}((([\\?\\(\\)\\w\\.,/'-]+\\s{1})+\\w{2}-)*(([\\?\\(\\)\\w\\.,/'-]+\\s{1})+\\w{2}-)))";
|
||||
|
||||
// LOCK_END should not be found at the beginning of a first bullet since the
|
||||
// previous line should be blank.
|
||||
|
|
|
@ -346,7 +346,7 @@ public class FipsUtil {
|
|||
* @param fips
|
||||
* @return
|
||||
*/
|
||||
private static ArrayList<String> getListCounties(String fips) {
|
||||
public static ArrayList<String> getListCounties(String fips) {
|
||||
ArrayList<String> rval = new ArrayList<String>();
|
||||
String matchStr = "";
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ import com.raytheon.viz.warngen.text.ICommonPatterns;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 22, 2008 #1284 bwoodle Initial creation
|
||||
* Oct 18, 2012 15332 jsanchez Fixed refactor bugs.
|
||||
* Mar 13, 2013 DR 15892 D. Friedman Handle SMW format in canceledAreasFromText
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -43,6 +44,8 @@ public class FollowUpUtil {
|
|||
public static final Pattern vtecPtrn = Pattern
|
||||
.compile("/[OTEX]\\.([A-Z]{3})\\.[A-Za-z0-9]{4}\\.[A-Z]{2}\\.[WAYSFON]\\.\\d{4}\\.\\d{6}T\\d{4}Z-\\d{6}T\\d{4}Z/");
|
||||
|
||||
private static final String SMW_CANCELED_AREAS_HEADER = "THE AFFECTED AREAS WERE...";
|
||||
|
||||
/**
|
||||
* This method checks whether a particular followup should be available
|
||||
* given a Warning Record, a vtec Action, and a template configuration
|
||||
|
@ -173,7 +176,8 @@ public class FollowUpUtil {
|
|||
String headline = "";
|
||||
Pattern listOfAreaNamePtrn = Pattern
|
||||
.compile(ICommonPatterns.listOfAreaName);
|
||||
for (String line : originalText.trim().split("\n")) {
|
||||
String[] splitLines = originalText.trim().split("\n");
|
||||
for (String line : splitLines) {
|
||||
if (line.contains("TEST") || line.trim().length() == 0) {
|
||||
continue;
|
||||
}
|
||||
|
@ -198,8 +202,15 @@ public class FollowUpUtil {
|
|||
headline += line;
|
||||
}
|
||||
}
|
||||
String[] ugcs = ugcLine.split("-");
|
||||
String[] names = namesLine.split("-");
|
||||
String[] ugcs = FipsUtil.getListCounties(ugcLine).toArray(new String[0]);
|
||||
String[] names;
|
||||
boolean smwAreas = false;
|
||||
if (namesLine.length() > 0)
|
||||
names = namesLine.split("-");
|
||||
else {
|
||||
names = parseSMWCanceledAreas(splitLines);
|
||||
smwAreas = true;
|
||||
}
|
||||
String[] areas = headline.split("\\.\\.\\.");
|
||||
|
||||
ArrayList<AffectedAreas> al = new ArrayList<AffectedAreas>();
|
||||
|
@ -223,12 +234,20 @@ public class FollowUpUtil {
|
|||
}
|
||||
}
|
||||
|
||||
if (ugc.length() < 3)
|
||||
continue; // TODO: log?
|
||||
|
||||
fips = ugc.substring(ugc.length() - 3);
|
||||
|
||||
if (i < names.length) {
|
||||
if (!smwAreas && names[i].length() >= 3) {
|
||||
name = names[i].substring(0, names[i].length() - 3);
|
||||
stateAbbreviation = names[i].substring(names[i].length() - 2);
|
||||
} else {
|
||||
name = names[i];
|
||||
}
|
||||
} else
|
||||
break;
|
||||
|
||||
if (name != null) {
|
||||
for (String area : areas) {
|
||||
|
@ -334,4 +353,32 @@ public class FollowUpUtil {
|
|||
|
||||
return rval;
|
||||
}
|
||||
|
||||
/** Parses the canceled areas of an SMW, which have a different format
|
||||
* from other products.
|
||||
*/
|
||||
private static String[] parseSMWCanceledAreas(String[] splitLines) {
|
||||
StringBuilder text = new StringBuilder(64);
|
||||
boolean inAreas = false;
|
||||
for (String line : splitLines) {
|
||||
String trimmedLine = line.trim();
|
||||
if (SMW_CANCELED_AREAS_HEADER.equals(trimmedLine))
|
||||
inAreas = true;
|
||||
else if (inAreas) {
|
||||
if (trimmedLine.length() > 0) {
|
||||
text.append(trimmedLine);
|
||||
text.append('\n');
|
||||
} else
|
||||
break;
|
||||
}
|
||||
}
|
||||
int len = text.length();
|
||||
if (len >= 4 && "...\n".equals(text.substring(len - 4)))
|
||||
text.delete(len - 4, len);
|
||||
String[] areas = text.toString().split("\\.\\.\\.\\n");
|
||||
// Unwrap lines.
|
||||
for (int i = 0; i < areas.length; ++i)
|
||||
areas[i] = areas[i].replace("\n", " ");
|
||||
return areas;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="lib" path="bzip2.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
|
@ -1,7 +0,0 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Bzip2
|
||||
Bundle-SymbolicName: org.apache.tools.bzip2
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Export-Package: org.apache.tools.bzip2
|
||||
Bundle-ClassPath: bzip2.jar
|
|
@ -1,2 +0,0 @@
|
|||
bin.includes = META-INF/,\
|
||||
bzip2.jar
|
Binary file not shown.
8
cots/org.itadaki.bzip2/.classpath
Normal file
8
cots/org.itadaki.bzip2/.classpath
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path=""/>
|
||||
<classpathentry exported="true" kind="lib" path="jbzip2-0.9.1.jar"/>
|
||||
<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="output" path=""/>
|
||||
</classpath>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.apache.tools.bzip2</name>
|
||||
<name>org.itadaki.bzip2</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
12
cots/org.itadaki.bzip2/.settings/org.eclipse.jdt.core.prefs
Normal file
12
cots/org.itadaki.bzip2/.settings/org.eclipse.jdt.core.prefs
Normal file
|
@ -0,0 +1,12 @@
|
|||
#Tue Mar 19 13:25:31 CDT 2013
|
||||
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.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
8
cots/org.itadaki.bzip2/META-INF/MANIFEST.MF
Normal file
8
cots/org.itadaki.bzip2/META-INF/MANIFEST.MF
Normal file
|
@ -0,0 +1,8 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Bzip2
|
||||
Bundle-SymbolicName: org.itadaki.bzip2
|
||||
Bundle-Version: 0.9.1
|
||||
Bundle-ClassPath: jbzip2-0.9.1.jar,
|
||||
.
|
||||
Export-Package: org.itadaki.bzip2
|
4
cots/org.itadaki.bzip2/build.properties
Normal file
4
cots/org.itadaki.bzip2/build.properties
Normal file
|
@ -0,0 +1,4 @@
|
|||
source.. = .
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
jbzip2-0.9.1.jar
|
BIN
cots/org.itadaki.bzip2/jbzip2-0.9.1.jar
Normal file
BIN
cots/org.itadaki.bzip2/jbzip2-0.9.1.jar
Normal file
Binary file not shown.
|
@ -5,6 +5,7 @@
|
|||
##### Qinglu Lin 08-13-2012 DR 14493. Use corToNewMarker and corEventtime.
|
||||
##### D. Friedman 11-09-2012 DR 15430. Rework included watches.
|
||||
##### QINGLU LIN 12-27-2012 DR 15594. Added $lock to headlineLocList.
|
||||
##### D. Friedman 03-13-2013 DR 15892. Do not lock portion of state in firstBullet.
|
||||
####################################################################################################
|
||||
Mile Marker Test Code
|
||||
macro "mmarkers" use (called out of VM_global_library.vm):
|
||||
|
@ -750,7 +751,7 @@ THE ${area.name}##
|
|||
#if(${intFIPS.parseInt($FIPS)} < 500 || ${area.stateabbr} == "TX")
|
||||
<L>${area.name} ${area.areaNotation}</L> IN #areaFormat(${area.partOfParentRegion} true false) <L>${area.parentRegion}...</L>
|
||||
#else
|
||||
<L>${area.name}</L> IN <L>#areaFormat(${area.partOfParentRegion} true false) ${area.parentRegion}...</L>
|
||||
<L>${area.name}</L> IN #areaFormat(${area.partOfParentRegion} true false) <L>${area.parentRegion}...</L>
|
||||
#end
|
||||
#end
|
||||
## COMMENTED OUT 5 LINES BELOW THIS IS GENERALLY NOT UTILIZED - you can unREMARK if desired
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
## Evan Bookbinder 4-25-2012 for OB 12.3.1 (corText)
|
||||
## QINGLU LIN 7-31-2012 DR 15217 use roundAndPad
|
||||
## Qinglu Lin 12-27-2012 DR 15594. Appended true to headlineLocList's parameter list.
|
||||
## D. Friedman 03-13-2013 DR 15892. Use printcoords.
|
||||
################################################
|
||||
##
|
||||
### CREATE PHRASING DEPENDING ON WHETHER WE ISSUE EXP PRIOR TO EXPIRATION TIME OR NOT
|
||||
|
@ -482,10 +483,7 @@ THIS IS A TEST MESSAGE.##
|
|||
THIS IS A TEST MESSAGE. DO NOT TAKE ACTION BASED ON THIS MESSAGE.
|
||||
|
||||
#end
|
||||
LAT...LON ##
|
||||
#foreach(${coord} in ${areaPoly})
|
||||
#llFormat(${coord.y}) #llFormat(${coord.x}) ##
|
||||
#end
|
||||
#printcoords(${areaPoly}, ${list})
|
||||
|
||||
TIME...MOT...LOC ##
|
||||
${dateUtil.format(${event}, ${timeFormat.time})}Z ##
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
## Evan Bookbinder 4-25-2012 for OB 12.3.1 (MND)
|
||||
## QINGLU LIN 7-31-2012 DR 15217 use roundAndPad ##
|
||||
## Qinglu Lin 12-27-2012 DR 15594. Appended true to headlineLocList's parameter list.
|
||||
## D. Friemdan 13-03-2013 DR 15892. Do not lock locations in headline.
|
||||
######################################################
|
||||
##
|
||||
##SET SOME INITIAL VARIABLES
|
||||
|
@ -120,7 +121,7 @@ THIS IS A TEST MESSAGE. ##
|
|||
#end
|
||||
#if(${windSpeed} >= 40 || ${hailSize} >= 0.70)
|
||||
...SIGNIFICANT WEATHER ADVISORY FOR ##
|
||||
#headlineLocList(${areas} true false true false true) #secondBullet(${dateUtil},${expire},${timeFormat},${localtimezone},${secondtimezone})
|
||||
#headlineLocList(${areas} true false true false false) #secondBullet(${dateUtil},${expire},${timeFormat},${localtimezone},${secondtimezone})
|
||||
...##
|
||||
#elseif(${windSpeed} == 0 && ${hailSize} == 0)
|
||||
!** YOU DID NOT SELECT ANY WIND OR HAIL THREATS. PLEASE RE-GENERATE THIS ADVISORY **!
|
||||
|
|
|
@ -15,7 +15,8 @@ Require-Bundle: com.raytheon.edex.common,
|
|||
com.raytheon.uf.common.serialization.comm,
|
||||
com.raytheon.uf.common.status;bundle-version="1.11.11",
|
||||
com.raytheon.uf.common.dataplugin.radar,
|
||||
com.raytheon.uf.edex.menus;bundle-version="1.0.0"
|
||||
com.raytheon.uf.edex.menus;bundle-version="1.0.0",
|
||||
org.itadaki.bzip2;bundle-version="0.9.1"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: com.raytheon.edex.plugin.radar,
|
||||
com.raytheon.edex.plugin.radar.dao,
|
||||
|
@ -25,5 +26,4 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
|||
Import-Package: com.raytheon.uf.common.comm,
|
||||
com.raytheon.uf.common.dataplugin.text.db,
|
||||
com.raytheon.uf.common.site.ingest,
|
||||
org.apache.commons.logging,
|
||||
org.apache.tools.bzip2
|
||||
org.apache.commons.logging
|
||||
|
|
|
@ -35,6 +35,7 @@ import com.raytheon.edex.plugin.radar.dao.RadarStationDao;
|
|||
import com.raytheon.edex.plugin.radar.level2.Level2BaseRadar;
|
||||
import com.raytheon.edex.plugin.radar.level3.Level3BaseRadar;
|
||||
import com.raytheon.edex.plugin.radar.util.RadarEdexTextProductUtil;
|
||||
import com.raytheon.edex.plugin.radar.util.RadarSpatialUtil;
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.PluginException;
|
||||
import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
|
||||
|
@ -85,6 +86,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader;
|
|||
* 2/14/2007 139 Phillippe Initial check-in. Refactor of initial implementation.
|
||||
* Dec 17, 2007 600 bphillip Added dao pool usage
|
||||
* Dec 03, 2010 2235 cjeanbap EDEXUtility.sendMessageAlertViz() signature changed.
|
||||
* Mar 19, 2013 1804 bsteffen Optimize decoder performance.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bphillip
|
||||
|
@ -200,7 +203,8 @@ public class RadarDecoder extends AbstractDecoder {
|
|||
RadarRecord record = new RadarRecord();
|
||||
record.setProductCode(l3Radar.getMessageCode());
|
||||
record.setDataTime(new DataTime(l3Radar.getMessageTimestamp()));
|
||||
RadarStation station = getStationById(l3Radar.getSourceId());
|
||||
RadarStation station = RadarSpatialUtil
|
||||
.getRadarStationByRpgIdDec(l3Radar.getSourceId());
|
||||
if (station == null) {
|
||||
record.setIcao("unkn");
|
||||
logger.error(headers.get("ingestfilename")
|
||||
|
@ -409,8 +413,6 @@ public class RadarDecoder extends AbstractDecoder {
|
|||
record.setMapRecordVals(recordVals);
|
||||
record.setTabularBlock(tb);
|
||||
}
|
||||
record.setAlphanumericValues(l3Radar
|
||||
.getAlphanumericValues());
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -543,13 +545,12 @@ public class RadarDecoder extends AbstractDecoder {
|
|||
*/
|
||||
private void processSymbologyBlock(RadarRecord record,
|
||||
SymbologyBlock symbologyBlock) {
|
||||
|
||||
int errorCount = 0;
|
||||
|
||||
if (symbologyBlock == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
int packetsKept = 0;
|
||||
|
||||
List<Layer> packetsInLyrs = new ArrayList<Layer>();
|
||||
for (int layer = 0; layer < symbologyBlock.getNumLayers(); ++layer) {
|
||||
Layer lyr = new Layer();
|
||||
|
@ -585,20 +586,19 @@ public class RadarDecoder extends AbstractDecoder {
|
|||
}
|
||||
}
|
||||
}
|
||||
packetsKept += packets.size();
|
||||
lyr.setPackets(packets.toArray(new SymbologyPacket[packets.size()]));
|
||||
packetsInLyrs.add(lyr);
|
||||
|
||||
}
|
||||
|
||||
// remove the radial and raster from the symb block
|
||||
symbologyBlock.setLayers(packetsInLyrs.toArray(new Layer[packetsInLyrs
|
||||
.size()]));
|
||||
// remove the radial and raster from the symb block, only keep it if
|
||||
// there are other packets.
|
||||
if (packetsKept > 0) {
|
||||
symbologyBlock.setLayers(packetsInLyrs
|
||||
.toArray(new Layer[packetsInLyrs.size()]));
|
||||
record.setSymbologyBlock(symbologyBlock);
|
||||
record.correlateSymbologyPackets();
|
||||
|
||||
if (errorCount > 0) {
|
||||
logger.error("Radar file contains " + errorCount
|
||||
+ " unrecognized symbology packet types.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -656,23 +656,6 @@ public class RadarDecoder extends AbstractDecoder {
|
|||
record.setRawData(precipPacket.getPrecipData());
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the radar station from the dao for the rpg id given
|
||||
*
|
||||
* @param rpg_id
|
||||
* @return
|
||||
*/
|
||||
private RadarStation getStationById(int rpg_id) {
|
||||
try {
|
||||
RadarStation station = radarStationDao.queryByRpgIdDec(String
|
||||
.format("%03d", rpg_id));
|
||||
return station;
|
||||
} catch (Exception e) {
|
||||
logger.error("Error retrieving RadarStation for id: " + rpg_id, e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the radar station from the dao for the name given
|
||||
*
|
||||
|
|
|
@ -28,6 +28,8 @@ package com.raytheon.edex.plugin.radar.dao;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 02/06/09 1990 bphillip Initial creation
|
||||
* Mar 18, 2013 1804 bsteffen Reduce useless data stored in radar hdf5
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author bphillip
|
||||
|
@ -41,12 +43,15 @@ import java.util.Map;
|
|||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.PluginException;
|
||||
import com.raytheon.uf.common.dataplugin.persist.IPersistable;
|
||||
import com.raytheon.uf.common.dataplugin.radar.RadarDataKey;
|
||||
import com.raytheon.uf.common.dataplugin.radar.RadarDataPoint;
|
||||
import com.raytheon.uf.common.dataplugin.radar.RadarRecord;
|
||||
import com.raytheon.uf.common.dataplugin.radar.RadarStoredData;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.GSMBlock.GSMMessage;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.GraphicBlock;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.SymbologyBlock;
|
||||
import com.raytheon.uf.common.dataplugin.radar.util.RadarConstants;
|
||||
import com.raytheon.uf.common.dataplugin.radar.util.RadarConstants.MapValues;
|
||||
import com.raytheon.uf.common.dataplugin.radar.util.RadarDataRetriever;
|
||||
import com.raytheon.uf.common.datastorage.IDataStore;
|
||||
import com.raytheon.uf.common.datastorage.StorageProperties;
|
||||
|
@ -133,10 +138,10 @@ public class RadarDao extends PluginDao {
|
|||
dataStore.addDataRecord(bdr, sp);
|
||||
}
|
||||
|
||||
if (radarRec.getSymbologyData() != null) {
|
||||
Map<RadarDataKey, RadarDataPoint> symData = radarRec.getSymbologyData();
|
||||
if (symData != null && !symData.isEmpty()) {
|
||||
byte[] data = DynamicSerializationManager.getManager(
|
||||
SerializationType.Thrift).serialize(
|
||||
radarRec.getSymbologyData());
|
||||
SerializationType.Thrift).serialize(symData);
|
||||
ByteDataRecord bdr = new ByteDataRecord(
|
||||
RadarStoredData.SYM_DATA_ID, radarRec.getDataURI(), data);
|
||||
bdr.setCorrelationObject(radarRec);
|
||||
|
@ -154,10 +159,11 @@ public class RadarDao extends PluginDao {
|
|||
dataStore.addDataRecord(bdr, sp);
|
||||
}
|
||||
|
||||
if (radarRec.getMapProductVals() != null) {
|
||||
Map<MapValues, Map<String, Map<MapValues, String>>> mapProdVals = radarRec
|
||||
.getMapProductVals();
|
||||
if (mapProdVals != null && !mapProdVals.isEmpty()) {
|
||||
byte[] data = DynamicSerializationManager.getManager(
|
||||
SerializationType.Thrift).serialize(
|
||||
radarRec.getMapProductVals());
|
||||
SerializationType.Thrift).serialize(mapProdVals);
|
||||
ByteDataRecord bdr = new ByteDataRecord(
|
||||
RadarStoredData.PRODUCT_VALS_ID, radarRec.getDataURI(),
|
||||
data);
|
||||
|
@ -165,17 +171,6 @@ public class RadarDao extends PluginDao {
|
|||
dataStore.addDataRecord(bdr, sp);
|
||||
}
|
||||
|
||||
if (radarRec.getAlphanumericValues() != null) {
|
||||
byte[] data = DynamicSerializationManager.getManager(
|
||||
SerializationType.Thrift).serialize(
|
||||
radarRec.getAlphanumericValues());
|
||||
ByteDataRecord bdr = new ByteDataRecord(
|
||||
RadarStoredData.ALPHANUMERIC_ID, radarRec.getDataURI(),
|
||||
data);
|
||||
bdr.setCorrelationObject(radarRec);
|
||||
dataStore.addDataRecord(bdr, sp);
|
||||
}
|
||||
|
||||
if (radarRec.getTabularBlock() != null) {
|
||||
byte[] data = DynamicSerializationManager.getManager(
|
||||
SerializationType.Thrift).serialize(
|
||||
|
@ -195,19 +190,21 @@ public class RadarDao extends PluginDao {
|
|||
dataStore.addDataRecord(rec, sp);
|
||||
}
|
||||
|
||||
if (radarRec.getMapRecordVals() != null) {
|
||||
Map<MapValues, Map<MapValues, String>> mapRecVals = radarRec
|
||||
.getMapRecordVals();
|
||||
if (mapRecVals != null && !mapRecVals.isEmpty()) {
|
||||
byte[] data = DynamicSerializationManager.getManager(
|
||||
SerializationType.Thrift).serialize(
|
||||
radarRec.getMapRecordVals());
|
||||
SerializationType.Thrift).serialize(mapRecVals);
|
||||
ByteDataRecord bdr = new ByteDataRecord(
|
||||
RadarStoredData.RECORD_VALS_ID, radarRec.getDataURI(), data);
|
||||
bdr.setCorrelationObject(radarRec);
|
||||
dataStore.addDataRecord(bdr, sp);
|
||||
}
|
||||
|
||||
if (radarRec.getStormIDs() != null) {
|
||||
Map<String, RadarDataKey> stormIds = radarRec.getStormIDs();
|
||||
if (stormIds != null && !stormIds.isEmpty()) {
|
||||
byte[] data = DynamicSerializationManager.getManager(
|
||||
SerializationType.Thrift).serialize(radarRec.getStormIDs());
|
||||
SerializationType.Thrift).serialize(stormIds);
|
||||
ByteDataRecord bdr = new ByteDataRecord(
|
||||
RadarStoredData.STORM_IDS_ID, radarRec.getDataURI(), data);
|
||||
bdr.setCorrelationObject(radarRec);
|
||||
|
|
|
@ -35,11 +35,11 @@ import java.util.List;
|
|||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.tools.bzip2.CBZip2InputStream;
|
||||
import org.itadaki.bzip2.BZip2InputStream;
|
||||
|
||||
import com.raytheon.edex.esb.Headers;
|
||||
import com.raytheon.edex.plugin.radar.dao.RadarStationDao;
|
||||
import com.raytheon.edex.plugin.radar.util.RadarEdexTextProductUtil;
|
||||
import com.raytheon.edex.plugin.radar.util.RadarSpatialUtil;
|
||||
import com.raytheon.uf.common.dataplugin.radar.RadarStation;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.AlertAdaptationParameters;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.AlertMessage;
|
||||
|
@ -157,8 +157,6 @@ public class Level3BaseRadar {
|
|||
|
||||
private TabularBlock tabularBlock;
|
||||
|
||||
private String alphanumericValues;
|
||||
|
||||
private GSMBlock gsmBlock;
|
||||
|
||||
private AlertAdaptationParameters aapMessage;
|
||||
|
@ -584,45 +582,6 @@ public class Level3BaseRadar {
|
|||
return tabBlock;
|
||||
}
|
||||
|
||||
private String readAlphanumericAddOn() throws IOException {
|
||||
if (theRadarData.available() != 0 && symbologyBlock == null) {
|
||||
short temp = theRadarData.readShort();
|
||||
while (theRadarData.available() != 0 && temp != -1) {
|
||||
temp = theRadarData.readShort();
|
||||
}
|
||||
}
|
||||
if (theRadarData.available() != 0 && graphicBlock == null) {
|
||||
short temp = theRadarData.readShort();
|
||||
while (theRadarData.available() != 0 && temp != -1) {
|
||||
temp = theRadarData.readShort();
|
||||
}
|
||||
}
|
||||
if (theRadarData.available() != 0 && tabularBlock == null) {
|
||||
short temp = theRadarData.readShort();
|
||||
while (theRadarData.available() != 0 && temp != -1) {
|
||||
temp = theRadarData.readShort();
|
||||
}
|
||||
}
|
||||
|
||||
int lineLen = theRadarData.available();
|
||||
if (lineLen > 0) {
|
||||
byte[] buf = new byte[lineLen];
|
||||
theRadarData.readFully(buf);
|
||||
String temp = new String(buf);
|
||||
// PSM is found in all products that have useful Site Adaptation
|
||||
// Parameters. For this reason, we are dropping every other set of
|
||||
// Site Adaptation Parameters.
|
||||
if (temp.contains("PSM")) {
|
||||
temp = temp.substring(temp.indexOf("PSM"));
|
||||
} else {
|
||||
temp = "";
|
||||
}
|
||||
return temp;
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
|
@ -697,10 +656,6 @@ public class Level3BaseRadar {
|
|||
return tabularBlock;
|
||||
}
|
||||
|
||||
public String getAlphanumericValues() {
|
||||
return alphanumericValues;
|
||||
}
|
||||
|
||||
/**
|
||||
* Goes through the radar header and reads in all the important fields.
|
||||
*
|
||||
|
@ -761,24 +716,7 @@ public class Level3BaseRadar {
|
|||
productVersion = theRadarData.readByte();
|
||||
|
||||
productSpotBlank = theRadarData.readByte();
|
||||
if (afosId == "") {
|
||||
if ("".equals(radarLoc)) {
|
||||
RadarStationDao stat = new RadarStationDao();
|
||||
try {
|
||||
RadarStation loc = stat.queryByRpgIdDec(String
|
||||
.valueOf(theSourceId));
|
||||
if (loc != null) {
|
||||
radarLoc = loc.getRdaId();
|
||||
radarLoc = radarLoc.substring(1);
|
||||
}
|
||||
} catch (DataAccessLayerException e) {
|
||||
theHandler.handle(Priority.ERROR,
|
||||
"Unable to query database for radar location", e);
|
||||
}
|
||||
}
|
||||
afosId = RadarTextProductUtil
|
||||
.createAfosId(theProductCode, radarLoc);
|
||||
}
|
||||
lookupAfosId();
|
||||
int symbologyBlockOffset = theRadarData.readInt() * 2;
|
||||
int graphicBlockOffset = theRadarData.readInt() * 2;
|
||||
int tabularBlockOffset = theRadarData.readInt() * 2;
|
||||
|
@ -793,13 +731,7 @@ public class Level3BaseRadar {
|
|||
try {
|
||||
theRadarData.reset();
|
||||
theRadarData.readFully(msg);
|
||||
InputStream ins = new DataInputStream(theRadarData);
|
||||
char c1 = (char) ins.read();
|
||||
char c2 = (char) ins.read();
|
||||
if (c1 != 'B' || c2 != 'Z') {
|
||||
throw new IOException("Not a bzip2 stream");
|
||||
}
|
||||
ins = new CBZip2InputStream(ins);
|
||||
InputStream ins = new BZip2InputStream(theRadarData, false);
|
||||
uncompressed = new byte[uncompressedSize];
|
||||
ins.read(uncompressed);
|
||||
} catch (IOException e) {
|
||||
|
@ -828,7 +760,6 @@ public class Level3BaseRadar {
|
|||
symbologyBlock = readSymbologyBlock(symbologyBlockOffset);
|
||||
graphicBlock = readGraphicBlock(graphicBlockOffset);
|
||||
tabularBlock = readTabularBlock(tabularBlockOffset);
|
||||
alphanumericValues = readAlphanumericAddOn();
|
||||
}
|
||||
|
||||
if (tabularBlock != null) {
|
||||
|
@ -911,24 +842,9 @@ public class Level3BaseRadar {
|
|||
}
|
||||
|
||||
tabularBlock.setString(builder.toString());
|
||||
if (afosId == "") {
|
||||
if ("".equals(radarLoc)) {
|
||||
RadarStationDao stat = new RadarStationDao();
|
||||
try {
|
||||
RadarStation loc = stat.queryByRpgIdDec(String
|
||||
.valueOf(theSourceId));
|
||||
if (loc != null) {
|
||||
radarLoc = loc.getRdaId();
|
||||
radarLoc = radarLoc.substring(1);
|
||||
}
|
||||
} catch (DataAccessLayerException e) {
|
||||
theHandler.handle(Priority.ERROR,
|
||||
"Unable to query database for radar location", e);
|
||||
}
|
||||
}
|
||||
afosId = RadarTextProductUtil
|
||||
.createAfosId(theMessageCode, radarLoc);
|
||||
}
|
||||
|
||||
lookupAfosId();
|
||||
|
||||
if (RadarTextProductUtil.radarTable.keySet().contains(theMessageCode)) {
|
||||
byte[] wmoid = wmoHeader.getBytes();
|
||||
WMOHeader header = new WMOHeader(wmoid, headers);
|
||||
|
@ -947,6 +863,29 @@ public class Level3BaseRadar {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the afosId and radarLoc based off the sourceId.
|
||||
*/
|
||||
private void lookupAfosId() {
|
||||
if (afosId.isEmpty()) {
|
||||
if (radarLoc.isEmpty()) {
|
||||
try {
|
||||
RadarStation loc = RadarSpatialUtil
|
||||
.getRadarStationByRpgIdDec(theSourceId);
|
||||
if (loc != null) {
|
||||
radarLoc = loc.getRdaId();
|
||||
radarLoc = radarLoc.substring(1);
|
||||
}
|
||||
} catch (DataAccessLayerException e) {
|
||||
theHandler.handle(Priority.ERROR,
|
||||
"Unable to query database for radar location", e);
|
||||
}
|
||||
}
|
||||
afosId = RadarTextProductUtil
|
||||
.createAfosId(theMessageCode, radarLoc);
|
||||
}
|
||||
}
|
||||
|
||||
private void parseRequestResponse() throws IOException {
|
||||
String temp = new String();
|
||||
theRadarData.skip(4);
|
||||
|
|
|
@ -21,11 +21,14 @@ package com.raytheon.edex.plugin.radar.util;
|
|||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.geotools.referencing.GeodeticCalculator;
|
||||
|
||||
import com.raytheon.edex.plugin.radar.dao.RadarStationDao;
|
||||
import com.raytheon.uf.common.dataplugin.radar.RadarStation;
|
||||
import com.raytheon.uf.edex.database.DataAccessLayerException;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
|
||||
/**
|
||||
|
@ -37,6 +40,7 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 19, 2010 #4473 rjpeter Initial creation.
|
||||
* Mar 19, 2013 1804 bsteffen Cache db queries in radar decoder.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -45,6 +49,8 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
*/
|
||||
public class RadarSpatialUtil {
|
||||
|
||||
private static Map<Integer, RadarStation> rpgIdDec2radarStation = new ConcurrentHashMap<Integer, RadarStation>();
|
||||
|
||||
/**
|
||||
* Gets the closest RadarStation entry for a given wfo, lat, lon
|
||||
*
|
||||
|
@ -92,4 +98,22 @@ public class RadarSpatialUtil {
|
|||
return rval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides a level of caching around RadarStationDao.queryByRpgIdDec.
|
||||
*
|
||||
* @param rpgIdDec
|
||||
* @return
|
||||
* @throws DataAccessLayerException
|
||||
*/
|
||||
public static RadarStation getRadarStationByRpgIdDec(int rpgIdDec)
|
||||
throws DataAccessLayerException {
|
||||
RadarStation station = rpgIdDec2radarStation.get(rpgIdDec);
|
||||
if (station == null) {
|
||||
RadarStationDao stat = new RadarStationDao();
|
||||
station = stat.queryByRpgIdDec(String.format("%03d", rpgIdDec));
|
||||
rpgIdDec2radarStation.put(rpgIdDec, station);
|
||||
}
|
||||
return station;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -16,8 +16,8 @@ Require-Bundle: com.raytheon.uf.common.localization;bundle-version="1.11.24",
|
|||
com.raytheon.edex.plugin.radar;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.gridcoverage;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174"
|
||||
com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174",
|
||||
org.itadaki.bzip2;bundle-version="0.9.1"
|
||||
Import-Package: com.raytheon.uf.common.dataplugin.radar,
|
||||
com.raytheon.uf.common.dataplugin.radar.request,
|
||||
com.raytheon.uf.common.ohd,
|
||||
org.apache.tools.bzip2
|
||||
com.raytheon.uf.common.ohd
|
||||
|
|
|
@ -42,10 +42,10 @@ import javax.measure.unit.Unit;
|
|||
import javax.xml.bind.JAXBException;
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
|
||||
import org.apache.tools.bzip2.CBZip2OutputStream;
|
||||
import org.geotools.coverage.grid.GridEnvelope2D;
|
||||
import org.geotools.coverage.grid.GridGeometry2D;
|
||||
import org.geotools.geometry.DirectPosition2D;
|
||||
import org.itadaki.bzip2.BZip2OutputStream;
|
||||
import org.opengis.metadata.spatial.PixelOrientation;
|
||||
import org.opengis.referencing.datum.PixelInCell;
|
||||
import org.opengis.referencing.operation.MathTransform;
|
||||
|
@ -1016,8 +1016,6 @@ public class RPGEnvironmentalDataManager {
|
|||
try {
|
||||
ByteArrayOutputStream baOut = new ByteArrayOutputStream(
|
||||
data.length / 2);
|
||||
baOut.write(66); // 'B' -- BZip2 magic value
|
||||
baOut.write(90); // 'Z'
|
||||
int blockSize100k = Math.max(1/*
|
||||
* CBZip2OutputStream.
|
||||
* MIN_BLOCKSIZE
|
||||
|
@ -1025,7 +1023,7 @@ public class RPGEnvironmentalDataManager {
|
|||
Math.min(9/*
|
||||
* CBZip2OutputStream . MAX_BLOCKSIZE
|
||||
*/, (data.length + 99999) / 100000));
|
||||
CBZip2OutputStream out = new CBZip2OutputStream(baOut,
|
||||
BZip2OutputStream out = new BZip2OutputStream(baOut,
|
||||
blockSize100k);
|
||||
// CBZip2OutputStream.chooseBlockSize(data.length) // why is
|
||||
// this missing?
|
||||
|
|
|
@ -59,9 +59,9 @@ import com.raytheon.uf.common.dataplugin.radar.level3.CellTrendDataPacket;
|
|||
import com.raytheon.uf.common.dataplugin.radar.level3.CellTrendVolumeScanPacket;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.DMDPacket;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.DMDPacket.DMDAttributeIDs;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.DataLevelThreshold;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.GFMPacket;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.GFMPacket.GFMAttributeIDs;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.DataLevelThreshold;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.GSMBlock.GSMMessage;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.GenericDataPacket;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.GraphicBlock;
|
||||
|
@ -119,6 +119,8 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* 10/09/2007 465 randerso Updated to better represent level 3 data
|
||||
* 20071129 472 jkorman Added IDecoderGettable interface.
|
||||
* 03/04/2013 DCS51 zwang Handle MIGFA product
|
||||
* Mar 18, 2013 1804 bsteffen Remove AlphanumericValues from radar
|
||||
* HDF5.
|
||||
* </pre>
|
||||
*
|
||||
* @author bphillip
|
||||
|
@ -1034,14 +1036,6 @@ public class RadarRecord extends PersistablePluginDataObject implements
|
|||
return getStoredData().getGsmMessage();
|
||||
}
|
||||
|
||||
public String getAlphanumericValues() {
|
||||
return getStoredData().getAlphanumericValues();
|
||||
}
|
||||
|
||||
public void setAlphanumericValues(String alphanumericValues) {
|
||||
getStoredData().setAlphanumericValues(alphanumericValues);
|
||||
}
|
||||
|
||||
public short getProductDependentValue(int value) {
|
||||
return getProductDependentValues()[value];
|
||||
}
|
||||
|
|
|
@ -41,6 +41,8 @@ import com.raytheon.uf.common.dataplugin.radar.util.RadarConstants.MapValues;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 29, 2011 bsteffen Initial creation
|
||||
* Mar 18, 2013 1804 bsteffen Remove AlphanumericValues from radar
|
||||
* HDF5.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -65,8 +67,6 @@ public class RadarStoredData {
|
|||
|
||||
public static final String PRODUCT_VALS_ID = "ProductVals";
|
||||
|
||||
public static final String ALPHANUMERIC_ID = "AlphanumericValues";
|
||||
|
||||
public static final String TABULAR_ID = "Tabular";
|
||||
|
||||
public static final String DEPENDENT_VALS_ID = "DependentValues";
|
||||
|
@ -95,8 +95,6 @@ public class RadarStoredData {
|
|||
|
||||
private Map<MapValues, Map<String, Map<MapValues, String>>> productVals = new HashMap<MapValues, Map<String, Map<MapValues, String>>>();
|
||||
|
||||
private String alphanumericValues;
|
||||
|
||||
private Map<MapValues, Map<MapValues, String>> mapRecordVals = new HashMap<MapValues, Map<MapValues, String>>();
|
||||
|
||||
private GSMMessage gsmMessage;
|
||||
|
@ -170,14 +168,6 @@ public class RadarStoredData {
|
|||
this.productVals = productVals;
|
||||
}
|
||||
|
||||
public String getAlphanumericValues() {
|
||||
return alphanumericValues;
|
||||
}
|
||||
|
||||
public void setAlphanumericValues(String alphanumericValues) {
|
||||
this.alphanumericValues = alphanumericValues;
|
||||
}
|
||||
|
||||
public Map<MapValues, Map<MapValues, String>> getMapRecordVals() {
|
||||
return mapRecordVals;
|
||||
}
|
||||
|
|
|
@ -53,6 +53,8 @@ import com.raytheon.uf.common.serialization.SerializationException;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Feb 21, 2011 mschenke Initial creation
|
||||
* Mar 18, 2013 1804 bsteffen Remove AlphanumericValues from radar
|
||||
* HDF5.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -125,14 +127,6 @@ public class RadarDataRetriever {
|
|||
SerializationType.Thrift).deserialize(bais);
|
||||
radarData
|
||||
.setProductVals((HashMap<RadarConstants.MapValues, Map<String, Map<RadarConstants.MapValues, String>>>) o);
|
||||
} else if (record.getName().equals(
|
||||
RadarStoredData.ALPHANUMERIC_ID)) {
|
||||
ByteDataRecord byteData = (ByteDataRecord) record;
|
||||
ByteArrayInputStream bais = new ByteArrayInputStream(
|
||||
byteData.getByteData());
|
||||
Object o = DynamicSerializationManager.getManager(
|
||||
SerializationType.Thrift).deserialize(bais);
|
||||
radarData.setAlphanumericValues((String) o);
|
||||
} else if (record.getName().equals(
|
||||
RadarStoredData.RECORD_VALS_ID)) {
|
||||
ByteDataRecord byteData = (ByteDataRecord) record;
|
||||
|
|
|
@ -22,10 +22,10 @@ package com.raytheon.uf.common.dataplugin.radar.util;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import org.geotools.referencing.GeodeticCalculator;
|
||||
|
||||
|
@ -36,6 +36,7 @@ import com.raytheon.uf.common.dataplugin.radar.level3.DMDPacket;
|
|||
import com.raytheon.uf.common.dataplugin.radar.level3.DMDPacket.DMDAttributeIDs;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.GraphicBlock;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.Layer;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.SymbologyBlock;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.SymbologyPacket;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.TextSymbolPacket;
|
||||
import com.raytheon.uf.common.dataplugin.radar.level3.generic.AreaComponent;
|
||||
|
@ -55,6 +56,9 @@ import com.vividsolutions.jts.geom.Coordinate;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 11, 2010 mnash Initial creation
|
||||
* Dec 28, 2011 11705 gzhang Fix SCAN missing Rows error
|
||||
* Mar 19, 2013 1804 bsteffen Reduce useless data stored in radar hdf5
|
||||
* Mar 19, 2013 1804 bsteffen Remove empty data structures from radar
|
||||
* hdf5.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -83,9 +87,8 @@ public class RadarRecordUtil {
|
|||
.getTheText())) {
|
||||
Map<GraphicBlockValues, String> map = new HashMap<GraphicBlockValues, String>();
|
||||
Matcher m = RadarConstants.graphic_block_pattern
|
||||
.matcher(
|
||||
getNormalizedGBText( ((TextSymbolPacket) packets[j]).getTheText() )
|
||||
);
|
||||
.matcher(getNormalizedGBText(((TextSymbolPacket) packets[j])
|
||||
.getTheText()));
|
||||
if (m.find()) {
|
||||
String storm_id = m.group(1).trim();
|
||||
map.put(GraphicBlockValues.AZIMUTH, m
|
||||
|
@ -146,8 +149,7 @@ public class RadarRecordUtil {
|
|||
String property) {
|
||||
String rval = "";
|
||||
|
||||
for (RadarDataKey curLatLon : record.getSymbologyData()
|
||||
.keySet()) {
|
||||
for (RadarDataKey curLatLon : record.getSymbologyData().keySet()) {
|
||||
RadarDataPoint currPoint = record.getSymbologyData().get(curLatLon);
|
||||
|
||||
for (Integer type : currPoint.getDisplayGenericPointData().keySet()) {
|
||||
|
@ -167,8 +169,10 @@ public class RadarRecordUtil {
|
|||
/**
|
||||
* Get the GenericDataComponent.
|
||||
*
|
||||
* @param record The RadarRecord
|
||||
* @param featureId The featureId
|
||||
* @param record
|
||||
* The RadarRecord
|
||||
* @param featureId
|
||||
* The featureId
|
||||
*
|
||||
* @return The GenericDataComponent, or null if no matches
|
||||
*/
|
||||
|
@ -192,11 +196,13 @@ public class RadarRecordUtil {
|
|||
|
||||
public static List<String> getDMDFeatureIDs(RadarRecord record) {
|
||||
List<String> rval = new ArrayList<String>();
|
||||
|
||||
for (Layer layer : record.getSymbologyBlock().getLayers()) {
|
||||
SymbologyBlock sb = record.getSymbologyBlock();
|
||||
if (sb != null) {
|
||||
for (Layer layer : sb.getLayers()) {
|
||||
for (SymbologyPacket packet : layer.getPackets())
|
||||
rval.addAll(((DMDPacket) packet).getFeatureIDs());
|
||||
}
|
||||
}
|
||||
return rval;
|
||||
}
|
||||
|
||||
|
@ -204,8 +210,7 @@ public class RadarRecordUtil {
|
|||
String featureId) {
|
||||
Coordinate rval = null;
|
||||
AreaComponent currFeature = null;
|
||||
for (RadarDataKey curLatLon : record.getSymbologyData()
|
||||
.keySet()) {
|
||||
for (RadarDataKey curLatLon : record.getSymbologyData().keySet()) {
|
||||
RadarDataPoint currPoint = record.getSymbologyData().get(curLatLon);
|
||||
|
||||
for (Integer type : currPoint.getDisplayGenericPointData().keySet()) {
|
||||
|
@ -416,20 +421,46 @@ public class RadarRecordUtil {
|
|||
return record.srmSourceName != null;
|
||||
}
|
||||
|
||||
private static final DHRValues[] ADAP32_VALUES = {
|
||||
DHRValues.BEAMWIDTH, DHRValues.BLOCKAGETHRESHOLD, DHRValues.CLUTTERTHRESHOLD, DHRValues.WEIGHTTHRESHOLD,
|
||||
DHRValues.FULLHYBRIDSCANTHRESH, DHRValues.LOWREFLTHRESHOLD, DHRValues.RAINDETREFLTHRESHOLD, DHRValues.RAINDETAREATHRESHOLD,
|
||||
DHRValues.RAINDETTIMETHRESHOLD, DHRValues.ZRMULTCOEFF, DHRValues.ZRPOWERCOEFF, DHRValues.MINREFLTORATE,
|
||||
DHRValues.MAXREFLTORATE, DHRValues.NUMEXCLZONE, DHRValues.RANGECUTOFF, DHRValues.RANGEEFFCOEFF1,
|
||||
DHRValues.RANGEEFFCOEFF2, DHRValues.RANGEEFFCOEFF3, DHRValues.MINPRECIPRATEINCL, DHRValues.MAXPRECIPRATEALLOW,
|
||||
DHRValues.THRESHELAPSEDTIME, DHRValues.MAXTIMEFORINTERP, DHRValues.MINTIMEHOURLYPERIOD, DHRValues.THRESHOLDHROUTLIER,
|
||||
DHRValues.ENDTIMEGAGEACCUM, DHRValues.MAXPERIODACCUMVAL, DHRValues.MAXHOURLYACCUMVAL, DHRValues.TIMEBIASEST,
|
||||
DHRValues.THRESHNOGAGERADAR, DHRValues.RESETBIASVALUE, DHRValues.LONGESTALLOWLAG, DHRValues.BIASAPPLIEDFLAG
|
||||
};
|
||||
private static final DHRValues[] ADAP32_VALUES = { DHRValues.BEAMWIDTH,
|
||||
DHRValues.BLOCKAGETHRESHOLD, DHRValues.CLUTTERTHRESHOLD,
|
||||
DHRValues.WEIGHTTHRESHOLD, DHRValues.FULLHYBRIDSCANTHRESH,
|
||||
DHRValues.LOWREFLTHRESHOLD, DHRValues.RAINDETREFLTHRESHOLD,
|
||||
DHRValues.RAINDETAREATHRESHOLD, DHRValues.RAINDETTIMETHRESHOLD,
|
||||
DHRValues.ZRMULTCOEFF, DHRValues.ZRPOWERCOEFF,
|
||||
DHRValues.MINREFLTORATE, DHRValues.MAXREFLTORATE,
|
||||
DHRValues.NUMEXCLZONE, DHRValues.RANGECUTOFF,
|
||||
DHRValues.RANGEEFFCOEFF1, DHRValues.RANGEEFFCOEFF2,
|
||||
DHRValues.RANGEEFFCOEFF3, DHRValues.MINPRECIPRATEINCL,
|
||||
DHRValues.MAXPRECIPRATEALLOW, DHRValues.THRESHELAPSEDTIME,
|
||||
DHRValues.MAXTIMEFORINTERP, DHRValues.MINTIMEHOURLYPERIOD,
|
||||
DHRValues.THRESHOLDHROUTLIER, DHRValues.ENDTIMEGAGEACCUM,
|
||||
DHRValues.MAXPERIODACCUMVAL, DHRValues.MAXHOURLYACCUMVAL,
|
||||
DHRValues.TIMEBIASEST, DHRValues.THRESHNOGAGERADAR,
|
||||
DHRValues.RESETBIASVALUE, DHRValues.LONGESTALLOWLAG,
|
||||
DHRValues.BIASAPPLIEDFLAG };
|
||||
|
||||
public static Map<DHRValues, Double> getDHRValues(RadarRecord record) {
|
||||
Map<DHRValues, Double> map = new HashMap<DHRValues, Double>();
|
||||
String text = record.getAlphanumericValues();
|
||||
String text = null;
|
||||
SymbologyBlock sb = record.getSymbologyBlock();
|
||||
if (sb != null) {
|
||||
// According to the ICD the alphanumeric data for DHR can be found
|
||||
// in the second layer of the symbology block in a TextSymbolPacketn
|
||||
// with code 1.
|
||||
for (Layer layer : sb.getLayers()) {
|
||||
for (SymbologyPacket packet : layer.getPackets()) {
|
||||
if (packet instanceof TextSymbolPacket) {
|
||||
TextSymbolPacket tsp = (TextSymbolPacket) packet;
|
||||
if (tsp.getTheText().contains("PSM")) {
|
||||
text = tsp.getTheText();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (text == null) {
|
||||
return map;
|
||||
}
|
||||
int vi = 0;
|
||||
int nv = text.length() / 8;
|
||||
int precipCat = 0;
|
||||
|
@ -439,7 +470,7 @@ public class RadarRecordUtil {
|
|||
|
||||
String[] v = new String[nv];
|
||||
for (vi = 0; vi < nv; ++vi)
|
||||
v[vi] = text.substring(vi * 8, (vi+1) * 8);
|
||||
v[vi] = text.substring(vi * 8, (vi + 1) * 8);
|
||||
|
||||
vi = 0;
|
||||
while (vi < nv) {
|
||||
|
@ -455,9 +486,11 @@ public class RadarRecordUtil {
|
|||
while (vi < nv) {
|
||||
s = v[vi++];
|
||||
if (s.equals("SUPL(15)")) {
|
||||
/* // average scan date/time are never used...
|
||||
map.put(DHRValues.AVGSCANDATE, parseDHRValue(text, vi + 0));
|
||||
map.put(DHRValues.AVGSCANTIME, parseDHRValue(text, vi + 1));
|
||||
/*
|
||||
* // average scan date/time are never used...
|
||||
* map.put(DHRValues.AVGSCANDATE, parseDHRValue(text, vi
|
||||
* + 0)); map.put(DHRValues.AVGSCANTIME,
|
||||
* parseDHRValue(text, vi + 1));
|
||||
*/
|
||||
flagZeroHybrid = (int) parseDHRValue(v[vi + 2]);
|
||||
if (flagZeroHybrid != 0 && flagZeroHybrid != 1)
|
||||
|
@ -469,7 +502,8 @@ public class RadarRecordUtil {
|
|||
}
|
||||
}
|
||||
} else if (s.equals("ADAP(38)")) {
|
||||
// Don't have documentation for older formats, so copying logic from A1 decodeDHR.C.
|
||||
// Don't have documentation for older formats, so copying logic
|
||||
// from A1 decodeDHR.C.
|
||||
map.put(DHRValues.ZRMULTCOEFF, parseDHRValue(v[vi + 9]));
|
||||
map.put(DHRValues.ZRPOWERCOEFF, parseDHRValue(v[vi + 10]));
|
||||
map.put(DHRValues.MAXPRECIPRATEALLOW, parseDHRValue(v[vi + 25]));
|
||||
|
@ -501,7 +535,7 @@ public class RadarRecordUtil {
|
|||
}
|
||||
if (flagZeroHybrid != null)
|
||||
map.put(DHRValues.FLAGZEROHYBRID, (double) flagZeroHybrid);
|
||||
if (! biasApplied) {
|
||||
if (!biasApplied) {
|
||||
biasCalculated = 1.0;
|
||||
}
|
||||
map.put(DHRValues.BIAS, biasCalculated);
|
||||
|
@ -529,7 +563,7 @@ public class RadarRecordUtil {
|
|||
return Double.parseDouble(s);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* DR#11705: SCAN missing row(s) comparing to radar Comb Att Table.
|
||||
*
|
||||
* Error cause: RadarConstants.GRAPHIC_BLOCK as a Regular Expression
|
||||
|
@ -542,27 +576,28 @@ public class RadarRecordUtil {
|
|||
* @param : Graphic Block Text that may contain ">" and/or "<".
|
||||
* @return: String with ">" and/or "<" replaced by space.
|
||||
*/
|
||||
private static String getNormalizedGBText(String text){
|
||||
private static String getNormalizedGBText(String text) {
|
||||
|
||||
if(text == null || text.isEmpty() || ( (! text.contains(">")) && (! text.contains("<")) ) )
|
||||
if (text == null || text.isEmpty()
|
||||
|| ((!text.contains(">")) && (!text.contains("<"))))
|
||||
return text;
|
||||
|
||||
/*
|
||||
* contains only ">"
|
||||
*/
|
||||
if( ! text.contains("<") )
|
||||
if (!text.contains("<"))
|
||||
return text.replaceAll(">", " ");
|
||||
|
||||
/*
|
||||
* contains only "<"
|
||||
*/
|
||||
if( ! text.contains(">") )
|
||||
if (!text.contains(">"))
|
||||
return text.replaceAll("<", " ");
|
||||
|
||||
/*
|
||||
* contains both "<" and ">"
|
||||
*/
|
||||
return text.replaceAll(">"," ").replaceAll("<", " ");
|
||||
return text.replaceAll(">", " ").replaceAll("<", " ");
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 01/25/13 1447 dgilling Initial Creation.
|
||||
# 03/19/13 1447 dgilling Merge A1 DR 21434.
|
||||
#
|
||||
#
|
||||
|
||||
|
@ -174,6 +175,32 @@ class MergeVTEC(VTECTableUtil.VTECTableUtil):
|
|||
currentYear = time.gmtime(self._time)[0]
|
||||
terminations = ('CAN', 'EXP', 'UPG')
|
||||
|
||||
# Remove all records from the received table for events that
|
||||
# have been cancelled and compacted in our active table
|
||||
for rec in activeTable:
|
||||
if rec['act'] not in terminations:
|
||||
continue
|
||||
|
||||
recYear = time.gmtime(rec['issueTime'])[0]
|
||||
|
||||
# check if there are other related records
|
||||
single = True
|
||||
for rec2 in activeTable:
|
||||
if self.hazardCompare(rec2, rec, compare2):
|
||||
rec2Year = time.gmtime(rec2['issueTime'])[0]
|
||||
if recYear == rec2Year and rec != rec2:
|
||||
single = False
|
||||
break
|
||||
|
||||
if single:
|
||||
# remove all records for this event from the received table
|
||||
for othRec in otherTable[::-1]:
|
||||
if self.hazardCompare(rec, othRec, compare2):
|
||||
othRecYear = time.gmtime(othRec['issueTime'])[0]
|
||||
if othRecYear == recYear:
|
||||
otherTable.remove(othRec)
|
||||
|
||||
|
||||
# we process each entry in the other (received) table
|
||||
for othRec in otherTable:
|
||||
# filter out all other sites we aren't interested in
|
||||
|
@ -187,20 +214,6 @@ class MergeVTEC(VTECTableUtil.VTECTableUtil):
|
|||
|
||||
othRecYear = time.gmtime(othRec['issueTime'])[0]
|
||||
|
||||
# check our active table for this event. if there is only one record
|
||||
# and it is a canceled event, then we keep it that way.
|
||||
|
||||
matches = []
|
||||
for rec in activeTable:
|
||||
if self.hazardCompare(rec, othRec, compare2):
|
||||
atRecYear = time.gmtime(rec['issueTime'])[0]
|
||||
if othRecYear == atRecYear:
|
||||
matches.append(rec)
|
||||
|
||||
if len(matches) == 1 and matches[0]['act'] in terminations:
|
||||
# done with this remote record
|
||||
continue
|
||||
|
||||
# if the remote table has a single canceled record,
|
||||
# copy the record if needed and remove the rest for the event
|
||||
|
||||
|
@ -245,9 +258,6 @@ class MergeVTEC(VTECTableUtil.VTECTableUtil):
|
|||
|
||||
if not found:
|
||||
# add the remote record
|
||||
if len(matches) > 0:
|
||||
newRplaceEntriesAct.append(othRec)
|
||||
else:
|
||||
missingEntriesAct.append(othRec)
|
||||
activeTable.append(othRec)
|
||||
changed = True
|
||||
|
@ -257,12 +267,8 @@ class MergeVTEC(VTECTableUtil.VTECTableUtil):
|
|||
if chgRec not in changes:
|
||||
changes.append(chgRec)
|
||||
|
||||
# done with this remote record
|
||||
continue
|
||||
|
||||
|
||||
# currently active events
|
||||
if othRec['endTime'] >= self._time:
|
||||
elif othRec['endTime'] >= self._time:
|
||||
|
||||
# find a match in otherTable that is in our active table
|
||||
# and replace it if newer, but only if it is from the same
|
||||
|
@ -289,8 +295,8 @@ class MergeVTEC(VTECTableUtil.VTECTableUtil):
|
|||
# if a match wasn't found, then we may need to add the record
|
||||
# into our active table
|
||||
if found == 0:
|
||||
activeTable.append(othRec) #add the record
|
||||
missingEntriesAct.append(othRec)
|
||||
activeTable.append(othRec) #add the record
|
||||
chgRec = (othRec['officeid'], othRec['pil'], othRec['phensig'])
|
||||
if chgRec not in changes:
|
||||
changes.append(chgRec)
|
||||
|
@ -300,7 +306,7 @@ class MergeVTEC(VTECTableUtil.VTECTableUtil):
|
|||
|
||||
othRecYear = time.gmtime(othRec['issueTime'])[0]
|
||||
if currentYear != othRecYear:
|
||||
continue #only care about this years
|
||||
continue #only care about this year
|
||||
|
||||
# find the highest ETN for the current year per phen/sig
|
||||
# in active table and compare to the other table. If found
|
||||
|
@ -325,8 +331,8 @@ class MergeVTEC(VTECTableUtil.VTECTableUtil):
|
|||
|
||||
#if phen/sig not found, then add it
|
||||
if maxETN is None:
|
||||
activeTable.append(othRec) #add the record
|
||||
missingEntriesPast.append(othRec)
|
||||
activeTable.append(othRec) #add the record
|
||||
chgRec = (othRec['officeid'], othRec['pil'], othRec['phensig'])
|
||||
if chgRec not in changes:
|
||||
changes.append(chgRec)
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="org.apache.tools.bzip2"
|
||||
id="org.itadaki.bzip2"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
|
|
@ -71,6 +71,7 @@ import com.raytheon.uf.edex.plugin.grid.dao.GridDao;
|
|||
* Dec 3, 2010 rjpeter Initial creation
|
||||
* Feb 15, 2013 1638 mschenke Moved DataURINotificationMessage to uf.common.dataplugin
|
||||
* Mar 07, 2013 1587 bsteffen rewrite static data generation.
|
||||
* Mar 14, 2013 1587 bsteffen Fix persisting to datastore.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -268,7 +269,7 @@ public class StaticDataGenerator {
|
|||
for (GridRecord staticRecord : datastoreRecords) {
|
||||
populateMessageData(staticRecord);
|
||||
}
|
||||
dao.persistToHDF5(databaseRecords.toArray(new PluginDataObject[0]));
|
||||
dao.persistToHDF5(datastoreRecords.toArray(new PluginDataObject[0]));
|
||||
}
|
||||
if (!databaseRecords.isEmpty()) {
|
||||
dao.persistToDatabase(databaseRecords
|
||||
|
@ -424,7 +425,8 @@ public class StaticDataGenerator {
|
|||
datasets = Collections.emptyList();
|
||||
}
|
||||
}
|
||||
if (datasets.contains(missing)) {
|
||||
if (!datasets.contains(staticRecord.getParameter()
|
||||
.getAbbreviation())) {
|
||||
missing.add(staticRecord);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
<bean id="ffmpThreadPool"
|
||||
class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
|
||||
<property name="corePoolSize" value="2" />
|
||||
<property name="maxPoolSize" value="4" />
|
||||
<property name="corePoolSize" value="1" />
|
||||
<property name="maxPoolSize" value="1" />
|
||||
<property name="keepAliveSeconds" value="60000" />
|
||||
</bean>
|
||||
|
||||
|
|
|
@ -120,6 +120,7 @@ import com.raytheon.uf.edex.plugin.ffmp.common.FFTIRatioDiff;
|
|||
* 02/20/13 1635 D. Hladky Added some finally methods to increase dead lock safety. Reduced wait times for threads.
|
||||
* Feb 15, 2013 1638 mschenke Moved DataURINotificationMessage to uf.common.dataplugin
|
||||
* 02/25/13 1660 D. Hladky Redesigned data flow for FFTI in order to have only one mosaic piece in memory at a time.
|
||||
* 03/13/13 1478 D. Hladky non-FFTI mosaic containers weren't getting ejected. Made it so that they are ejected after processing as well.
|
||||
* </pre>
|
||||
*
|
||||
* @author dhladky
|
||||
|
@ -732,10 +733,21 @@ public class FFMPGenerator extends CompositeProductGenerator implements
|
|||
}
|
||||
}
|
||||
}
|
||||
} // record not null
|
||||
} // end sitekey for loop
|
||||
} // end datakey loop
|
||||
} // end process
|
||||
|
||||
SourceXML source = getSourceConfig().getSource(
|
||||
ffmpRec.getSourceName());
|
||||
|
||||
if (!source.getSourceType().equals(
|
||||
SOURCE_TYPE.GUIDANCE.getSourceType())) {
|
||||
String sourceSiteDataKey = getSourceSiteDataKey(source,
|
||||
dataKey, ffmpRec);
|
||||
ffmpData.remove(sourceSiteDataKey);
|
||||
statusHandler.info("Removing from memory: "+sourceSiteDataKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1817,6 +1829,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements
|
|||
}
|
||||
|
||||
ffmpData.remove(siteDataKey);
|
||||
statusHandler.info("Removing from memory: "+siteDataKey);
|
||||
accumulator.setReset(false);
|
||||
writeFFTIData(siteDataKey, accumulator);
|
||||
}
|
||||
|
@ -1967,6 +1980,7 @@ public class FFMPGenerator extends CompositeProductGenerator implements
|
|||
|
||||
// replace or insert it
|
||||
ffmpData.remove(qpeSiteSourceDataKey);
|
||||
statusHandler.info("Removing from memory: "+qpeSiteSourceDataKey);
|
||||
values.setReset(false);
|
||||
writeFFTIData(siteDataKey, values);
|
||||
}
|
||||
|
@ -2003,4 +2017,33 @@ public class FFMPGenerator extends CompositeProductGenerator implements
|
|||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Find siteSourceDataKey
|
||||
*
|
||||
* @param source
|
||||
* @param dataKey
|
||||
* @param ffmpRec
|
||||
* @return
|
||||
*/
|
||||
private String getSourceSiteDataKey(SourceXML source, String dataKey, FFMPRecord ffmpRec) {
|
||||
|
||||
String sourceName = source.getSourceName();
|
||||
String sourceSiteDataKey = null;
|
||||
|
||||
if (source.getSourceType().equals(
|
||||
SOURCE_TYPE.GUIDANCE.getSourceType())) {
|
||||
sourceName = source.getDisplayName();
|
||||
sourceSiteDataKey = sourceName;
|
||||
|
||||
} else {
|
||||
sourceName = ffmpRec.getSourceName();
|
||||
sourceSiteDataKey = sourceName + "-" + ffmpRec.getSiteKey()
|
||||
+ "-" + dataKey;
|
||||
}
|
||||
|
||||
return sourceSiteDataKey;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ import com.raytheon.uf.edex.database.plugin.PluginDao;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* 4/7/09 1994 bphillip Initial Creation
|
||||
* Mar 14, 2013 1587 bsteffen Fix static data persisting to datastore.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -99,10 +100,13 @@ public class GridDao extends PluginDao {
|
|||
long[] sizes = new long[] { location.getNx(), location.getNy() };
|
||||
String abbrev = gridRec.getParameter().getAbbreviation();
|
||||
String group = gridRec.getDataURI();
|
||||
String datasetName = "Data";
|
||||
if (GridPathProvider.STATIC_PARAMETERS.contains(abbrev)) {
|
||||
group = "/" + location.getId();
|
||||
datasetName = abbrev;
|
||||
}
|
||||
AbstractStorageRecord storageRecord = new FloatDataRecord("Data",
|
||||
AbstractStorageRecord storageRecord = new FloatDataRecord(
|
||||
datasetName,
|
||||
group, (float[]) messageData, 2, sizes);
|
||||
|
||||
storageRecord.setCorrelationObject(gridRec);
|
||||
|
|
|
@ -71,9 +71,6 @@ public class DefaultVizRadarRecord extends VizRadarRecord {
|
|||
if (object.getRawShortData() != null) {
|
||||
size += object.getRawData().length * 2;
|
||||
}
|
||||
if (object.getAlphanumericValues() != null) {
|
||||
size += object.getAlphanumericValues().length() * 2;
|
||||
}
|
||||
if (object.getAngleData() != null) {
|
||||
size += object.getAngleData().length * 4;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue