Omaha #3451 extended colorbar range for grid lightning
Change-Id: Ia734b28b6d1b0daf8c257d2cc72c2aca1bd2de46 Former-commit-id:dba2a97392
[formerly98b6917185
] [formerlya16643a3d0
] [formerly334f5f107e
[formerlya16643a3d0
[formerly 7d3789e0832e7be5b0a87176cbf26509b6f3c708]]] Former-commit-id:334f5f107e
Former-commit-id: 421b86d8c6672942d541e7ea80126eb4b2173076 [formerlyc3ca0eb934
] Former-commit-id:4b2fe6248b
This commit is contained in:
parent
4abe5cff93
commit
1290d2fcd6
2 changed files with 29 additions and 2 deletions
|
@ -48,6 +48,8 @@ import com.raytheon.uf.common.geospatial.MapUtil;
|
|||
import com.raytheon.uf.common.numeric.buffer.ShortBufferWrapper;
|
||||
import com.raytheon.uf.common.numeric.filter.UnsignedFilter;
|
||||
import com.raytheon.uf.common.style.ParamLevelMatchCriteria;
|
||||
import com.raytheon.uf.common.style.image.DataScale;
|
||||
import com.raytheon.uf.common.style.image.ImagePreferences;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.viz.core.cache.CacheObject;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
|
@ -69,6 +71,7 @@ import com.raytheon.viz.lightning.cache.LightningFrameRetriever;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 07, 2014 3333 bclement Initial creation
|
||||
* Jul 22, 2014 3333 bclement ignores strikes that aren't on map
|
||||
* Jul 28, 2014 3451 bclement uses intended range min
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -114,8 +117,32 @@ public class GridLightningResource extends
|
|||
@Override
|
||||
protected ColorMapParameters createColorMapParameters(GeneralGridData data)
|
||||
throws VizException {
|
||||
/*
|
||||
* TODO investigate if the colormap parameter factory actually needs
|
||||
* those special cases or not
|
||||
*/
|
||||
/*
|
||||
* colormap parameter factory doesn't allow for data scale mins that are
|
||||
* under 1 when you have a large max, extract the intended min from the
|
||||
* style preferences and restore it in the colormap parameters
|
||||
*/
|
||||
float minRange = Float.NaN;
|
||||
if (stylePreferences != null
|
||||
&& stylePreferences instanceof ImagePreferences) {
|
||||
DataScale dataScale = ((ImagePreferences) stylePreferences)
|
||||
.getDataScale();
|
||||
if (dataScale != null) {
|
||||
Double minValue = dataScale.getMinValue();
|
||||
if (minValue != null) {
|
||||
minRange = minValue.floatValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
ColorMapParameters rval = super.createColorMapParameters(data);
|
||||
rval.setNoDataValue(0);
|
||||
if (!Double.isNaN(minRange)) {
|
||||
rval.setColorMapMin(minRange);
|
||||
}
|
||||
return rval;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,11 +27,11 @@
|
|||
<interpolate>false</interpolate>
|
||||
<range scale="LOG">
|
||||
<minValue>0.5</minValue>
|
||||
<maxValue>1000</maxValue>
|
||||
<maxValue>30000</maxValue>
|
||||
</range>
|
||||
<defaultColormap>Grid/gridded data</defaultColormap>
|
||||
<colorbarLabeling>
|
||||
<values>1 3 10 30 100 300 1000</values>
|
||||
<values>1 3 10 30 100 300 1000 3000 10000 30000</values>
|
||||
</colorbarLabeling>
|
||||
</imageStyle>
|
||||
</styleRule>
|
||||
|
|
Loading…
Add table
Reference in a new issue