Standards /

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

C1 be a coverageExpr,
m, n are integers with 0 ≤ m and 0 ≤ n,
a1, ... , an be pairwise distinct axisNames with ai ∈ axisNameSet(C1) for 1 ≤ i ≤ m,
(lo1,hi1), ... ,(lom,him) be axisPoint pairs with loihii for 1 ≤ i ≤ m,
f1, ... , fn be pairwise distinct fieldNames, it1, ... , itn be interpolationTypes ,
nr1, ... , nrn be nullResistances, with fi ∈ rangeFieldNames(C1) ,
and (iti, nri) ∈ interpolationSet(C1,f1) for 1 ≤ i ≤ n.

Then,

for any coverageExpr C2
where

C2  =  scale (
       C1,
       { p1, ... , pm } ,
       { f1(it1,nr1), ... , fn(itn,nrn) }
)

with

pi is one of
pimg,i = ai(loi,hii)
pcrs,i = ai(loi,hii)crsi

C2 is defined as follows:

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

Example

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(lox,hix), y(loy,hiy)  },
    { red(cubic,full), nir(linear,half) }
)