Merge branch 'master_13.5.1.1' into omaha_13.5.1.1

Former-commit-id: 07bd9ee82e [formerly 3dd67383a2] [formerly 864f4fcdb4] [formerly 07bd9ee82e [formerly 3dd67383a2] [formerly 864f4fcdb4] [formerly 99ac915981 [formerly 864f4fcdb4 [formerly fa83b768dffe9a71a7990134a43f602c1b30bcfe]]]]
Former-commit-id: 99ac915981
Former-commit-id: d301f416de [formerly 7e523e31e2] [formerly 39864854492332736473bbb30b1e8b3eef314e08 [formerly 010a45e436]]
Former-commit-id: 68d50c8819de032347e47e00c98c7317e2aaa73d [formerly debf54b3b8]
Former-commit-id: db09cc85f9
This commit is contained in:
Steve Harris 2013-09-23 12:12:45 -05:00
commit 6b5e82591b
17 changed files with 114 additions and 176 deletions

View file

@ -13,7 +13,7 @@
<dfltGeogArea>BasicWX_US</dfltGeogArea>
<resourceParameters>
pluginName=grid
GDFILE=FFG-TIR-HiRes
GDFILE=FFG-TIR
</resourceParameters>
<inventoryEnabled>true</inventoryEnabled>

View file

@ -47,7 +47,7 @@
<constraint constraintValue="grid" constraintType="EQUALS"/>
</mapping>
<mapping key="info.datasetId">
<constraint constraintValue="FFG-TUA,FFG-ACR,FFG-STR,FFG-RSA,FFG-ORN,FFG-RHA,FFG-KRF,FFG-MSR,FFG-TAR,FFG-PTR,FFG-TIR-HiRes,FFG-ALR,FFG-FWR"
<constraint constraintValue="FFG-TUA,FFG-ACR,FFG-STR,FFG-RSA,FFG-ORN,FFG-RHA,FFG-KRF,FFG-MSR,FFG-TAR,FFG-PTR,FFG-TIR,FFG-ALR,FFG-FWR"
constraintType="IN" />
</mapping>
</metadataMap>
@ -321,7 +321,7 @@
<constraint constraintValue="grid" constraintType="EQUALS"/>
</mapping>
<mapping key="info.datasetId">
<constraint constraintValue="FFG-TIR-HiRes" constraintType="EQUALS"/>
<constraint constraintValue="FFG-TIR" constraintType="EQUALS"/>
</mapping>
</metadataMap>
</resourceData>

View file

@ -246,19 +246,19 @@
menuText="1hr FFG" id="OH1hrFFG">
<dataURI>/grib/%/FFG-TIR/FFG0124hr/%</dataURI>
<substitute key="timespan" value="FFG0124hr"/>
<substitute key="model" value="FFG-TIR-HiRes"/>
<substitute key="model" value="FFG-TIR"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/hydro/FFGmosaic.xml"
menuText="3hr FFG" id="OH3hrFFG">
<dataURI>/grib/%/FFG-TIR-HiRes/FFG0324hr/%</dataURI>
<dataURI>/grib/%/FFG-TIR/FFG0324hr/%</dataURI>
<substitute key="timespan" value="FFG0324hr"/>
<substitute key="model" value="FFG-TIR-HiRes"/>
<substitute key="model" value="FFG-TIR"/>
</contribute>
<contribute xsi:type="bundleItem" file="bundles/hydro/FFGmosaic.xml"
menuText="6hr FFG" id="OH6hrFFG">
<dataURI>/grib/%/FFG-TIR-HiRes/FFG0624hr/%</dataURI>
<dataURI>/grib/%/FFG-TIR/FFG0624hr/%</dataURI>
<substitute key="timespan" value="FFG0624hr"/>
<substitute key="model" value="FFG-TIR-HiRes"/>
<substitute key="model" value="FFG-TIR"/>
</contribute>
</contribute>
<contribute xsi:type="subMenu" menuText="SERFC" id="SERFCMenu">

View file

@ -144,7 +144,7 @@ import com.vividsolutions.jts.geom.Polygon;
* Jul 16, 2013 DR 16387 Qinglu Lin Reset totalSegments for each followup product.
* Jul 29, 2013 DR 16352 D. Friedman Move 'result' to okPressed().
* Aug 6, 2013 2243 jsanchez Refreshed the follow up list every minute.
* Sep 4, 2013 DR 16496 Qinglu Lin Fixed warning area expandable issue occurred after re-clicking on CON option.
* Sep 17, 2013 DR 16496 D. Friedman Make editable state more consistent.
* </pre>
*
* @author chammack
@ -1322,11 +1322,9 @@ public class WarngenDialog extends CaveSWTDialog implements
* Box was selected, allow editing of box only
*/
private void boxSelected() {
boxEditable = !polygonLocked;
trackEditable = true;
warngenLayer.getStormTrackState().editable = trackEditable;
warngenLayer.setBoxEditable(boxEditable);
warngenLayer.issueRefresh();
boxEditable = true;
trackEditable = false;
realizeEditableState();
}
/**
@ -1335,20 +1333,16 @@ public class WarngenDialog extends CaveSWTDialog implements
private void trackSelected() {
boxEditable = false;
trackEditable = true;
warngenLayer.getStormTrackState().editable = trackEditable;
warngenLayer.setBoxEditable(boxEditable);
warngenLayer.issueRefresh();
realizeEditableState();
}
/**
* Box and track was selected, allow editing of both
*/
private void boxAndTrackSelected() {
boxEditable = !polygonLocked;
boxEditable = true;
trackEditable = true;
warngenLayer.getStormTrackState().editable = trackEditable;
warngenLayer.setBoxEditable(boxEditable);
warngenLayer.issueRefresh();
realizeEditableState();
}
/**
@ -1432,8 +1426,6 @@ public class WarngenDialog extends CaveSWTDialog implements
* Redraw everything based on warned area
*/
private void redrawFromWarned() {
warngenLayer.assignSavedWarningPolygon();
warngenLayer.setPolygonState(false);
try {
warngenLayer.redrawBoxFromHatched();
} catch (VizException e) {
@ -1460,11 +1452,6 @@ public class WarngenDialog extends CaveSWTDialog implements
return;
}
warngenLayer.setEquivalentString("");
warngenLayer.setPolygonState(false);
warngenLayer.setBoxEditable(true);
warngenLayer.setWarningAction(WarningAction.valueOf(""));
String lastAreaSource = warngenLayer.getConfiguration()
.getHatchedAreaSource().getAreaSource();
@ -1610,24 +1597,11 @@ public class WarngenDialog extends CaveSWTDialog implements
* item from update list selected
*/
public void updateListSelected() {
FollowupData data = null;
if (updateListCbo != null) {
data = (FollowupData) updateListCbo.getData(updateListCbo
.getItem(updateListCbo.getSelectionIndex()));
if (data != null) {
String s = data.getEquvialentString();
if (!s.equals(warngenLayer.getEquivalentString())) {
warngenLayer.setEquivalentString(s);
warngenLayer.setPolygonState(false);
}
}
}
if (warngenLayer.getPolygonState()) {
return;
}
if (updateListCbo.getSelectionIndex() >= 0) {
warngenLayer.setOldWarningPolygon(null);
AbstractWarningRecord oldWarning = null;
FollowupData data = (FollowupData) updateListCbo
.getData(updateListCbo.getItem(updateListCbo
.getSelectionIndex()));
Mode currMode = warngenLayer.getStormTrackState().mode;
if (data != null) {
// does not refesh if user selected already highlighted option
@ -1642,12 +1616,9 @@ public class WarngenDialog extends CaveSWTDialog implements
.getEquvialentString());
}
return;
} else {
warngenLayer.setPolygonState(false);
}
}
} else {
warngenLayer.setOldWarningPolygon(null);
if (warngenLayer.state.followupData != null) {
// Sets the updatelist with the last selected vtec option
for (int i = 0; i < updateListCbo.getItemCount(); i++) {
@ -1666,7 +1637,6 @@ public class WarngenDialog extends CaveSWTDialog implements
return;
}
}
warngenLayer.setOldWarningPolygon(null);
if (currMode == Mode.DRAG_ME) {
warngenLayer.setLastMode(Mode.TRACK);
warngenLayer.getStormTrackState().mode = Mode.TRACK;
@ -1677,20 +1647,12 @@ public class WarngenDialog extends CaveSWTDialog implements
return;
}
warngenLayer.setOldWarningPolygon(null);
bulletList.setEnabled(true);
durationList.setEnabled(true);
totalSegments = 0;
warngenLayer.getStormTrackState().endTime = null;
WarningAction action = WarningAction.valueOf(data.getAct());
if (warngenLayer.isBoxEditable()) {
if (action == WarningAction.CAN || action == WarningAction.COR
|| action == WarningAction.EXT
|| action == WarningAction.EXP) {
warngenLayer.setPolygonState(false);
}
}
warngenLayer.setWarningAction(action);
if (action == WarningAction.CON) {
oldWarning = conSelected(data);
@ -2229,11 +2191,6 @@ public class WarngenDialog extends CaveSWTDialog implements
shell.moveAbove(getParent());
}
}
String action = warngenLayer.getEquivalentString();
if (action.contains("CAN-") || action.contains("COR-")
|| action.contains("EXT-") || action.contains("EXP-")) {
warngenLayer.setBoxEditable(false);
}
}
private void otherSelected() {
@ -2484,4 +2441,12 @@ public class WarngenDialog extends CaveSWTDialog implements
}
}
public void realizeEditableState() {
boolean layerEditable = warngenLayer.isEditable();
// TODO: Note there is no 'is track editing allowed' state yet.
warngenLayer.getStormTrackState().editable = layerEditable && trackEditable;
warngenLayer.setBoxEditable(layerEditable && boxEditable && !polygonLocked);
warngenLayer.issueRefresh();
}
}

View file

@ -185,7 +185,7 @@ import com.vividsolutions.jts.io.WKTReader;
* 07/26/2013 DR 16376 Qinglu Lin Moved adjustVertex() and computeSlope() to PolygonUtil; removed calculateDistance();
* updated AreaHatcher's run().
* 07/26/2013 DR 16450 D. Friedman Fix logic errors when frame count is one.
* 09/04/2013 DR 16496 Qinglu Lin Fixed CAN polygon editable issue occurred after swapping out and in.
* 09/17/2013 DR 16496 D. Friedman Make editable state more consistent.
* </pre>
*
* @author mschenke
@ -197,9 +197,6 @@ public class WarngenLayer extends AbstractStormTrackResource {
.getHandler(WarngenLayer.class);
String uniqueFip = null;
private boolean polygonChanged = false;
private String equivalentString = "";
private Polygon savedWarningPolygon;
private static class GeospatialDataList {
@ -486,11 +483,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
public synchronized void hatchArea(Polygon warningPolygon,
Geometry warningArea, Polygon oldWarningPolygon) {
synchronized (polygonUtil) {
savedWarningPolygon = warningPolygon;
if (warningAction != WarningAction.CON ||
(warningAction == WarningAction.CON && getPolygonState())) {
this.warningPolygon = warningPolygon;
}
this.warningPolygon = warningPolygon;
this.warningArea = warningArea;
this.oldWarningPolygon = oldWarningPolygon;
}
@ -2973,10 +2966,7 @@ public class WarngenLayer extends AbstractStormTrackResource {
final boolean editable = isEditable();
boxEditable = editable;
displayState.editable = editable;
if (editable) {
boxEditable = dialog.boxEditable();
displayState.editable = dialog.trackEditable();
}
dialog.realizeEditableState();
final WarngenDialog dlg = dialog;
dialog.getDisplay().asyncExec(new Runnable() {
@Override
@ -3097,28 +3087,4 @@ public class WarngenLayer extends AbstractStormTrackResource {
}
}
}
public WarningAction getWarningAction() {
return warningAction;
}
public void setPolygonState(boolean b) {
polygonChanged = b;
}
public boolean getPolygonState() {
return polygonChanged;
}
public void setEquivalentString(String s) {
equivalentString = s;
}
public String getEquivalentString() {
return equivalentString;
}
public void assignSavedWarningPolygon() {
this.areaHatcher.warningPolygon = savedWarningPolygon;
}
}

View file

@ -65,8 +65,6 @@ import com.vividsolutions.jts.geom.Polygon;
* when c2 is null for "case SINGLE_POINT" in move().
* Mar 28, 2013 DR 15974 D. Friedman Do not track removed GIDs.
* Jun 25, 2013 DR 16013 Qinglu Lin Called setUniqueFip() in handleMouseUp().
* Sep 4, 2013 DR 16496 Qinglu Lin Fixed warning area expandable issue which occurs after re-clicking on
* a CON option.
*
* </pre>
*
@ -139,10 +137,6 @@ public class WarngenUIManager extends InputAdapter {
if (!handleInput || warngenLayer.isBoxEditable() == false) {
return super.handleMouseDown(x, y, button);
}
if (warngenLayer.getWarningAction() == WarningAction.CON &&
!warngenLayer.getPolygonState()) {
warngenLayer.setPolygonState(true);
}
boolean rval = false;
if (button == 1 && moveType != null) {
return true;

View file

@ -4,7 +4,7 @@
<inventoryParameters>pluginName,info.ensembleId,info.secondaryId,dataTime</inventoryParameters>
<baseConstraints>
<mapping key="info.datasetId">
<constraint constraintValue="FFG-TIR-HiRes" constraintType="EQUALS"/>
<constraint constraintValue="FFG-TIR" constraintType="EQUALS"/>
</mapping>
<mapping key="pluginName">
<constraint constraintValue="grid" constraintType="EQUALS"/>

View file

@ -1,75 +1,73 @@
#*
CREATED 1-25-2012 BY MIKE DANGELO AND EVAN BOOKBINDER
UPDATED 9-16-2013 BY MIKE DANGELO AND EVAN BOOKBINDER
Here are some examples of very simple INTERSTATE output
(one line/sentence per interstate):
### THIS PLUG-IN VM FILE ALLOWS YOU TO CONSOLIDATE ALL YOUR MILEMARKER/EXIT/ROUTE
### OUTPUT INTO A SINGLE FUNCTION CALL
#mmarkers(${i70momm},${i70mommid},"INTERSTATE 70 IN MISSOURI","MILE MARKER",false)
#mmarkers(${i70momm},${i70mommid},"INTERSTATE 70 IN MISSOURI","MILE MARKER",true)
#mmarkers(${i70momm},${i70mommid},"INTERSTATE 70 IN MISSOURI","",false)
#mmarkers(${i70momm},${i70mommid},"INTERSTATE 70 IN MISSOURI","",true)
#mmarkers(${i435mm},${i435mmid},"INTERSTATE 435 IN MISSOURI","",false)
#mmarkers(${i435mm},${i435mmid},"INTERSTATE 435 IN MISSOURI","",true)
#mmarkers(${i435mm},${i435mmid},"INTERSTATE 435 IN MISSOURI","MILE MARKER",false)
#mmarkers(${i435mm},${i435mmid},"INTERSTATE 435 IN MISSOURI","MILE MARKER",true)
Mile Marker Test Code
Mile Marker Macro
macro "mmarkers" use (called out of VM_global_library.vm):
#mmarkers($name, $id, $type, $markers, $simplify)
#macro(mmarkers $markers $id $name $type $simplify)
where the argument:
$markers is a string, and is the exact "variable" set in the XML "pointSource" tag for this road
- <pointSource variable="i70momm">
$id is the sequential ID database field to determine logical breaks in the mile markers
set in the XML "pointSource" tag for this road
- <pointSource variable="i70mommid">
$name is a string "OUTPUT TEXT" of the road name
$id is the sequential ID database field to determine logical breaks in the mile markers
$type is a string which describes the type of "marker"
- may be "MILE MARKER" or something similar, or blank ""
- "" is for use when town names (CHARLESTON) or exit names (THE SUNSET EXIT)
$markers is a string, and is the exact "variable" set in the XML "pointSource" tag for this road
- <pointSource variable="i70momm">
$simplify is a boolean value (true or false)
- true concatenates (FROM MM 2 to 4),
- false is a big list (MM 2...3...AND 4)
From mileMarkers.xml
$databaseName is an array of pointSource objects containing the milemarker names
$databaseId is an array of pointSource objects containing the milemarker IDs
$specificName is an array of plain English names for the Interstates, Routes, etc..
e.g.
#set ($databaseName = [${i435mm},${i70momm},${i35momm}])
#set ($databaseId = [${i435mmid},${i70mommid},${i35mommid}])
#set ($specificName = ['INTERSTATE 435','INTERSTATE 70','INTERSTATE 35'])
CONFIGURATION:
#COMMENT OUT LINES 59-62 BELOW AS NEEDED, REPLACING THE EXAMPLE WITH YOUR MILE MARKER/ROUTE ENTRIES
#EACH LINE CONTAINS A VARIABLE MM1,MM2,MM3,etc... REFERENCING AN ARRAY (LIST) OF DATA THAT
#WILL BE PASSED TO THE MMARKERS ROUTINE.
The following code makes upkeep of the mile marker files easier, and is
reccomended for use.
Substitute all your "INTERSTATE NAME(s)" into the array: $specificName
Likewise,
Substitute all your corresponding database table names (${tablename}) for those
interstates into the array: $databaseName
You may also use town names or exit names
in the "name" field of your database tables.
The items in the array are as follows:
1.) java Object - A pointSource object from mileMarkers.xml containing the milemarker names
2.) java Object - A pointSource object from mileMarkers.xml containing the milemarker IDs or index
3.) String - A plain English name for the Interstates, Routes, etc..
4.) String - A plain English name describing the output (mile marker, exit, etc...)
Can be blank ''. Make sure the singular phrase is used (an "S" will be auto-applied for
plural values. e.g. MILE MARKERS 3 AND 10
5.) Boolean - A true/false value telling the function whether to group the milemarkers where
possible, or list them individually. For mile markers that are text (such as exits or
intersections, false might be a better option)
NOTE: PLEASE ENSURE PROPER SYNTAX. Java Objects are ${variable}, Text Strings are 'TEXT', and
Booleans are true/false (no quote)
ALSO ENSURE THAT EACH LINE CONTAINS A UNIQUE VARIABLE NAME: MM1, MM2, MM3, etc..
HERE IS AN EXAMPLE:
e.g.
#set ($mm1 = [${i435mm},${i435mmid},'INTERSTATE 435','MILE MARKER',true])
#set ($mm2 = [${i70momm},${i70mommid},'INTERSTATE 70 IN MISSOURI','MILE MARKER',true])
#set ($mm3 = [${i35momm},${i35mommid},'INTERSTATE 70 IN KANSAS','MILE MARKER',true])
After creating these, we must create a list containing all of our variable names
e.g.
#set ($varList = [$mm1,$mm2,$mm3])
*#
#set($hits = 0)
#set($bigList = '')
##set ($databaseName = [${i435mm},${i70momm},${i35momm}])
##set ($databaseId = [${i435mmid},${i70mommid},${i35mommid}])
##set ($specificName = ['INTERSTATE 435','INTERSTATE 70','INTERSTATE 35'])
#set ($itemCount = 0)
#foreach($specName in $specificName)
#set ($itemCount = $itemCount + 1)
#set ($itemCount2 = 0)
#foreach($dbName in $databaseName)
#set ($itemCount2 = $itemCount2 + 1)
#set ($itemCount3 = 0)
#foreach($dbId in $databaseId)
#set ($itemCount3 = $itemCount3 + 1)
#if ($itemCount3 == $itemCount2 && $itemCount2 == $itemCount)
#set ($checker = "#mmarkers(${dbName},${dbId},${specName},'MILE MARKER',true)")
##set ($mm1 = [${i435mm},${i435mmid},'INTERSTATE 435','MILE MARKER',true])
##set ($mm2 = [${i70momm},${i70mommid},'INTERSTATE 70 IN MISSOURI','MILE MARKER',true])
##set ($mm3 = [${i35momm},${i35mommid},'INTERSTATE 70 IN KANSAS','MILE MARKER',true])
##set ($varList = [$mm1,$mm2,$mm3])
#foreach ($var in $varList)
#set ($checker = "#mmarkers(${list.get(${var},0)},${list.get(${var},1)},${list.get(${var},2)},${list.get(${var},3)},${list.get(${var},4)})")
#if ($checker.length() > 0)
#set ($hits = $hits + 1)
#set ($bigList = "$bigList $checker")
#end
#end
#end
#end
#end
#if ($hits == 1)
THIS INCLUDES$bigList
#end

View file

@ -8,22 +8,52 @@
SHOULD BE MODIFIED.
EXAMPLE FOR INTERSTATE 435 in the Kansas City Metro follows:
<pointSource variable="i435mm">
<pointSource>i435mm</pointSource>
<pointSource>i435</pointSource>
<pointField>NAME</pointField>
<searchMethod>POINTS</searchMethod>
<withinPolygon>true</withinPolygon>
<maxResults>1000</maxResults>
<distanceThreshold>100</distanceThreshold>
<sortBy>
<sort>gid</sort>
</sortBy>
</pointSource>
<pointSource variable="i435mmid">
<pointSource>i435mm</pointSource>
<pointSource>i435</pointSource>
<pointField>GID</pointField>
<searchMethod>POINTS</searchMethod>
<withinPolygon>true</withinPolygon>
<maxResults>1000</maxResults>
<distanceThreshold>100</distanceThreshold>
<sortBy>
<sort>gid</sort>
</sortBy>
</pointSource>
-->
<pointSource variable="i35momm">
<pointSource>i35mo</pointSource>
<pointField>NAME</pointField>
<searchMethod>POINTS</searchMethod>
<withinPolygon>true</withinPolygon>
<maxResults>1000</maxResults>
<distanceThreshold>100</distanceThreshold>
<sortBy>
<sort>gid</sort>
</sortBy>
</pointSource>
<pointSource variable="i35mommid">
<pointSource>i35mo</pointSource>
<pointField>GID</pointField>
<searchMethod>POINTS</searchMethod>
<withinPolygon>true</withinPolygon>
<maxResults>1000</maxResults>
<distanceThreshold>100</distanceThreshold>
<sortBy>
<sort>gid</sort>
</sortBy>
</pointSource>
-->

View file

@ -515,11 +515,6 @@
<datasetId>FFG-TIR</datasetId>
<dt>1</dt>
</info>
<info>
<title>FFG-TIR-HiRes</title>
<datasetId>FFG-TIR-HiRes</datasetId>
<dt>1</dt>
</info>
<info>
<title>QPE-TIR</title>
<datasetId>QPE-TIR</datasetId>

View file

@ -1079,19 +1079,9 @@
<id>180</id>
</process>
</model>
<model>
<name>FFG-TIR</name>
<center>9</center>
<subcenter>160</subcenter>
<grid>240160</grid>
<process>
<id>151</id>
</process>
</model>
<model>
<name>FFG-TIR-HiRes</name>
<name>FFG-TIR</name>
<center>9</center>
<subcenter>160</subcenter>
<grid>250160</grid>

View file