Issue #2961 Fixed issue where ISC grids are selected based on the start time of the

Fcst and not the grid that overlaps the spatial editor time.

Change-Id: Ifb89fc1305db8a654067185064c3d570dfecd3b2

Former-commit-id: eb90c1f216 [formerly eb90c1f216 [formerly 131f9c0933280d25f61458e270b5bb9715c2d67b]]
Former-commit-id: db080f3eba
Former-commit-id: c7b392e36b
This commit is contained in:
Ron Anderson 2014-04-03 12:59:13 -05:00
parent acb35f67ce
commit 1e546a1fed

View file

@ -64,7 +64,9 @@ import com.raytheon.viz.gfe.rsc.GFEResource;
* Nov 14, 2012 mschenke Initial creation
* Feb 26, 2013 1708 randerso Fixed double notification for time change
* Jan 23, 2014 2703 bsteffen Add JAXB Annotations, fix iscMode.
* Apr 02, 2014 2961 randerso Code cleanup (Ben already fixed issue under #2703)
* Apr 02, 2014 2961 randerso Fixed issue where the ISC grid is selected based on the
* start time of the Fcst grid not the one that overlaps the
*
*
* </pre>
*
@ -113,20 +115,25 @@ public class GFETimeMatcher extends AbstractTimeMatcher {
for (int i = 0; i < descriptorTimes.length; ++i) {
IGridData overlapping = parm.overlappingGrid(descriptorTimes[i]
.getRefTime());
if (overlapping != null) {
TimeRange tr = overlapping.getGridTime();
rscTimes[i] = new DataTime(tr.getStart().getTime(),
new TimeRange(tr.getStart(), tr.getEnd()));
} else if (iscParm != null) {
overlapping = iscParm.overlappingGrid(descriptorTimes[i]
IGridData iscOverlapping = null;
if (iscParm != null) {
iscOverlapping = iscParm.overlappingGrid(descriptorTimes[i]
.getRefTime());
if (overlapping != null) {
TimeRange tr = overlapping.getGridTime();
rscTimes[i] = new DataTime(tr.getStart().getTime(),
new TimeRange(tr.getStart(), tr.getEnd()));
}
TimeRange tr = null;
if (overlapping != null) {
tr = overlapping.getGridTime();
if (iscOverlapping != null) {
tr = tr.intersection(iscOverlapping.getGridTime());
}
} else if (iscOverlapping != null) {
tr = iscOverlapping.getGridTime();
}
if (tr != null) {
rscTimes[i] = new DataTime(tr.getStart().getTime(),
new TimeRange(tr.getStart(), tr.getEnd()));
}
}
if (timeMap != null) {
timeMap.put(rsc, rscTimes);