/** * Checks the coverage described by the specified geometry and sample model does not exceeds the * output WCS limits * * @param info * @param gridRange2D * @param sampleModel */ public static void checkOutputLimits( WCSInfo info, GridEnvelope2D gridRange2D, SampleModel sampleModel) { // do we have to check a limit at all? long limit = info.getMaxOutputMemory() * 1024; if (limit <= 0) { return; } // compute the coverage memory usage and compare with limit long actual = getCoverageSize(gridRange2D, sampleModel); if (actual > limit) { throw new WcsException( "This request is trying to generate too much data, " + "the limit is " + formatBytes(limit) + " but the actual amount of bytes to be " + "written in the output is " + formatBytes(actual)); } }
"This request is trying to read too much data, " + "the limit is " + formatBytes(limit) + " but the actual amount of " + "bytes to be read is " + formatBytes(actual));
"This request is trying to generate too much data, " + "the limit is " + formatBytes(limit) + " but the actual amount of bytes to be " + "written in the output is " + formatBytes(actual));
"This request is trying to read too much data, " + "the limit is " + formatBytes(limit) + " but the actual amount of bytes " + "to be read is " + formatBytes(actual));