WCPS-Manual / scaleExpr

The scaleExpr element performs scaling along a subset of the source coverage's axes. For each of the coverage's range fields, an interpolation method can be chosen from the coverage's interpolation method list. If no interpolation is indicated for a field, then this field's default interpolation method.

A service exception **shall** be raised if for any of the coverage's range fields
no appropriate interpolation method is available for the resampling/interpolation
performed in the course of the transformation.

Let

C_{1} be a coverageExpr,

m, n are **integer**s with 0 ≤ m and 0 ≤ n,

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

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

f_{1}, ... , f_{n} be pairwise
distinct **fieldName**s, it_{1},
... , it_{n} be **interpolationType**s ,

nr_{1}, ... , nr_{n} be **nullResistance**s,
with f_{i} ∈ rangeFieldNames(C_{1}) ,

and (it_{i}, nr_{i}) ∈ interpolationSet(C_{1},f_{1}) for 1 ≤ i ≤ n.

Then,

for any coverageExpr
C_{2}

where

C_{2}= scale ( C_{1}, { p_{1}, ... , p_{m}} , { f_{1}(it_{1},nr_{1}), ... , f_{n}(it_{n},nr_{n}) } )

with

Note: Scaling regularly involves cell interpolation, hence numerical effects have to be expected.

The following expression performs x/y scaling of some coverage C - which has one single range field, temperature - using interpolation type cubic and null resistance full in both x and y axis, assuming that the range field supports this method:

scale( C, { x(lo_{x},hi_{x}), y(lo_{y},hi_{y}) }, { red(cubic,full), nir(linear,half) } )