Merge branch 'master_14.1.3' into master_14.2.2 CM-MERGE:14.1.3-1 into 14.2.2
Conflicts: edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/config/gfe/serverConfig.py Former-commit-id:f72380ad60
[formerlyf72380ad60
[formerly 797aa6bfbf2802aa7355b7a4a77d0fb4f54dfd6a]] Former-commit-id:9ab17ddecb
Former-commit-id:49cd9574d9
This commit is contained in:
commit
a4b39dfca5
8 changed files with 186 additions and 133 deletions
|
@ -27,7 +27,6 @@ import java.io.FileWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -35,14 +34,14 @@ import java.util.Map;
|
||||||
import java.util.concurrent.BlockingQueue;
|
import java.util.concurrent.BlockingQueue;
|
||||||
import java.util.concurrent.LinkedBlockingQueue;
|
import java.util.concurrent.LinkedBlockingQueue;
|
||||||
|
|
||||||
|
import javax.xml.bind.JAXB;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.ListenerList;
|
import org.eclipse.core.runtime.ListenerList;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.core.runtime.jobs.Job;
|
import org.eclipse.core.runtime.jobs.Job;
|
||||||
import org.eclipse.jface.preference.IPersistentPreferenceStore;
|
import org.eclipse.jface.preference.IPersistentPreferenceStore;
|
||||||
import org.eclipse.jface.util.IPropertyChangeListener;
|
|
||||||
import org.eclipse.jface.util.PropertyChangeEvent;
|
|
||||||
|
|
||||||
import com.raytheon.uf.common.localization.FileUpdatedMessage;
|
import com.raytheon.uf.common.localization.FileUpdatedMessage;
|
||||||
import com.raytheon.uf.common.localization.ILocalizationFileObserver;
|
import com.raytheon.uf.common.localization.ILocalizationFileObserver;
|
||||||
|
@ -51,6 +50,8 @@ import com.raytheon.uf.common.localization.LocalizationContext;
|
||||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
|
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel;
|
||||||
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
|
||||||
import com.raytheon.uf.common.localization.LocalizationFile;
|
import com.raytheon.uf.common.localization.LocalizationFile;
|
||||||
|
import com.raytheon.uf.common.localization.LocalizationFileInputStream;
|
||||||
|
import com.raytheon.uf.common.localization.LocalizationFileOutputStream;
|
||||||
import com.raytheon.uf.common.localization.PathManagerFactory;
|
import com.raytheon.uf.common.localization.PathManagerFactory;
|
||||||
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
import com.raytheon.uf.common.localization.exception.LocalizationException;
|
||||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||||
|
@ -60,7 +61,6 @@ import com.raytheon.uf.common.time.SimulatedTime;
|
||||||
import com.raytheon.uf.viz.core.catalog.DirectDbQuery;
|
import com.raytheon.uf.viz.core.catalog.DirectDbQuery;
|
||||||
import com.raytheon.uf.viz.core.catalog.DirectDbQuery.QueryLanguage;
|
import com.raytheon.uf.viz.core.catalog.DirectDbQuery.QueryLanguage;
|
||||||
import com.raytheon.uf.viz.core.exception.VizException;
|
import com.raytheon.uf.viz.core.exception.VizException;
|
||||||
import com.raytheon.uf.viz.core.localization.HierarchicalPreferenceStore;
|
|
||||||
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
||||||
import com.raytheon.uf.viz.points.PointsDataManager;
|
import com.raytheon.uf.viz.points.PointsDataManager;
|
||||||
import com.raytheon.viz.awipstools.common.RangeRing;
|
import com.raytheon.viz.awipstools.common.RangeRing;
|
||||||
|
@ -86,14 +86,14 @@ import com.vividsolutions.jts.geom.LineString;
|
||||||
* 07-11-12 #875 rferrel Move points to PointsDataManager.
|
* 07-11-12 #875 rferrel Move points to PointsDataManager.
|
||||||
* 01-29-14 DR 16351 D. Friedman Fix updates to storm track from preferences.
|
* 01-29-14 DR 16351 D. Friedman Fix updates to storm track from preferences.
|
||||||
* 04-02-14 DR 16351 D. Friedman Fix updates to storm track from preferences. (backport from 14.2.2)
|
* 04-02-14 DR 16351 D. Friedman Fix updates to storm track from preferences. (backport from 14.2.2)
|
||||||
|
* 06-03-24 3191 njensen Improved saving/loading storm track data
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author bsteffen
|
* @author bsteffen
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
public class ToolsDataManager implements ILocalizationFileObserver,
|
public class ToolsDataManager implements ILocalizationFileObserver {
|
||||||
IPropertyChangeListener {
|
|
||||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||||
.getHandler(ToolsDataManager.class);
|
.getHandler(ToolsDataManager.class);
|
||||||
|
|
||||||
|
@ -103,13 +103,9 @@ public class ToolsDataManager implements ILocalizationFileObserver,
|
||||||
|
|
||||||
private static final String P_RANGERING_LOCATIONS = "rangeRingLocations";
|
private static final String P_RANGERING_LOCATIONS = "rangeRingLocations";
|
||||||
|
|
||||||
private static final String P_STORMTRACK_SPEED = "stormSpeed";
|
private static final String TOOLS_DIR = "awipsTools";
|
||||||
|
|
||||||
private static final String P_STORMTRACK_ANGLE = "stormAngle";
|
private static final String STORM_TRACK_FILE = "stormTrackData.xml";
|
||||||
|
|
||||||
private static final String P_STORMTRACK_POINTS = "stormCoordinates";
|
|
||||||
|
|
||||||
private static final String P_STORMTRACK_DATE = "stormDate";
|
|
||||||
|
|
||||||
private static final int[] DEFAULT_LINE_RADIUS = { 120, 120, 120, 120, 240,
|
private static final int[] DEFAULT_LINE_RADIUS = { 120, 120, 120, 120, 240,
|
||||||
240, 216, 216, 360, 360 };
|
240, 216, 216, 360, 360 };
|
||||||
|
@ -140,8 +136,6 @@ public class ToolsDataManager implements ILocalizationFileObserver,
|
||||||
|
|
||||||
private boolean stormTrackDirty = false;
|
private boolean stormTrackDirty = false;
|
||||||
|
|
||||||
private String site;
|
|
||||||
|
|
||||||
private LocalizationFile userToolsDir;
|
private LocalizationFile userToolsDir;
|
||||||
|
|
||||||
private IPathManager pathMgr;
|
private IPathManager pathMgr;
|
||||||
|
@ -156,19 +150,19 @@ public class ToolsDataManager implements ILocalizationFileObserver,
|
||||||
}
|
}
|
||||||
|
|
||||||
private ToolsDataManager() {
|
private ToolsDataManager() {
|
||||||
site = LocalizationManager.getInstance().getCurrentSite();
|
|
||||||
|
|
||||||
pathMgr = PathManagerFactory.getPathManager();
|
pathMgr = PathManagerFactory.getPathManager();
|
||||||
pointsManager = PointsDataManager.getInstance();
|
pointsManager = PointsDataManager.getInstance();
|
||||||
LocalizationContext userCtx = pathMgr.getContext(
|
LocalizationContext userCtx = pathMgr.getContext(
|
||||||
LocalizationType.CAVE_STATIC, LocalizationLevel.USER);
|
LocalizationType.CAVE_STATIC, LocalizationLevel.USER);
|
||||||
|
/*
|
||||||
userToolsDir = pathMgr.getLocalizationFile(userCtx, "awipsTools"
|
* TODO: Since it's already under the user localization, why does it
|
||||||
+ File.separator + site);
|
* then want to have the site underneath that? If anyone knows, please
|
||||||
|
* document it and remove this TODO. PointsManager does a similar thing.
|
||||||
|
*/
|
||||||
|
userToolsDir = pathMgr.getLocalizationFile(userCtx, TOOLS_DIR
|
||||||
|
+ IPathManager.SEPARATOR
|
||||||
|
+ LocalizationManager.getInstance().getCurrentSite());
|
||||||
userToolsDir.addFileUpdatedObserver(this);
|
userToolsDir.addFileUpdatedObserver(this);
|
||||||
|
|
||||||
CorePlugin.getDefault().getPreferenceStore()
|
|
||||||
.addPropertyChangeListener(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Collection<String> getBaselineNames() {
|
public Collection<String> getBaselineNames() {
|
||||||
|
@ -253,67 +247,73 @@ public class ToolsDataManager implements ILocalizationFileObserver,
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadStormData() {
|
private void loadStormData() {
|
||||||
stormData = new StormTrackData();
|
IPathManager pathMgr = PathManagerFactory.getPathManager();
|
||||||
HierarchicalPreferenceStore store = (HierarchicalPreferenceStore) CorePlugin
|
LocalizationFile f = pathMgr.getLocalizationFile(
|
||||||
.getDefault().getPreferenceStore();
|
userToolsDir.getContext(), userToolsDir.getName()
|
||||||
store.setDefault(P_STORMTRACK_SPEED, 35.0);
|
+ IPathManager.SEPARATOR + STORM_TRACK_FILE);
|
||||||
double speed = store.getDouble(P_STORMTRACK_SPEED);
|
if (f.exists()) {
|
||||||
stormData.setMotionSpeed(speed);
|
LocalizationFileInputStream is = null;
|
||||||
|
try {
|
||||||
store.setDefault(P_STORMTRACK_ANGLE, 60.0);
|
is = f.openInputStream();
|
||||||
double angle = store.getDouble(P_STORMTRACK_ANGLE);
|
stormData = JAXB.unmarshal(is, StormTrackData.class);
|
||||||
stormData.setMotionDirection(angle);
|
} catch (Exception e) {
|
||||||
|
statusHandler.error("Error loading storm track data", e);
|
||||||
long date = store.getLong(P_STORMTRACK_DATE);
|
stormData = defaultStormTrackData();
|
||||||
if (date > 0) {
|
} finally {
|
||||||
stormData.setDate(new Date(date));
|
if (is != null) {
|
||||||
}
|
try {
|
||||||
String[] points = store.getStringArray(P_STORMTRACK_POINTS);
|
is.close();
|
||||||
if (points != null) {
|
} catch (IOException e) {
|
||||||
setCoordinates(stormData, points);
|
statusHandler.handle(Priority.DEBUG,
|
||||||
|
"Error closing storm track data input stream",
|
||||||
|
e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
stormData = defaultStormTrackData();
|
||||||
}
|
}
|
||||||
|
|
||||||
stormTrackDirty = false;
|
stormTrackDirty = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setCoordinates(StormTrackData data, String[] points) {
|
/**
|
||||||
Coordinate[] coords = new Coordinate[points.length];
|
* Creates and returns a default storm track data
|
||||||
for (int i = 0; i < points.length; ++i) {
|
*
|
||||||
String[] latLon = points[i].split("[ ]");
|
* @return
|
||||||
try {
|
*/
|
||||||
coords[i] = new Coordinate(Double.parseDouble(latLon[0]),
|
private static StormTrackData defaultStormTrackData() {
|
||||||
Double.parseDouble(latLon[1]));
|
StormTrackData data = new StormTrackData();
|
||||||
} catch (NumberFormatException e) {
|
data.setMotionSpeed(35.0);
|
||||||
statusHandler.handle(Priority.PROBLEM,
|
data.setMotionDirection(60.0);
|
||||||
"Error reading storm track coordinates", e);
|
data.setDate(SimulatedTime.getSystemTime().getTime());
|
||||||
coords = new Coordinate[0];
|
return data;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
data.setCoordinates(coords);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void storeStormData() {
|
private void storeStormData() {
|
||||||
synchronized (stormLock) {
|
synchronized (stormLock) {
|
||||||
// Update the store time
|
// Update the store time
|
||||||
stormData.setDate(SimulatedTime.getSystemTime().getTime());
|
stormData.setDate(SimulatedTime.getSystemTime().getTime());
|
||||||
HierarchicalPreferenceStore store = (HierarchicalPreferenceStore) CorePlugin
|
IPathManager pathMgr = PathManagerFactory.getPathManager();
|
||||||
.getDefault().getPreferenceStore();
|
LocalizationFile f = pathMgr.getLocalizationFile(
|
||||||
store.setValue(P_STORMTRACK_SPEED, stormData.getMotionSpeed());
|
userToolsDir.getContext(), userToolsDir.getName()
|
||||||
store.setValue(P_STORMTRACK_ANGLE, stormData.getMotionDirection());
|
+ IPathManager.SEPARATOR + STORM_TRACK_FILE);
|
||||||
Coordinate[] coordinates = stormData.getCoordinates();
|
LocalizationFileOutputStream os = null;
|
||||||
if (coordinates != null) {
|
|
||||||
String[] coords = new String[coordinates.length];
|
|
||||||
for (int i = 0; i < coordinates.length; ++i) {
|
|
||||||
coords[i] = coordinates[i].x + " " + coordinates[i].y;
|
|
||||||
}
|
|
||||||
store.setValue(P_STORMTRACK_POINTS, coords);
|
|
||||||
}
|
|
||||||
store.setValue(P_STORMTRACK_DATE, stormData.getDate().getTime());
|
|
||||||
try {
|
try {
|
||||||
store.save();
|
os = f.openOutputStream();
|
||||||
} catch (IOException e) {
|
JAXB.marshal(stormData, os);
|
||||||
|
os.closeAndSave();
|
||||||
|
} catch (Exception e) {
|
||||||
statusHandler.handle(Priority.PROBLEM,
|
statusHandler.handle(Priority.PROBLEM,
|
||||||
"Error saving storm track data", e);
|
"Error saving storm track data", e);
|
||||||
|
try {
|
||||||
|
if (os != null) {
|
||||||
|
os.close();
|
||||||
|
}
|
||||||
|
} catch (IOException e1) {
|
||||||
|
statusHandler.handle(Priority.DEBUG,
|
||||||
|
"Error closing storm track data output stream", e1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -594,11 +594,18 @@ public class ToolsDataManager implements ILocalizationFileObserver,
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void fileUpdated(FileUpdatedMessage message) {
|
public void fileUpdated(FileUpdatedMessage message) {
|
||||||
|
/*
|
||||||
|
* This will receive messages about points updates too, but since the
|
||||||
|
* PointsManager is listening for those we don't care.
|
||||||
|
*/
|
||||||
String fileName = new File(message.getFileName()).getName();
|
String fileName = new File(message.getFileName()).getName();
|
||||||
if (fileName.startsWith(BASELINE_PREFIX)) {
|
if (fileName.startsWith(BASELINE_PREFIX)) {
|
||||||
baselineFileUpdated(fileName);
|
baselineFileUpdated(fileName);
|
||||||
} else {
|
} else if (fileName.equals(STORM_TRACK_FILE)) {
|
||||||
pointsManager.fileUpdated(message);
|
stormTrackDirty = true;
|
||||||
|
for (Object listener : stormListeners.getListeners()) {
|
||||||
|
((IToolChangedListener) listener).toolChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -643,44 +650,4 @@ public class ToolsDataManager implements ILocalizationFileObserver,
|
||||||
stormListeners.remove(listener);
|
stormListeners.remove(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse
|
|
||||||
* .jface.util.PropertyChangeEvent)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void propertyChange(PropertyChangeEvent event) {
|
|
||||||
String key = event.getProperty();
|
|
||||||
if ((P_STORMTRACK_ANGLE.equals(key) || P_STORMTRACK_DATE.equals(key)
|
|
||||||
|| P_STORMTRACK_POINTS.equals(key) || P_STORMTRACK_SPEED
|
|
||||||
.equals(key)) && stormData != null) {
|
|
||||||
synchronized (stormLock) {
|
|
||||||
Object value = event.getNewValue();
|
|
||||||
if (P_STORMTRACK_ANGLE.equals(key) && value instanceof Double) {
|
|
||||||
stormData.setMotionDirection((Double) value);
|
|
||||||
} else if (P_STORMTRACK_DATE.equals(key)
|
|
||||||
&& value instanceof Long) {
|
|
||||||
stormData.setDate(new Date((Long) value));
|
|
||||||
} else if (P_STORMTRACK_POINTS.equals(key)
|
|
||||||
&& value instanceof String[]) {
|
|
||||||
setCoordinates(stormData, (String[]) value);
|
|
||||||
} else if (P_STORMTRACK_SPEED.equals(key)
|
|
||||||
&& value instanceof Double) {
|
|
||||||
stormData.setMotionSpeed((Double) value);
|
|
||||||
} else {
|
|
||||||
/* Incompatible value indicates update from preference
|
|
||||||
* store. We will want to reload.
|
|
||||||
*/
|
|
||||||
stormTrackDirty = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// fire listeners
|
|
||||||
for (Object listener : stormListeners.getListeners()) {
|
|
||||||
((IToolChangedListener) listener).toolChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,10 +21,18 @@ package com.raytheon.viz.awipstools.common;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
import javax.xml.bind.annotation.adapters.XmlAdapter;
|
||||||
|
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||||
|
|
||||||
|
import com.raytheon.uf.common.serialization.adapters.CoordAdapter;
|
||||||
import com.vividsolutions.jts.geom.Coordinate;
|
import com.vividsolutions.jts.geom.Coordinate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO Add Description
|
* Data representing a storm track that can be saved to XML
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
*
|
*
|
||||||
|
@ -32,20 +40,29 @@ import com.vividsolutions.jts.geom.Coordinate;
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Aug 12, 2009 bwoodle Initial creation
|
* Aug 12, 2009 bwoodle Initial creation
|
||||||
|
* Jun 03, 2014 3191 njensen Added xml annotations
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author bwoodle
|
* @author bwoodle
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
*/
|
*/
|
||||||
|
@XmlAccessorType(XmlAccessType.NONE)
|
||||||
|
@XmlRootElement
|
||||||
public class StormTrackData {
|
public class StormTrackData {
|
||||||
|
|
||||||
|
@XmlJavaTypeAdapter(DateAdapter.class)
|
||||||
|
@XmlElement(name = "stormDate")
|
||||||
private Date date;
|
private Date date;
|
||||||
|
|
||||||
|
@XmlElement(name = "stormAngle")
|
||||||
private double motionDirection;
|
private double motionDirection;
|
||||||
|
|
||||||
|
@XmlElement(name = "stormSpeed")
|
||||||
private double motionSpeed;
|
private double motionSpeed;
|
||||||
|
|
||||||
|
@XmlJavaTypeAdapter(CoordAdapter.class)
|
||||||
|
@XmlElement(name = "stormCoordinates")
|
||||||
private Coordinate[] coordinates;
|
private Coordinate[] coordinates;
|
||||||
|
|
||||||
public StormTrackData() {
|
public StormTrackData() {
|
||||||
|
@ -123,4 +140,19 @@ public class StormTrackData {
|
||||||
return date != null && !Double.isNaN(motionDirection)
|
return date != null && !Double.isNaN(motionDirection)
|
||||||
&& !Double.isNaN(motionSpeed);
|
&& !Double.isNaN(motionSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static class DateAdapter extends XmlAdapter<Long, Date> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Date unmarshal(Long v) throws Exception {
|
||||||
|
return new Date(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long marshal(Date v) throws Exception {
|
||||||
|
return v.getTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,6 +101,7 @@ import com.vividsolutions.jts.geom.LineString;
|
||||||
* 01-28-2014 DR16465 mgamazaychikov Fixed the problem with anchor point when frame
|
* 01-28-2014 DR16465 mgamazaychikov Fixed the problem with anchor point when frame
|
||||||
* count changes; made line width configurable.
|
* count changes; made line width configurable.
|
||||||
* 04-07-2014 DR 17232 D. Friedman Make sure pivot indexes are valid.
|
* 04-07-2014 DR 17232 D. Friedman Make sure pivot indexes are valid.
|
||||||
|
* 06-03-14 3191 njensen Fix postData to not retrieve
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -1406,7 +1407,7 @@ public class StormTrackDisplay implements IRenderable {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void postData(StormTrackState state) {
|
private void postData(StormTrackState state) {
|
||||||
StormTrackData data = dataManager.getStormTrackData();
|
StormTrackData data = new StormTrackData();
|
||||||
Coordinate[] coords = new Coordinate[state.timePoints.length];
|
Coordinate[] coords = new Coordinate[state.timePoints.length];
|
||||||
for (int i = 0; i < coords.length; ++i) {
|
for (int i = 0; i < coords.length; ++i) {
|
||||||
coords[i] = new Coordinate(state.timePoints[i].coord);
|
coords[i] = new Coordinate(state.timePoints[i].coord);
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
<alias base="GeH">geh</alias>
|
<alias base="GeH">geh</alias>
|
||||||
<alias base="GH">gh</alias>
|
<alias base="GH">gh</alias>
|
||||||
<alias base="GVV">gvv</alias>
|
<alias base="GVV">gvv</alias>
|
||||||
|
<alias base="HAILPROB">hailprob</alias>
|
||||||
<alias base="Heli">heli</alias>
|
<alias base="Heli">heli</alias>
|
||||||
<alias base="HIdx">hidx</alias>
|
<alias base="HIdx">hidx</alias>
|
||||||
<alias base="HTSGW">htsgw</alias>
|
<alias base="HTSGW">htsgw</alias>
|
||||||
|
@ -46,14 +47,20 @@
|
||||||
<alias base="PoT">pot</alias>
|
<alias base="PoT">pot</alias>
|
||||||
<alias base="P">p</alias>
|
<alias base="P">p</alias>
|
||||||
<alias base="PR">pr</alias>
|
<alias base="PR">pr</alias>
|
||||||
|
<alias base="PRSVR">prsvr</alias>
|
||||||
|
<alias base="PRSIGSV">prsigsv</alias>
|
||||||
<alias base="PVV">pvv</alias>
|
<alias base="PVV">pvv</alias>
|
||||||
<alias base="PW">pw</alias>
|
<alias base="PW">pw</alias>
|
||||||
<alias base="RH">rh</alias>
|
<alias base="RH">rh</alias>
|
||||||
<alias base="SCP">scp</alias>
|
<alias base="SCP">scp</alias>
|
||||||
<alias base="SHF">shf</alias>
|
<alias base="SHF">shf</alias>
|
||||||
<alias base="SH">sh</alias>
|
<alias base="SH">sh</alias>
|
||||||
|
<alias base="SIGHAILPROB">sighailprob</alias>
|
||||||
|
<alias base="SIGTRNDPROB">sigtrndprob</alias>
|
||||||
|
<alias base="SIGWINDPROB">sigwindprob</alias>
|
||||||
<alias base="SLI">sli</alias>
|
<alias base="SLI">sli</alias>
|
||||||
<alias base="SnD">snd</alias>
|
<alias base="SnD">snd</alias>
|
||||||
|
<alias base="SRCONO">srcono</alias>
|
||||||
<alias base="SVV">svv</alias>
|
<alias base="SVV">svv</alias>
|
||||||
<alias base="SWDIR">swdir</alias>
|
<alias base="SWDIR">swdir</alias>
|
||||||
<alias base="SWELL">swell</alias>
|
<alias base="SWELL">swell</alias>
|
||||||
|
@ -79,6 +86,7 @@
|
||||||
<alias base="WEASD">weasd</alias>
|
<alias base="WEASD">weasd</alias>
|
||||||
<alias base="WGH">wgh</alias>
|
<alias base="WGH">wgh</alias>
|
||||||
<alias base="WGS">wgs</alias>
|
<alias base="WGS">wgs</alias>
|
||||||
|
<alias base="WINDPROB">windprob</alias>
|
||||||
<alias base="WS">ws</alias>
|
<alias base="WS">ws</alias>
|
||||||
<alias base="WVDIR">wvdir</alias>
|
<alias base="WVDIR">wvdir</alias>
|
||||||
<alias base="WVHGT">wvhgt</alias>
|
<alias base="WVHGT">wvhgt</alias>
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
# 04/17/14 2934 dgilling Remove alias for TPCSurgeProb D2D database.
|
# 04/17/14 2934 dgilling Remove alias for TPCSurgeProb D2D database.
|
||||||
# 05/09/2014 3148 randerso Add tpHPCndfd to D2DAccumulativeElements for HPCERP
|
# 05/09/2014 3148 randerso Add tpHPCndfd to D2DAccumulativeElements for HPCERP
|
||||||
#
|
#
|
||||||
|
# 05/29/2014 3224 randerso Added "SPC":8 to D2DDBVERSIONS
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
@ -1025,6 +1026,7 @@ D2DDBVERSIONS = {
|
||||||
"TPCStormSurge": 1,
|
"TPCStormSurge": 1,
|
||||||
"CRMTopo": 1,
|
"CRMTopo": 1,
|
||||||
"NED": 1,
|
"NED": 1,
|
||||||
|
"SPC": 8,
|
||||||
}
|
}
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
|
|
|
@ -209,4 +209,19 @@
|
||||||
<level>SFC</level>
|
<level>SFC</level>
|
||||||
</levels>
|
</levels>
|
||||||
</gridParameterInfo>
|
</gridParameterInfo>
|
||||||
|
<gridParameterInfo xsi:type="parameterInfo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<short_name>srcono</short_name>
|
||||||
|
<long_name>Convective Outlook</long_name>
|
||||||
|
<units>1</units>
|
||||||
|
<udunits>category</udunits>
|
||||||
|
<uiname>srcono</uiname>
|
||||||
|
<valid_range>0.0</valid_range>
|
||||||
|
<valid_range>100.0</valid_range>
|
||||||
|
<fillValue>-99999.0</fillValue>
|
||||||
|
<n3D>0</n3D>
|
||||||
|
<levelsDesc>SFC</levelsDesc>
|
||||||
|
<levels>
|
||||||
|
<level>SFC</level>
|
||||||
|
</levels>
|
||||||
|
</gridParameterInfo>
|
||||||
</gridParamInfo>
|
</gridParamInfo>
|
||||||
|
|
|
@ -121,11 +121,5 @@
|
||||||
<processorName>RUC130GribPostProcessor</processorName>
|
<processorName>RUC130GribPostProcessor</processorName>
|
||||||
</postProcessedModel>
|
</postProcessedModel>
|
||||||
|
|
||||||
<!-- Post processor definition for the TPCSurgeProb model -->
|
|
||||||
<postProcessedModel>
|
|
||||||
<modelName>TPCSurgeProb</modelName>
|
|
||||||
<processorName>TPCSurgeProbPostProcessor</processorName>
|
|
||||||
</postProcessedModel>
|
|
||||||
|
|
||||||
</postProcessedModels>
|
</postProcessedModels>
|
||||||
|
|
||||||
|
|
|
@ -119,6 +119,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
|
||||||
* 02/18/2014 16572 l. Bousaidi only apply adjust factor to non missing values.
|
* 02/18/2014 16572 l. Bousaidi only apply adjust factor to non missing values.
|
||||||
* 04/29/2014 3088 mpduff Change logging class, clean up/optimization.
|
* 04/29/2014 3088 mpduff Change logging class, clean up/optimization.
|
||||||
* Updated with more performance fixes.
|
* Updated with more performance fixes.
|
||||||
|
* 06/02/2014 mpduff Fix for caching of range checks.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -292,6 +293,39 @@ public class PostShef {
|
||||||
/** Forecast query results */
|
/** Forecast query results */
|
||||||
private Object[] queryForecastResults;
|
private Object[] queryForecastResults;
|
||||||
|
|
||||||
|
/** Location range data found flag */
|
||||||
|
private boolean locRangeFound = false;
|
||||||
|
|
||||||
|
/** Default range data found flag */
|
||||||
|
private boolean defRangeFound = false;
|
||||||
|
|
||||||
|
/** Valid date range flag */
|
||||||
|
private boolean validDateRange = false;
|
||||||
|
|
||||||
|
/** Gross range minimum value */
|
||||||
|
private double grossRangeMin = ShefConstants.SHEF_MISSING_INT;
|
||||||
|
|
||||||
|
/** Gross range maximum value */
|
||||||
|
private double grossRangeMax = ShefConstants.SHEF_MISSING_INT;
|
||||||
|
|
||||||
|
/** Reasonable range minimum value */
|
||||||
|
private double reasonRangeMin = ShefConstants.SHEF_MISSING_INT;
|
||||||
|
|
||||||
|
/** Reasonable range maximum value */
|
||||||
|
private double reasonRangeMax = ShefConstants.SHEF_MISSING_INT;
|
||||||
|
|
||||||
|
/** Alert upper limit value */
|
||||||
|
private double alertUpperLimit = ShefConstants.SHEF_MISSING_INT;
|
||||||
|
|
||||||
|
/** Alarm upper limit value */
|
||||||
|
private double alarmUpperLimit = ShefConstants.SHEF_MISSING_INT;
|
||||||
|
|
||||||
|
/** Alert lower limit value */
|
||||||
|
private double alertLowerLimit = ShefConstants.SHEF_MISSING_INT;
|
||||||
|
|
||||||
|
/** Alarm lower limit value */
|
||||||
|
private double alarmLowerLimit = ShefConstants.SHEF_MISSING_INT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param date
|
* @param date
|
||||||
|
@ -1072,6 +1106,18 @@ public class PostShef {
|
||||||
useTs = null;
|
useTs = null;
|
||||||
basisTimeValues = null;
|
basisTimeValues = null;
|
||||||
previousQueryForecast = null;
|
previousQueryForecast = null;
|
||||||
|
locRangeFound = false;
|
||||||
|
defRangeFound = false;
|
||||||
|
validDateRange = false;
|
||||||
|
grossRangeMin = ShefConstants.SHEF_MISSING_INT;
|
||||||
|
grossRangeMax = ShefConstants.SHEF_MISSING_INT;
|
||||||
|
reasonRangeMin = ShefConstants.SHEF_MISSING_INT;
|
||||||
|
reasonRangeMax = ShefConstants.SHEF_MISSING_INT;
|
||||||
|
alertUpperLimit = ShefConstants.SHEF_MISSING_INT;
|
||||||
|
alarmUpperLimit = ShefConstants.SHEF_MISSING_INT;
|
||||||
|
alertLowerLimit = ShefConstants.SHEF_MISSING_INT;
|
||||||
|
alarmLowerLimit = ShefConstants.SHEF_MISSING_INT;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2574,14 +2620,6 @@ public class PostShef {
|
||||||
long qualityCode = ShefConstants.DEFAULT_QC_VALUE;
|
long qualityCode = ShefConstants.DEFAULT_QC_VALUE;
|
||||||
String monthdaystart = null;
|
String monthdaystart = null;
|
||||||
String monthdayend = null;
|
String monthdayend = null;
|
||||||
double grossRangeMin = missing;
|
|
||||||
double grossRangeMax = missing;
|
|
||||||
double reasonRangeMin = missing;
|
|
||||||
double reasonRangeMax = missing;
|
|
||||||
double alertUpperLimit = missing;
|
|
||||||
double alarmUpperLimit = missing;
|
|
||||||
double alertLowerLimit = missing;
|
|
||||||
double alarmLowerLimit = missing;
|
|
||||||
|
|
||||||
alertAlarm = ShefConstants.NO_ALERTALARM;
|
alertAlarm = ShefConstants.NO_ALERTALARM;
|
||||||
|
|
||||||
|
@ -2600,10 +2638,6 @@ public class PostShef {
|
||||||
return ShefConstants.QC_MANUAL_FAILED;
|
return ShefConstants.QC_MANUAL_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean locRangeFound = false;
|
|
||||||
boolean defRangeFound = false;
|
|
||||||
boolean validDateRange = false;
|
|
||||||
|
|
||||||
boolean executeQuery = true;
|
boolean executeQuery = true;
|
||||||
if (!qualityCheckFlag) {
|
if (!qualityCheckFlag) {
|
||||||
// If qualityCheckFlag is false the the query has already been
|
// If qualityCheckFlag is false the the query has already been
|
||||||
|
|
Loading…
Add table
Reference in a new issue