Merge "Omaha #3451 extended colorbar range for grid lightning" into omaha_14.4.1
Former-commit-id:16425ee0e8
[formerlyb8301a10fa
] [formerlya20ba0ba14
] [formerly16425ee0e8
[formerlyb8301a10fa
] [formerlya20ba0ba14
] [formerly4e67093259
[formerlya20ba0ba14
[formerly 1822932d99d537597b04d26d7be326fe5b30e346]]]] Former-commit-id:4e67093259
Former-commit-id:9e2a509044
[formerlyb6d91ec0bb
] [formerly 3365e7ab9cf7b6abb3d0968994b95f99ef2f764f [formerly006042c6cc
]] Former-commit-id: f055e6439340d8e886729a51713ec47df2f59493 [formerlyd938d26f20
] Former-commit-id:815e8b336b
This commit is contained in:
commit
7d2db76123
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