if (!(layer.getSourceHelper() instanceof WMSHttpHelper)) {
log.error("WMSRasterFilter can only be used with WMS layers.");
}
WMSHttpHelper srcHelper = (WMSHttpHelper) layer.getSourceHelper();
GridSubset gridSet = layer.getGridSubset(gridSetId);
int[] widthHeight = calculateWidthHeight(gridSet, z);
String urlStr = layer.getWMSurl()[0];
Map<String, String> requestParams = wmsParams(layer, gridSet, z, widthHeight);
log.info("Updated WMS raster filter, zoom level " + z + " for " + getName() + " ("
+ layer.getName() + ") , " + urlStr);
URL wmsUrl = new URL(urlStr);
if (backendTimeout == null) {
backendTimeout = 120;
}
GetMethod getMethod = null;
BufferedImage img = null;
try {
getMethod = srcHelper.executeRequest(wmsUrl, requestParams, backendTimeout);
if (getMethod.getStatusCode() != 200) {
throw new GeoWebCacheException("Received response code "
+ getMethod.getStatusCode() + "\n");
}