double maxScale = Double.MAX_VALUE;
float opacity = 1.0f;
if (style != null) {
try {
FeatureTypeStyle featureStyle = style.featureTypeStyles().get(0);
Rule rule = featureStyle.rules().get(0);
minScale = rule.getMinScaleDenominator();
maxScale = rule.getMaxScaleDenominator();
if (rule.getSymbolizers()[0] instanceof RasterSymbolizer) {
RasterSymbolizer rs = (RasterSymbolizer) rule.getSymbolizers()[0];
opacity = getOpacity(rs);