WCPS-Manual / trimExpr

The trimExpr element extracts a subset from a given coverage expression along the axis indicated, specified by a lower and upper bound for each axis affected. Interval limits can be expressed in the coverage's image CRS or any CRS which the the coverage supports.

Lower as well as upper limits **must** lie inside the coverage's domain.

For syntactic convenience, both array-style addressing using brackets and function-style syntax are provided; both are equivalent in semantics.

Let

C_{1} be a coverageExpr,

n be an **integer** with 0
≤ n ,

a_{1}, ... , a_{n} be pairwise
distinct **axisName**s with a_{i} ∈
axisNameSet(C_{1}) for 1 ≤ i ≤
n,

a_{n}, ... , crs_{n} be pairwise
distinct **crsName**s with crs_{i}
∈ crsList(C_{1}) for 1 ≤ i
≤ n,

(lo_{1},hi_{1}),
... ,(lo_{n},hi_{n}) be **axisPoint** pairs with
lo_{i} ≤ hi_{i} for 1 ≤ i ≤ n.

Then,

for any coverageExpr
C_{2}

where C_{2} is one of

with

NOTE It is possible to mix different CRSs in one trim operation, however each axis must be addressed in exactly one CRS (either image CRS or another supported CRS).

NOTE A trim operation might simultaneously perform x/y trimming expressed in some geographic coordinate CRS, time trimming in a time CRS, and abstract axis trimming in (integer) grid cell coordinates.

The following are syntactically valid, equivalent trim expressions:

C[ x(-180,+180), y(-90,90) ] trim( C, { x(-180,+180), y(-90,90) } )