Standards /

WCPS-Manual / coverageListExpr

The coverageListExpr element processes a list of coverages in turn. Each coverage is optionally checked first for fulfilling some predicate, and gets selected - i.e., contributes to an element of the result list - only if the predicate evaluates to true. Each coverage selected will be processed, and the result will be appended to the result list. This result list, finally, is returned as the ProcessCoverage response unless an exception was generated.

The elements in the coverageList clause are taken from the coverage identifiers advertised by the server in its GetCapabilities response document. The coverageList elements shall be inspected sequentially in the order given.

Coverage identifiers may occur more than once in a coverageList. In this case the coverage shall be inspected each time it is listed, respecting the overall inspection sequence.

Syntax

Let

v1, ... vn be n iteratorVars (n ≥ 1),
L1, ... Ln be n coverageLists (n ≥ 1),
b be a booleanScalarExpr possibly containing occurrences of one or more vi (1 ≥ i ≥ n),
P be a processingExpr possibly containing occurrences of vi (1 ≥ i ≥ n).

Then

for v1 in ( L1 ),
    v2 in ( L2 ),
    ... ,
    vn in ( Ln )
where b
return P

Semantics


Let R be the empty sequence;
while L1 is not empty:
{	assign the first element in L1 to v1;
 	while L2 is not empty:
	{	assign the first element in L2 to v2;
		...
			while Ln is not empty:
			{	assign the first element in Ln to vn;
				evaluate P, substituting any occurrence
 				of coverage identifier vi by the coverage
 				this identifier refers to;
				append the evaluation result to R;
				remove the first element from Ln;
 			}
		...
 		}
		remove the first element from L2;
	}
	remove the first element from L1;
}

Examples

  1. "Coverages A, B, and C, encoded in TIFF":
    for c in ( A, B, C )
    return encode( c, "TIFF" )
    

  2. "Coverages A, B, and C, but only if the coverage has an average red channel intensity exceeding 127":
    for c in ( A, B, C )
    where avg( c ) > 127
    return encode( c, "TIFF" )