final double minx = truncateBoundsInGridsetCrs.getMinX();
final double miny = truncateBoundsInGridsetCrs.getMinY();
final double maxx = truncateBoundsInGridsetCrs.getMaxX();
final double maxy = truncateBoundsInGridsetCrs.getMaxY();
final BoundingBox reqBounds = new BoundingBox(minx, miny, maxx, maxy);
/*
* layerGrid.getCoverageIntersections is not too robust, so we better check the
* requested bounds intersect the layer bounds
*/
final BoundingBox layerBounds = layerGrid.getCoverageBestFitBounds();
if (!layerBounds.intersects(reqBounds)) {
log.fine("Requested truncation bounds do not intersect cached layer bounds, ignoring truncate request");
continue;
}
final BoundingBox intersection = BoundingBox.intersection(layerBounds, reqBounds);
final long[][] coverageIntersections = layerGrid.getCoverageIntersections(intersection);
final int zoomStart = layerGrid.getZoomStart();
final int zoomStop = layerGrid.getZoomStop();
final String parameters = null;// how do I get these?