Issue #2703 Fix GFE time matching in iscMode.

Former-commit-id: 07bc9f075f [formerly d8bfdd1a7e [formerly cbc63092bed92bb35a450c012b5bc882e4c82b35]]
Former-commit-id: d8bfdd1a7e
Former-commit-id: 2425b9665c
This commit is contained in:
Ben Steffensmeier 2014-02-26 14:32:26 -06:00
parent 7bdf0b7396
commit fa6dcaac84
3 changed files with 326 additions and 344 deletions

View file

@ -50,8 +50,9 @@ import com.raytheon.viz.gfe.rsc.GFEResource;
* *
* SOFTWARE HISTORY * SOFTWARE HISTORY
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Feb 19, 2009 chammack Initial creation * Feb 19, 2009 chammack Initial creation
* Jan 23, 2014 2703 bsteffen Always get resource time from descriptor.
* *
* </pre> * </pre>
* *
@ -117,11 +118,9 @@ public class GFEMapRenderableDisplay extends PlainMapRenderableDisplay
@Override @Override
protected PaintProperties calcPaintDataTime(PaintProperties paintProps, protected PaintProperties calcPaintDataTime(PaintProperties paintProps,
AbstractVizResource<?, ?> rsc) { AbstractVizResource<?, ?> rsc) {
if (dataMgr != null) {
// Get time for resource from FramesInfo // Get time for resource from FramesInfo
paintProps.setDataTime(paintProps.getFramesInfo() paintProps.setDataTime(paintProps.getFramesInfo().getTimeForResource(
.getTimeForResource(rsc)); rsc));
}
GFEPaintProperties gfeProps = new GFEPaintProperties(paintProps); GFEPaintProperties gfeProps = new GFEPaintProperties(paintProps);
if (qvTime != null) { if (qvTime != null) {
@ -184,4 +183,5 @@ public class GFEMapRenderableDisplay extends PlainMapRenderableDisplay
public void spatialEditorTimeChanged(Date date) { public void spatialEditorTimeChanged(Date date) {
this.refresh(); this.refresh();
} }
} }

View file

@ -63,7 +63,7 @@ import com.raytheon.viz.gfe.rsc.GFEResource;
* ------------- -------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Nov 14, 2012 mschenke Initial creation * Nov 14, 2012 mschenke Initial creation
* Feb 26, 2013 1708 randerso Fixed double notification for time change * Feb 26, 2013 1708 randerso Fixed double notification for time change
* Jan 23, 2014 2703 bsteffen Add JAXB Annotations. * Jan 23, 2014 2703 bsteffen Add JAXB Annotations, fix iscMode.
* *
* *
* </pre> * </pre>
@ -108,6 +108,7 @@ public class GFETimeMatcher extends AbstractTimeMatcher {
if (resource instanceof GFEResource) { if (resource instanceof GFEResource) {
GFEResource rsc = (GFEResource) resource; GFEResource rsc = (GFEResource) resource;
Parm parm = rsc.getParm(); Parm parm = rsc.getParm();
Parm iscParm = getIscParm(parm);
DataTime[] rscTimes = new DataTime[descriptorTimes.length]; DataTime[] rscTimes = new DataTime[descriptorTimes.length];
for (int i = 0; i < descriptorTimes.length; ++i) { for (int i = 0; i < descriptorTimes.length; ++i) {
IGridData overlapping = parm.overlappingGrid(descriptorTimes[i] IGridData overlapping = parm.overlappingGrid(descriptorTimes[i]
@ -116,8 +117,17 @@ public class GFETimeMatcher extends AbstractTimeMatcher {
TimeRange tr = overlapping.getGridTime(); TimeRange tr = overlapping.getGridTime();
rscTimes[i] = new DataTime(tr.getStart().getTime(), rscTimes[i] = new DataTime(tr.getStart().getTime(),
new TimeRange(tr.getStart(), tr.getEnd())); new TimeRange(tr.getStart(), tr.getEnd()));
} else if (iscParm != null) {
overlapping = 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()));
} }
} }
}
if (timeMap != null) { if (timeMap != null) {
timeMap.put(rsc, rscTimes); timeMap.put(rsc, rscTimes);
} }
@ -134,8 +144,17 @@ public class GFETimeMatcher extends AbstractTimeMatcher {
List<Parm> parms = new ArrayList<Parm>(rscs.size()); List<Parm> parms = new ArrayList<Parm>(rscs.size());
for (GFEResource rsc : rscs) { for (GFEResource rsc : rscs) {
if (rsc.getProperties().isVisible()) { if (rsc.getProperties().isVisible()) {
parms.add(rsc.getParm()); Parm parm = rsc.getParm();
parms.add(parm);
Parm iscParm = getIscParm(parm);
if (iscParm != null) {
parms.add(iscParm);
}
tmbResources.add(rsc); tmbResources.add(rsc);
DataManager dataManager = parm.getDataManager();
if (dataManager.getParmManager().iscMode()) {
parms.add(dataManager.getIscDataAccess().getISCParm(parm));
}
} }
} }
@ -287,4 +306,12 @@ public class GFETimeMatcher extends AbstractTimeMatcher {
} }
return new ArrayList<Date>(dateSet); return new ArrayList<Date>(dateSet);
} }
private static Parm getIscParm(Parm parm) {
DataManager dataManager = parm.getDataManager();
if (dataManager.getParmManager().iscMode()) {
return dataManager.getIscDataAccess().getISCParm(parm);
}
return null;
}
} }

View file

@ -166,7 +166,9 @@ import com.vividsolutions.jts.geom.Envelope;
* Sep 23, 2013 2363 bsteffen Add more vector configuration options. * Sep 23, 2013 2363 bsteffen Add more vector configuration options.
* Oct 31, 2013 2508 randerso Change to use DiscreteGridSlice.getKeys() * Oct 31, 2013 2508 randerso Change to use DiscreteGridSlice.getKeys()
* Dec 11, 2013 2621 randerso Removed conditional from getParm so it never returns null * Dec 11, 2013 2621 randerso Removed conditional from getParm so it never returns null
* Jan 23, 2014 2703 bsteffen Allow construction using a resourceData. * Jan 23, 2014 2703 bsteffen Allow construction using a resourceData,
* paint using the time in paintProps and
* remove dead code in paintInternal
* *
* </pre> * </pre>
* *
@ -488,15 +490,9 @@ public class GFEResource extends
PaintProperties paintProps) throws VizException { PaintProperties paintProps) throws VizException {
GFEPaintProperties myPaintProps = (GFEPaintProperties) paintProps; GFEPaintProperties myPaintProps = (GFEPaintProperties) paintProps;
this.curTime = myPaintProps.getDataTime();
// TODO: Time matching changes for Hazard Services broke display of ISC // No data to be displayed here
// grids when in ISC mode with no Fcst grid present. This fixes the
// issue for now but will need to be resolved for Hazard Services
// this.curTime = myPaintProps.getDataTime();
this.curTime = new DataTime(this.dataManager.getSpatialDisplayManager()
.getSpatialEditorTime());
if (curTime == null) { if (curTime == null) {
return; return;
} }
@ -519,11 +515,6 @@ public class GFEResource extends
this.lastGraphicsTarget = target; this.lastGraphicsTarget = target;
// No data to be displayed here
if (this.curTime == null) {
return;
}
IGridData[] gd = this.parm.getGridInventory(this.curTime IGridData[] gd = this.parm.getGridInventory(this.curTime
.getValidPeriod()); .getValidPeriod());
@ -554,7 +545,6 @@ public class GFEResource extends
.setRenderingOrder(renderingOrder); .setRenderingOrder(renderingOrder);
descriptor.getResourceList().sort(); descriptor.getResourceList().sort();
if (gd != null) {
IGridSlice gs = null; IGridSlice gs = null;
if (dataManager.getParmManager().iscMode() && (gd.length == 0)) { if (dataManager.getParmManager().iscMode() && (gd.length == 0)) {
GridParmInfo gpi = this.parm.getGridInfo(); GridParmInfo gpi = this.parm.getGridInfo();
@ -563,45 +553,39 @@ public class GFEResource extends
IGrid2D dummyGrid = null; IGrid2D dummyGrid = null;
switch (gridType) { switch (gridType) {
case SCALAR: case SCALAR:
dummyGrid = new Grid2DFloat(gpi.getGridLoc().getNx(), dummyGrid = new Grid2DFloat(gpi.getGridLoc().getNx(), gpi
gpi.getGridLoc().getNy(), Float.NaN); .getGridLoc().getNy(), Float.NaN);
gs = new ScalarGridSlice(this.curTime.getValidPeriod(), gs = new ScalarGridSlice(this.curTime.getValidPeriod(),
gpi, new GridDataHistory[] {}, gpi, new GridDataHistory[] {},
(Grid2DFloat) dummyGrid); (Grid2DFloat) dummyGrid);
break; break;
case VECTOR: case VECTOR:
dummyGrid = new Grid2DFloat(gpi.getGridLoc().getNx(), dummyGrid = new Grid2DFloat(gpi.getGridLoc().getNx(), gpi
gpi.getGridLoc().getNy(), Float.NaN); .getGridLoc().getNy(), Float.NaN);
gs = new VectorGridSlice(this.curTime.getValidPeriod(), gs = new VectorGridSlice(this.curTime.getValidPeriod(),
gpi, new GridDataHistory[] {}, gpi, new GridDataHistory[] {},
(Grid2DFloat) dummyGrid, (Grid2DFloat) dummyGrid, (Grid2DFloat) dummyGrid);
(Grid2DFloat) dummyGrid);
break; break;
case WEATHER: case WEATHER:
dummyGrid = new Grid2DByte(gpi.getGridLoc().getNx(), dummyGrid = new Grid2DByte(gpi.getGridLoc().getNx(), gpi
gpi.getGridLoc().getNy()); .getGridLoc().getNy());
gs = new WeatherGridSlice( gs = new WeatherGridSlice(this.curTime.getValidPeriod(),
this.curTime.getValidPeriod(), gpi, gpi, new GridDataHistory[] {},
new GridDataHistory[] {},
(Grid2DByte) dummyGrid, new WeatherKey[] {}); (Grid2DByte) dummyGrid, new WeatherKey[] {});
break; break;
case DISCRETE: case DISCRETE:
dummyGrid = new Grid2DByte(gpi.getGridLoc().getNx(), dummyGrid = new Grid2DByte(gpi.getGridLoc().getNx(), gpi
gpi.getGridLoc().getNy()); .getGridLoc().getNy());
gs = new DiscreteGridSlice( gs = new DiscreteGridSlice(this.curTime.getValidPeriod(),
this.curTime.getValidPeriod(), gpi, gpi, new GridDataHistory[] {},
new GridDataHistory[] {},
(Grid2DByte) dummyGrid, new DiscreteKey[] {}); (Grid2DByte) dummyGrid, new DiscreteKey[] {});
break; break;
default: default:
return; return;
} }
} else if (gd.length == 0) {
return;
} else { } else {
gs = gd[0].getGridSlice(); gs = gd[0].getGridSlice();
} }
if ((gs instanceof VectorGridSlice) if ((gs instanceof VectorGridSlice)
|| (gs instanceof ScalarGridSlice)) { || (gs instanceof ScalarGridSlice)) {
@ -619,16 +603,13 @@ public class GFEResource extends
if (gs instanceof VectorGridSlice) { if (gs instanceof VectorGridSlice) {
VectorGridSlice vectorSlice = (VectorGridSlice) gs; VectorGridSlice vectorSlice = (VectorGridSlice) gs;
Grid2DBit mask = parm.getDisplayAttributes() Grid2DBit mask = parm.getDisplayAttributes().getDisplayMask();
.getDisplayMask();
if (dataManager.getParmManager().iscMode() || iscParm) { if (dataManager.getParmManager().iscMode() || iscParm) {
vectorSlice = new VectorGridSlice(); vectorSlice = new VectorGridSlice();
mask = dataManager.getIscDataAccess().getCompositeGrid( mask = dataManager.getIscDataAccess().getCompositeGrid(
new GridID(this.parm, this.dataManager new GridID(this.parm, this.curTime.getRefTime()),
.getSpatialDisplayManager() true, vectorSlice);
.getSpatialEditorTime()), true,
vectorSlice);
} }
Grid2DFloat maskedGrid = new Grid2DFloat(vectorSlice Grid2DFloat maskedGrid = new Grid2DFloat(vectorSlice
@ -637,15 +618,15 @@ public class GFEResource extends
maskedGrid.copyWithMask(vectorSlice.getMagGrid(), mask); maskedGrid.copyWithMask(vectorSlice.getMagGrid(), mask);
FloatBuffer mag = maskedGrid.getBuffer(); FloatBuffer mag = maskedGrid.getBuffer();
Grid2DFloat dirGrid = new Grid2DFloat(vectorSlice Grid2DFloat dirGrid = new Grid2DFloat(vectorSlice.getMagGrid()
.getMagGrid().getXdim(), vectorSlice.getDirGrid() .getXdim(), vectorSlice.getDirGrid().getYdim(),
.getYdim(), Float.NaN); Float.NaN);
dirGrid.copyWithMask(vectorSlice.getDirGrid(), mask); dirGrid.copyWithMask(vectorSlice.getDirGrid(), mask);
FloatBuffer dir = dirGrid.getBuffer(); FloatBuffer dir = dirGrid.getBuffer();
if (visTypes.contains(VisualizationType.IMAGE)) { if (visTypes.contains(VisualizationType.IMAGE)) {
this.gridDisplay = new GriddedImageDisplay(mag, this.gridDisplay = new GriddedImageDisplay(mag, descriptor,
descriptor, this.gridGeometry); this.gridGeometry);
} }
clearVectorDisplays(); clearVectorDisplays();
@ -657,10 +638,8 @@ public class GFEResource extends
double size = getVectorSize("WindArrowDefaultSize"); double size = getVectorSize("WindArrowDefaultSize");
vectorConfig.setBaseSize(size); vectorConfig.setBaseSize(size);
vectorConfig.setCalmCircleSizeRatio(vectorConfig vectorConfig.setCalmCircleSizeRatio(vectorConfig
.getCalmCircleSizeRatio() .getCalmCircleSizeRatio() * BARB_SCALE_FACTOR);
* BARB_SCALE_FACTOR); vectorConfig.setArrowHeadStaffRatio(ARROW_HEAD_RATIO);
vectorConfig
.setArrowHeadStaffRatio(ARROW_HEAD_RATIO);
vectorConfig.alwaysIncludeCalmCircle(); vectorConfig.alwaysIncludeCalmCircle();
vectorConfig.alwaysIncludeVector(); vectorConfig.alwaysIncludeVector();
// get the logFactor // get the logFactor
@ -675,10 +654,9 @@ public class GFEResource extends
size, logFactor, maxVal)); size, logFactor, maxVal));
} }
this.vectorDisplay.add(new GriddedVectorDisplay( this.vectorDisplay.add(new GriddedVectorDisplay(mag,
mag, dir, descriptor, MapUtil dir, descriptor, MapUtil.getGridGeometry(gs
.getGridGeometry(gs.getGridInfo() .getGridInfo().getGridLoc()),
.getGridLoc()),
VECTOR_DENSITY_FACTOR, false, VECTOR_DENSITY_FACTOR, false,
visTypeToDisplayType(type), vectorConfig)); visTypeToDisplayType(type), vectorConfig));
break; break;
@ -690,12 +668,13 @@ public class GFEResource extends
* BARB_SCALE_FACTOR); * BARB_SCALE_FACTOR);
vectorConfig.alwaysIncludeCalmCircle(); vectorConfig.alwaysIncludeCalmCircle();
vectorConfig.alwaysIncludeVector(); vectorConfig.alwaysIncludeVector();
this.vectorDisplay.add(new GriddedVectorDisplay( this.vectorDisplay
mag, dir, descriptor, MapUtil .add(new GriddedVectorDisplay(mag, dir,
.getGridGeometry(gs.getGridInfo() descriptor, MapUtil.getGridGeometry(gs
.getGridLoc()), .getGridInfo().getGridLoc()),
VECTOR_DENSITY_FACTOR / BARB_SCALE_FACTOR, VECTOR_DENSITY_FACTOR
false, visTypeToDisplayType(type), / BARB_SCALE_FACTOR, false,
visTypeToDisplayType(type),
vectorConfig)); vectorConfig));
break; break;
@ -711,16 +690,13 @@ public class GFEResource extends
} }
} else if (gs instanceof ScalarGridSlice) { } else if (gs instanceof ScalarGridSlice) {
ScalarGridSlice scalarSlice = (ScalarGridSlice) gs; ScalarGridSlice scalarSlice = (ScalarGridSlice) gs;
Grid2DBit mask = parm.getDisplayAttributes() Grid2DBit mask = parm.getDisplayAttributes().getDisplayMask();
.getDisplayMask();
if (dataManager.getParmManager().iscMode() || iscParm) { if (dataManager.getParmManager().iscMode() || iscParm) {
scalarSlice = new ScalarGridSlice(); scalarSlice = new ScalarGridSlice();
mask = dataManager.getIscDataAccess().getCompositeGrid( mask = dataManager.getIscDataAccess().getCompositeGrid(
new GridID(this.parm, this.dataManager new GridID(this.parm, this.curTime.getRefTime()),
.getSpatialDisplayManager() true, scalarSlice);
.getSpatialEditorTime()), true,
scalarSlice);
} }
Grid2DFloat scalarGrid = scalarSlice.getScalarGrid(); Grid2DFloat scalarGrid = scalarSlice.getScalarGrid();
@ -750,8 +726,7 @@ public class GFEResource extends
} }
outlineShapes.clear(); outlineShapes.clear();
for (Collection<IShadedShape> shapeList : shadedShapes for (Collection<IShadedShape> shapeList : shadedShapes.values()) {
.values()) {
for (IShadedShape shadedShape : shapeList) { for (IShadedShape shadedShape : shapeList) {
shadedShape.dispose(); shadedShape.dispose();
} }
@ -759,30 +734,25 @@ public class GFEResource extends
} }
shadedShapes.clear(); shadedShapes.clear();
Grid2DBit mask = parm.getDisplayAttributes() Grid2DBit mask = parm.getDisplayAttributes().getDisplayMask();
.getDisplayMask();
if (dataManager.getParmManager().iscMode() || iscParm) { if (dataManager.getParmManager().iscMode() || iscParm) {
slice = new DiscreteGridSlice(); slice = new DiscreteGridSlice();
GridID gid = new GridID(parm, this.dataManager GridID gid = new GridID(parm, this.curTime.getRefTime());
.getSpatialDisplayManager() mask = dataManager.getIscDataAccess().getCompositeGrid(gid,
.getSpatialEditorTime()); true, slice);
mask = dataManager.getIscDataAccess().getCompositeGrid(
gid, true, slice);
} }
for (DiscreteKey discreteKey : slice.getKeys()) { for (DiscreteKey discreteKey : slice.getKeys()) {
if (discreteKey.isValid()) { if (discreteKey.isValid()) {
outlineShapes.put(discreteKey, target outlineShapes.put(discreteKey, target
.createWireframeShape(false, .createWireframeShape(false, this.descriptor));
this.descriptor));
Collection<IShadedShape> shapeList = new ArrayList<IShadedShape>(); Collection<IShadedShape> shapeList = new ArrayList<IShadedShape>();
shadedShapes.put(discreteKey, shapeList); shadedShapes.put(discreteKey, shapeList);
WxValue wxValue = new DiscreteWxValue(discreteKey, WxValue wxValue = new DiscreteWxValue(discreteKey, parm);
parm);
List<ImageAttr> fillAttrs = DiscreteDisplayUtil List<ImageAttr> fillAttrs = DiscreteDisplayUtil
.getFillAttributes(wxValue); .getFillAttributes(wxValue);
@ -791,7 +761,8 @@ public class GFEResource extends
for (ImageAttr attr : fillAttrs) { for (ImageAttr attr : fillAttrs) {
IShadedShape shadedShape = target IShadedShape shadedShape = target
.createShadedShape(false, .createShadedShape(false,
this.descriptor, true); this.descriptor.getGridGeometry(),
true);
shapeList.add(shadedShape); shapeList.add(shadedShape);
IWireframeShape outlineShape = first ? outlineShapes IWireframeShape outlineShape = first ? outlineShapes
@ -799,24 +770,22 @@ public class GFEResource extends
first = false; first = false;
JTSCompiler jtsCompiler = new JTSCompiler( JTSCompiler jtsCompiler = new JTSCompiler(
shadedShape, outlineShape, shadedShape, outlineShape, this.descriptor);
this.descriptor);
byte[] fillPattern = FillPatterns byte[] fillPattern = FillPatterns.getGLPattern(attr
.getGLPattern(attr.getFillPatternName()); .getFillPatternName());
RGB fillColor = RGBColors.getRGBColor(attr RGB fillColor = RGBColors.getRGBColor(attr
.getColorName()); .getColorName());
Grid2DBit tmpBit = slice.eq(discreteKey).and( Grid2DBit tmpBit = slice.eq(discreteKey).and(mask);
mask);
ReferenceData refData = new ReferenceData(gs ReferenceData refData = new ReferenceData(gs
.getGridInfo().getGridLoc(), .getGridInfo().getGridLoc(),
new ReferenceID("temp"), tmpBit); new ReferenceID("temp"), tmpBit);
jtsCompiler.handle(refData jtsCompiler.handle(
.getPolygons(CoordinateType.LATLON), refData.getPolygons(CoordinateType.LATLON),
fillColor); fillColor);
shadedShape.compile(); shadedShape.compile();
shadedShape.setFillPattern(fillPattern); shadedShape.setFillPattern(fillPattern);
@ -834,8 +803,7 @@ public class GFEResource extends
} }
outlineShapes.clear(); outlineShapes.clear();
for (Collection<IShadedShape> shapeList : shadedShapes for (Collection<IShadedShape> shapeList : shadedShapes.values()) {
.values()) {
for (IShadedShape shadedShape : shapeList) { for (IShadedShape shadedShape : shapeList) {
shadedShape.dispose(); shadedShape.dispose();
} }
@ -843,30 +811,25 @@ public class GFEResource extends
} }
shadedShapes.clear(); shadedShapes.clear();
Grid2DBit mask = parm.getDisplayAttributes() Grid2DBit mask = parm.getDisplayAttributes().getDisplayMask();
.getDisplayMask();
if (dataManager.getParmManager().iscMode() || iscParm) { if (dataManager.getParmManager().iscMode() || iscParm) {
slice = new WeatherGridSlice(); slice = new WeatherGridSlice();
GridID gid = new GridID(parm, this.dataManager GridID gid = new GridID(parm, this.curTime.getRefTime());
.getSpatialDisplayManager() mask = dataManager.getIscDataAccess().getCompositeGrid(gid,
.getSpatialEditorTime()); true, slice);
mask = dataManager.getIscDataAccess().getCompositeGrid(
gid, true, slice);
} }
for (WeatherKey weatherKey : slice.getKeys()) { for (WeatherKey weatherKey : slice.getKeys()) {
if (weatherKey.isValid()) { if (weatherKey.isValid()) {
outlineShapes.put(weatherKey, target outlineShapes.put(weatherKey, target
.createWireframeShape(false, .createWireframeShape(false, this.descriptor));
this.descriptor));
Collection<IShadedShape> shapeList = new ArrayList<IShadedShape>(); Collection<IShadedShape> shapeList = new ArrayList<IShadedShape>();
shadedShapes.put(weatherKey, shapeList); shadedShapes.put(weatherKey, shapeList);
WxValue wxValue = new WeatherWxValue(weatherKey, WxValue wxValue = new WeatherWxValue(weatherKey, parm);
parm);
List<ImageAttr> fillAttrs = DiscreteDisplayUtil List<ImageAttr> fillAttrs = DiscreteDisplayUtil
.getFillAttributes(wxValue); .getFillAttributes(wxValue);
@ -875,7 +838,8 @@ public class GFEResource extends
for (ImageAttr attr : fillAttrs) { for (ImageAttr attr : fillAttrs) {
IShadedShape shadedShape = target IShadedShape shadedShape = target
.createShadedShape(false, .createShadedShape(false,
this.descriptor, true); this.descriptor.getGridGeometry(),
true);
shapeList.add(shadedShape); shapeList.add(shadedShape);
IWireframeShape outlineShape = first ? outlineShapes IWireframeShape outlineShape = first ? outlineShapes
@ -883,24 +847,22 @@ public class GFEResource extends
first = false; first = false;
JTSCompiler jtsCompiler = new JTSCompiler( JTSCompiler jtsCompiler = new JTSCompiler(
shadedShape, outlineShape, shadedShape, outlineShape, this.descriptor);
this.descriptor);
byte[] fillPattern = FillPatterns byte[] fillPattern = FillPatterns.getGLPattern(attr
.getGLPattern(attr.getFillPatternName()); .getFillPatternName());
RGB fillColor = RGBColors.getRGBColor(attr RGB fillColor = RGBColors.getRGBColor(attr
.getColorName()); .getColorName());
Grid2DBit tmpBit = slice.eq(weatherKey).and( Grid2DBit tmpBit = slice.eq(weatherKey).and(mask);
mask);
ReferenceData refData = new ReferenceData(gs ReferenceData refData = new ReferenceData(gs
.getGridInfo().getGridLoc(), .getGridInfo().getGridLoc(),
new ReferenceID("temp"), tmpBit); new ReferenceID("temp"), tmpBit);
jtsCompiler.handle(refData jtsCompiler.handle(
.getPolygons(CoordinateType.LATLON), refData.getPolygons(CoordinateType.LATLON),
fillColor); fillColor);
shadedShape.compile(); shadedShape.compile();
shadedShape.setFillPattern(fillPattern); shadedShape.setFillPattern(fillPattern);
@ -911,13 +873,6 @@ public class GFEResource extends
} }
} }
} }
} else if (this.curTime == null) {
if (this.gridDisplay != null) {
this.gridDisplay.dispose();
this.gridDisplay = null;
}
this.lastDisplayedTime = null;
}
float brightness = 1.0f; float brightness = 1.0f;
if (hasCapability(ImagingCapability.class)) { if (hasCapability(ImagingCapability.class)) {